From 783c2e2d39e96aa4f14cc3247d8333594d787cd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:32:41 +0000 Subject: [PATCH] chore(deps): bump google.golang.org/api from 0.175.0 to 0.177.0 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.175.0 to 0.177.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.175.0...v0.177.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 12 +- go.sum | 43 +- vendor/cloud.google.com/go/auth/CHANGES.md | 12 + .../go/auth/credentials/detect.go | 5 +- .../go/auth/httptransport/httptransport.go | 9 +- .../go/auth/oauth2adapt/CHANGES.md | 7 + .../go/internal/.repo-metadata-full.json | 62 +- .../iamcredentials/v1/iamcredentials-gen.go | 687 +- .../api/internal/gensupport/params.go | 16 + .../google.golang.org/api/internal/version.go | 2 +- .../api/storage/v1/storage-gen.go | 11026 ++++------------ .../api/transport/grpc/dial.go | 4 +- .../api/transport/http/dial.go | 12 +- .../protobuf/encoding/protojson/encode.go | 20 +- .../protobuf/encoding/prototext/encode.go | 20 +- .../protobuf/internal/descfmt/stringer.go | 1 + .../editiondefaults/editions_defaults.binpb | Bin 63 -> 78 bytes .../internal/editionssupport/editions.go | 13 + .../protobuf/internal/encoding/tag/tag.go | 4 +- .../protobuf/internal/errors/errors.go | 15 + .../protobuf/internal/filedesc/desc.go | 84 +- .../protobuf/internal/filedesc/desc_init.go | 41 +- .../protobuf/internal/filedesc/desc_lazy.go | 44 +- .../protobuf/internal/filedesc/editions.go | 18 +- .../protobuf/internal/filedesc/placeholder.go | 1 + .../internal/genid/go_features_gen.go | 2 +- .../protobuf/internal/impl/codec_field.go | 64 +- .../protobuf/internal/impl/codec_map.go | 15 +- .../protobuf/internal/impl/legacy_enum.go | 1 + .../internal/impl/legacy_extension.go | 2 +- .../protobuf/internal/impl/legacy_file.go | 4 +- .../protobuf/internal/impl/legacy_message.go | 10 +- .../protobuf/internal/impl/message_reflect.go | 31 +- .../internal/impl/message_reflect_gen.go | 142 +- .../protobuf/internal/version/version.go | 2 +- .../protobuf/proto/decode.go | 2 + .../protobuf/proto/encode.go | 44 +- .../protobuf/proto/extension.go | 11 +- .../protobuf/proto/messageset.go | 7 +- .../google.golang.org/protobuf/proto/size.go | 2 + .../protobuf/reflect/protodesc/desc.go | 13 +- .../protobuf/reflect/protodesc/desc_init.go | 49 +- .../reflect/protodesc/desc_validate.go | 61 +- .../protobuf/reflect/protodesc/editions.go | 5 - .../protobuf/reflect/protodesc/proto.go | 22 + .../protobuf/reflect/protoreflect/proto.go | 2 +- .../protobuf/reflect/protoreflect/type.go | 6 + .../types/gofeaturespb/go_features.pb.go | 116 +- .../types/gofeaturespb/go_features.proto | 28 - vendor/modules.txt | 13 +- 50 files changed, 3613 insertions(+), 9199 deletions(-) create mode 100644 vendor/google.golang.org/protobuf/internal/editionssupport/editions.go delete mode 100644 vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto diff --git a/go.mod b/go.mod index 4694a86e36..4fac1334c9 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( ) require ( - cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go v0.112.2 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect @@ -138,16 +138,16 @@ require ( golang.org/x/sys v0.19.0 golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.175.0 + google.golang.org/api v0.177.0 google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) require ( - cloud.google.com/go/auth v0.2.2 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.1 // indirect + cloud.google.com/go/auth v0.3.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect @@ -195,7 +195,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.4.0 // indirect diff --git a/go.sum b/go.sum index 71f94730b8..49d7eef337 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= -cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= -cloud.google.com/go/auth v0.2.2 h1:gmxNJs4YZYcw6YvKRtVBaF2fyUE6UrWPyzU8jHvYfmI= -cloud.google.com/go/auth v0.2.2/go.mod h1:2bDNJWtWziDT3Pu1URxHHbkHE/BbOCuyUiKIGcNvafo= -cloud.google.com/go/auth/oauth2adapt v0.2.1 h1:VSPmMmUlT8CkIZ2PzD9AlLN+R3+D1clXMWHHa6vG/Ag= -cloud.google.com/go/auth/oauth2adapt v0.2.1/go.mod h1:tOdK/k+D2e4GEwfBRA48dKNQiDsqIXxLh7VU319eV0g= +cloud.google.com/go v0.112.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw= +cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= +cloud.google.com/go/auth v0.3.0 h1:PRyzEpGfx/Z9e8+lHsbkoUVXD0gnu4MNmm7Gp8TQNIs= +cloud.google.com/go/auth v0.3.0/go.mod h1:lBv6NKTWp8E3LPzmO1TbiiRKc4drLOfHsgmlH9ogv5w= +cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= +cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= @@ -94,12 +94,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7 github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= -github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 h1:wLPDAUFT50NEXGXpywRU3AA74pg35RJjWol/68ruvQQ= -github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5/go.mod h1:AOHmGMoPtSY9Zm2zBuwUJQBisIvYAZeA1n7b6f4e880= github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4 h1:Qr9W21mzWT3RhfYn9iAux7CeRIdbnTAqmiOlASqQgZI= github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4/go.mod h1:if7ybzzjOmDB8pat9FE35AHTY6ZxlYSy3YviSmFZv8c= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 h1:PQp21GBlGNaQ+AVJAB8w2KTmLx0DkFS2fDET2Iy3+f0= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5/go.mod h1:WMntdAol8KgeYsa5sDZPsRTXs4jVZIMYu0eQVVIQxnc= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4 h1:aNuiieMaS2IHxqAsTdM/pjHyY1aoaDLBGLqpNnFMMqk= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4/go.mod h1:8pvvNAklmq+hKmqyvFoMRg0bwg9sdGOvdwximmKiKP0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= @@ -120,8 +116,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 h1:PlJRmqKlSlEUlwem1c3zdPaEMtJc/ktnV7naD5Qvsx4= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6/go.mod h1:08sPJIlDHu4HwQ1xScPgsBWezvM6U10ghGKBJu0mowA= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 h1:oNDkocd5/+6jUuxyz07jQWnKhgpNtKQoZSXKMb7emqQ= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44/go.mod h1:2nlYPkG0rFrODp6R875pk/kOnB8Ivj3+onhzk2mO57g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -184,14 +178,10 @@ github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v26.0.0+incompatible h1:90BKrx1a1HKYpSnnBFR6AgDq/FqkHxwlUyzJVPxD30I= -github.com/docker/cli v26.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v26.1.0+incompatible h1:+nwRy8Ocd8cYNQ60mozDDICICD8aoFGtlPXifX/UQ3Y= github.com/docker/cli v26.1.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.0.2+incompatible h1:yGVmKUFGgcxA6PXWAokO0sQL22BrQ67cgVjko8tGdXE= -github.com/docker/docker v26.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= @@ -408,9 +398,6 @@ github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= -github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg= github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= @@ -542,8 +529,6 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -554,8 +539,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -651,8 +634,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -661,8 +642,8 @@ 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= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/api v0.175.0 h1:9bMDh10V9cBuU8N45Wlc3cKkItfqMRV0Fi8UscLEtbY= -google.golang.org/api v0.175.0/go.mod h1:Rra+ltKu14pps/4xTycZfobMgLpbosoaaL7c+SEMrO8= +google.golang.org/api v0.177.0 h1:8a0p/BbPa65GlqGWtUKxot4p0TV8OGOfyTjtmkXNXmk= +google.golang.org/api v0.177.0/go.mod h1:srbhue4MLjkjbkux5p3dw/ocYOSZTaIEvf7bCOnFQDw= 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= @@ -672,8 +653,8 @@ google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUE google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c h1:kaI7oewGK5YnVwj+Y+EJBO/YN1ht8iTL9XkFHtVZLsc= google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 h1:DujSIu+2tC9Ht0aPNA7jgj23Iq8Ewi5sgkQ++wdvonE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= 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.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -693,8 +674,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/cloud.google.com/go/auth/CHANGES.md b/vendor/cloud.google.com/go/auth/CHANGES.md index 739c3f2d83..ef00e902c6 100644 --- a/vendor/cloud.google.com/go/auth/CHANGES.md +++ b/vendor/cloud.google.com/go/auth/CHANGES.md @@ -1,5 +1,17 @@ # Changelog +## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.2...auth/v0.3.0) (2024-04-23) + + +### Features + +* **auth/httptransport:** Add ability to customize transport ([#10023](https://github.com/googleapis/google-cloud-go/issues/10023)) ([72c7f6b](https://github.com/googleapis/google-cloud-go/commit/72c7f6bbec3136cc7a62788fc7186bc33ef6c3b3)), refs [#9812](https://github.com/googleapis/google-cloud-go/issues/9812) [#9814](https://github.com/googleapis/google-cloud-go/issues/9814) + + +### Bug Fixes + +* **auth/credentials:** Error on bad file name if explicitly set ([#10018](https://github.com/googleapis/google-cloud-go/issues/10018)) ([55beaa9](https://github.com/googleapis/google-cloud-go/commit/55beaa993aaf052d8be39766afc6777c3c2a0bdd)), refs [#9809](https://github.com/googleapis/google-cloud-go/issues/9809) + ## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.1...auth/v0.2.2) (2024-04-19) diff --git a/vendor/cloud.google.com/go/auth/credentials/detect.go b/vendor/cloud.google.com/go/auth/credentials/detect.go index 5723ae94b3..cb3f44f587 100644 --- a/vendor/cloud.google.com/go/auth/credentials/detect.go +++ b/vendor/cloud.google.com/go/auth/credentials/detect.go @@ -76,7 +76,10 @@ func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) { if opts.CredentialsJSON != nil { return readCredentialsFileJSON(opts.CredentialsJSON, opts) } - if filename := credsfile.GetFileNameFromEnv(opts.CredentialsFile); filename != "" { + if opts.CredentialsFile != "" { + return readCredentialsFile(opts.CredentialsFile, opts) + } + if filename := os.Getenv(credsfile.GoogleAppCredsEnvVar); filename != "" { if creds, err := readCredentialsFile(filename, opts); err == nil { return creds, err } diff --git a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go b/vendor/cloud.google.com/go/auth/httptransport/httptransport.go index d054dac258..06acc04151 100644 --- a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go +++ b/vendor/cloud.google.com/go/auth/httptransport/httptransport.go @@ -44,6 +44,9 @@ type Options struct { // Headers are extra HTTP headers that will be appended to every outgoing // request. Headers http.Header + // BaseRoundTripper overrides the base transport used for serving requests. + // If specified ClientCertProvider is ignored. + BaseRoundTripper http.RoundTripper // Endpoint overrides the default endpoint to be used for a service. Endpoint string // APIKey specifies an API key to be used as the basis for authentication. @@ -181,7 +184,11 @@ func NewClient(opts *Options) (*http.Client, error) { if err != nil { return nil, err } - trans, err := newTransport(defaultBaseTransport(clientCertProvider, dialTLSContext), opts) + baseRoundTripper := opts.BaseRoundTripper + if baseRoundTripper == nil { + baseRoundTripper = defaultBaseTransport(clientCertProvider, dialTLSContext) + } + trans, err := newTransport(baseRoundTripper, opts) if err != nil { return nil, err } diff --git a/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md b/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md index 997dcf87ea..ff9747beda 100644 --- a/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md +++ b/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.1...auth/oauth2adapt/v0.2.2) (2024-04-23) + + +### Bug Fixes + +* **auth/oauth2adapt:** Bump x/net to v0.24.0 ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4)) + ## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.0...auth/oauth2adapt/v0.2.1) (2024-04-18) 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 c9a57ccddb..9905b164f2 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -199,6 +199,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/apphub/apiv1": { + "api_shortname": "apphub", + "distribution_name": "cloud.google.com/go/apphub/apiv1", + "description": "App Hub API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apphub/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/apps/events/subscriptions/apiv1": { "api_shortname": "workspaceevents", "distribution_name": "cloud.google.com/go/apps/events/subscriptions/apiv1", @@ -659,6 +669,26 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/cloudcontrolspartner/apiv1": { + "api_shortname": "cloudcontrolspartner", + "distribution_name": "cloud.google.com/go/cloudcontrolspartner/apiv1", + "description": "Cloud Controls Partner API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudcontrolspartner/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/cloudcontrolspartner/apiv1beta": { + "api_shortname": "cloudcontrolspartner", + "distribution_name": "cloud.google.com/go/cloudcontrolspartner/apiv1beta", + "description": "Cloud Controls Partner API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudcontrolspartner/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/clouddms/apiv1": { "api_shortname": "datamigration", "distribution_name": "cloud.google.com/go/clouddms/apiv1", @@ -1052,7 +1082,7 @@ "cloud.google.com/go/dlp/apiv2": { "api_shortname": "dlp", "distribution_name": "cloud.google.com/go/dlp/apiv2", - "description": "Cloud Data Loss Prevention (DLP)", + "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", @@ -2109,6 +2139,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/secretmanager/apiv1beta2": { + "api_shortname": "secretmanager", + "distribution_name": "cloud.google.com/go/secretmanager/apiv1beta2", + "description": "Secret Manager API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/secretmanager/latest/apiv1beta2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/securesourcemanager/apiv1": { "api_shortname": "securesourcemanager", "distribution_name": "cloud.google.com/go/securesourcemanager/apiv1", @@ -2169,6 +2209,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/securitycenter/apiv2": { + "api_shortname": "securitycenter", + "distribution_name": "cloud.google.com/go/securitycenter/apiv2", + "description": "Security Command Center API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securitycenter/latest/apiv2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/securitycenter/settings/apiv1beta1": { "api_shortname": "securitycenter", "distribution_name": "cloud.google.com/go/securitycenter/settings/apiv1beta1", @@ -2379,6 +2429,16 @@ "release_level": "stable", "library_type": "GAPIC_MANUAL" }, + "cloud.google.com/go/storage/control/apiv2": { + "api_shortname": "storage", + "distribution_name": "cloud.google.com/go/storage/control/apiv2", + "description": "Cloud Storage API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest/control/apiv2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/storage/internal/apiv2": { "api_shortname": "storage", "distribution_name": "cloud.google.com/go/storage/internal/apiv2", diff --git a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go index 947e83a5b5..4316aab702 100644 --- a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go +++ b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go @@ -96,8 +96,8 @@ const defaultUniverseDomain = "googleapis.com" // OAuth2 scopes used by this API. const ( - // See, edit, configure, and delete your Google Cloud data and see the - // email address for your Google Account. + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) @@ -177,354 +177,276 @@ type ProjectsServiceAccountsService struct { } type GenerateAccessTokenRequest struct { - // Delegates: The sequence of service accounts in a delegation chain. - // This field is required for delegated requests - // (https://cloud.google.com/iam/help/credentials/delegated-request). - // For direct requests - // (https://cloud.google.com/iam/help/credentials/direct-request), which - // are more common, do not specify this field. Each service account must - // be granted the `roles/iam.serviceAccountTokenCreator` role on its - // next service account in the chain. The last service account in the - // chain must be granted the `roles/iam.serviceAccountTokenCreator` role - // on the service account that is specified in the `name` field of the - // request. The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` - // wildcard character is required; replacing it with a project ID is + // Delegates: The sequence of service accounts in a delegation chain. This + // field is required for delegated requests + // (https://cloud.google.com/iam/help/credentials/delegated-request). For + // direct requests + // (https://cloud.google.com/iam/help/credentials/direct-request), which are + // more common, do not specify this field. Each service account must be granted + // the `roles/iam.serviceAccountTokenCreator` role on its next service account + // in the chain. The last service account in the chain must be granted the + // `roles/iam.serviceAccountTokenCreator` role on the service account that is + // specified in the `name` field of the request. The delegates must have the + // following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + // The `-` wildcard character is required; replacing it with a project ID is // invalid. Delegates []string `json:"delegates,omitempty"` - - // Lifetime: The desired lifetime duration of the access token in - // seconds. By default, the maximum allowed value is 1 hour. To set a - // lifetime of up to 12 hours, you can add the service account as an - // allowed value in an Organization Policy that enforces the - // `constraints/iam.allowServiceAccountCredentialLifetimeExtension` - // constraint. See detailed instructions at - // https://cloud.google.com/iam/help/credentials/lifetime If a value is - // not specified, the token's lifetime will be set to a default value of - // 1 hour. + // Lifetime: The desired lifetime duration of the access token in seconds. By + // default, the maximum allowed value is 1 hour. To set a lifetime of up to 12 + // hours, you can add the service account as an allowed value in an + // Organization Policy that enforces the + // `constraints/iam.allowServiceAccountCredentialLifetimeExtension` constraint. + // See detailed instructions at + // https://cloud.google.com/iam/help/credentials/lifetime If a value is not + // specified, the token's lifetime will be set to a default value of 1 hour. Lifetime string `json:"lifetime,omitempty"` - - // Scope: Required. Code to identify the scopes to be included in the - // OAuth 2.0 access token. See - // https://developers.google.com/identity/protocols/googlescopes for - // more information. At least one value required. + // Scope: Required. Code to identify the scopes to be included in the OAuth 2.0 + // access token. See + // https://developers.google.com/identity/protocols/googlescopes for more + // information. At least one value required. Scope []string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delegates") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Delegates") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Delegates") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GenerateAccessTokenRequest) MarshalJSON() ([]byte, error) { type NoMethod GenerateAccessTokenRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type GenerateAccessTokenResponse struct { // AccessToken: The OAuth 2.0 access token. AccessToken string `json:"accessToken,omitempty"` - // ExpireTime: Token expiration time. The expiration time is always set. ExpireTime string `json:"expireTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AccessToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GenerateAccessTokenResponse) MarshalJSON() ([]byte, error) { type NoMethod GenerateAccessTokenResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type GenerateIdTokenRequest struct { - // Audience: Required. The audience for the token, such as the API or - // account that this token grants access to. + // Audience: Required. The audience for the token, such as the API or account + // that this token grants access to. Audience string `json:"audience,omitempty"` - - // Delegates: The sequence of service accounts in a delegation chain. - // Each service account must be granted the - // `roles/iam.serviceAccountTokenCreator` role on its next service - // account in the chain. The last service account in the chain must be - // granted the `roles/iam.serviceAccountTokenCreator` role on the - // service account that is specified in the `name` field of the request. + // Delegates: The sequence of service accounts in a delegation chain. Each + // service account must be granted the `roles/iam.serviceAccountTokenCreator` + // role on its next service account in the chain. The last service account in + // the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on + // the service account that is specified in the `name` field of the request. // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` - // wildcard character is required; replacing it with a project ID is - // invalid. + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` - - // IncludeEmail: Include the service account email in the token. If set - // to `true`, the token will contain `email` and `email_verified` - // claims. + // IncludeEmail: Include the service account email in the token. If set to + // `true`, the token will contain `email` and `email_verified` claims. IncludeEmail bool `json:"includeEmail,omitempty"` - // ForceSendFields is a list of field names (e.g. "Audience") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Audience") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Audience") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GenerateIdTokenRequest) MarshalJSON() ([]byte, error) { type NoMethod GenerateIdTokenRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type GenerateIdTokenResponse struct { // Token: The OpenId Connect ID token. Token string `json:"token,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Token") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Token") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Token") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GenerateIdTokenResponse) MarshalJSON() ([]byte, error) { type NoMethod GenerateIdTokenResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type SignBlobRequest struct { - // Delegates: The sequence of service accounts in a delegation chain. - // Each service account must be granted the - // `roles/iam.serviceAccountTokenCreator` role on its next service - // account in the chain. The last service account in the chain must be - // granted the `roles/iam.serviceAccountTokenCreator` role on the - // service account that is specified in the `name` field of the request. + // Delegates: The sequence of service accounts in a delegation chain. Each + // service account must be granted the `roles/iam.serviceAccountTokenCreator` + // role on its next service account in the chain. The last service account in + // the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on + // the service account that is specified in the `name` field of the request. // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` - // wildcard character is required; replacing it with a project ID is - // invalid. + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` - // Payload: Required. The bytes to sign. Payload string `json:"payload,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delegates") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Delegates") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Delegates") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *SignBlobRequest) MarshalJSON() ([]byte, error) { type NoMethod SignBlobRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type SignBlobResponse struct { - // KeyId: The ID of the key used to sign the blob. The key used for - // signing will remain valid for at least 12 hours after the blob is - // signed. To verify the signature, you can retrieve the public key in - // several formats from the following endpoints: - RSA public key - // wrapped in an X.509 v3 certificate: - // `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT - // _EMAIL}` - Raw key in JSON format: - // `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_ - // EMAIL}` - JSON Web Key (JWK): - // `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_ - // EMAIL}` + // KeyId: The ID of the key used to sign the blob. The key used for signing + // will remain valid for at least 12 hours after the blob is signed. To verify + // the signature, you can retrieve the public key in several formats from the + // following endpoints: - RSA public key wrapped in an X.509 v3 certificate: + // `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL} + // ` - Raw key in JSON format: + // `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` + // - JSON Web Key (JWK): + // `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}` KeyId string `json:"keyId,omitempty"` - - // SignedBlob: The signature for the blob. Does not include the original - // blob. After the key pair referenced by the `key_id` response field - // expires, Google no longer exposes the public key that can be used to - // verify the blob. As a result, the receiver can no longer verify the - // signature. + // SignedBlob: The signature for the blob. Does not include the original blob. + // After the key pair referenced by the `key_id` response field expires, Google + // no longer exposes the public key that can be used to verify the blob. As a + // result, the receiver can no longer verify the signature. SignedBlob string `json:"signedBlob,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "KeyId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyId") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *SignBlobResponse) MarshalJSON() ([]byte, error) { type NoMethod SignBlobResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type SignJwtRequest struct { - // Delegates: The sequence of service accounts in a delegation chain. - // Each service account must be granted the - // `roles/iam.serviceAccountTokenCreator` role on its next service - // account in the chain. The last service account in the chain must be - // granted the `roles/iam.serviceAccountTokenCreator` role on the - // service account that is specified in the `name` field of the request. + // Delegates: The sequence of service accounts in a delegation chain. Each + // service account must be granted the `roles/iam.serviceAccountTokenCreator` + // role on its next service account in the chain. The last service account in + // the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on + // the service account that is specified in the `name` field of the request. // The delegates must have the following format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` - // wildcard character is required; replacing it with a project ID is - // invalid. + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` - - // Payload: Required. The JWT payload to sign. Must be a serialized JSON - // object that contains a JWT Claims Set. For example: `{"sub": - // "user@example.com", "iat": 313435}` If the JWT Claims Set contains an - // expiration time (`exp`) claim, it must be an integer timestamp that - // is not in the past and no more than 12 hours in the future. + // Payload: Required. The JWT payload to sign. Must be a serialized JSON object + // that contains a JWT Claims Set. For example: `{"sub": "user@example.com", + // "iat": 313435}` If the JWT Claims Set contains an expiration time (`exp`) + // claim, it must be an integer timestamp that is not in the past and no more + // than 12 hours in the future. Payload string `json:"payload,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delegates") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Delegates") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Delegates") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *SignJwtRequest) MarshalJSON() ([]byte, error) { type NoMethod SignJwtRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type SignJwtResponse struct { - // KeyId: The ID of the key used to sign the JWT. The key used for - // signing will remain valid for at least 12 hours after the JWT is - // signed. To verify the signature, you can retrieve the public key in - // several formats from the following endpoints: - RSA public key - // wrapped in an X.509 v3 certificate: - // `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT - // _EMAIL}` - Raw key in JSON format: - // `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_ - // EMAIL}` - JSON Web Key (JWK): - // `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_ - // EMAIL}` + // KeyId: The ID of the key used to sign the JWT. The key used for signing will + // remain valid for at least 12 hours after the JWT is signed. To verify the + // signature, you can retrieve the public key in several formats from the + // following endpoints: - RSA public key wrapped in an X.509 v3 certificate: + // `https://www.googleapis.com/service_accounts/v1/metadata/x509/{ACCOUNT_EMAIL} + // ` - Raw key in JSON format: + // `https://www.googleapis.com/service_accounts/v1/metadata/raw/{ACCOUNT_EMAIL}` + // - JSON Web Key (JWK): + // `https://www.googleapis.com/service_accounts/v1/metadata/jwk/{ACCOUNT_EMAIL}` KeyId string `json:"keyId,omitempty"` - - // SignedJwt: The signed JWT. Contains the automatically generated - // header; the client-supplied payload; and the signature, which is - // generated using the key referenced by the `kid` field in the header. - // After the key pair referenced by the `key_id` response field expires, - // Google no longer exposes the public key that can be used to verify - // the JWT. As a result, the receiver can no longer verify the - // signature. + // SignedJwt: The signed JWT. Contains the automatically generated header; the + // client-supplied payload; and the signature, which is generated using the key + // referenced by the `kid` field in the header. After the key pair referenced + // by the `key_id` response field expires, Google no longer exposes the public + // key that can be used to verify the JWT. As a result, the receiver can no + // longer verify the signature. SignedJwt string `json:"signedJwt,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "KeyId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyId") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *SignJwtResponse) MarshalJSON() ([]byte, error) { type NoMethod SignJwtResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// method id "iamcredentials.projects.serviceAccounts.generateAccessToken": - type ProjectsServiceAccountsGenerateAccessTokenCall struct { s *Service name string @@ -534,14 +456,13 @@ type ProjectsServiceAccountsGenerateAccessTokenCall struct { header_ http.Header } -// GenerateAccessToken: Generates an OAuth 2.0 access token for a -// service account. +// GenerateAccessToken: Generates an OAuth 2.0 access token for a service +// account. // -// - name: The resource name of the service account for which the -// credentials are requested, in the following format: -// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` -// wildcard character is required; replacing it with a project ID is -// invalid. +// - name: The resource name of the service account for which the credentials +// are requested, in the following format: +// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard +// character is required; replacing it with a project ID is invalid. func (r *ProjectsServiceAccountsService) GenerateAccessToken(name string, generateaccesstokenrequest *GenerateAccessTokenRequest) *ProjectsServiceAccountsGenerateAccessTokenCall { c := &ProjectsServiceAccountsGenerateAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -550,23 +471,21 @@ func (r *ProjectsServiceAccountsService) GenerateAccessToken(name string, genera } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsGenerateAccessTokenCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Context(ctx context.Context) *ProjectsServiceAccountsGenerateAccessTokenCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -575,18 +494,12 @@ func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Header() http.Header { } func (c *ProjectsServiceAccountsGenerateAccessTokenCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateaccesstokenrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateAccessToken") @@ -603,12 +516,11 @@ func (c *ProjectsServiceAccountsGenerateAccessTokenCall) doRequest(alt string) ( } // Do executes the "iamcredentials.projects.serviceAccounts.generateAccessToken" call. -// Exactly one of *GenerateAccessTokenResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GenerateAccessTokenResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GenerateAccessTokenResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Do(opts ...googleapi.CallOption) (*GenerateAccessTokenResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -639,39 +551,8 @@ func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Do(opts ...googleapi.Ca return nil, err } return ret, nil - // { - // "description": "Generates an OAuth 2.0 access token for a service account.", - // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateAccessToken", - // "httpMethod": "POST", - // "id": "iamcredentials.projects.serviceAccounts.generateAccessToken", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.", - // "location": "path", - // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:generateAccessToken", - // "request": { - // "$ref": "GenerateAccessTokenRequest" - // }, - // "response": { - // "$ref": "GenerateAccessTokenResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } -// method id "iamcredentials.projects.serviceAccounts.generateIdToken": - type ProjectsServiceAccountsGenerateIdTokenCall struct { s *Service name string @@ -681,14 +562,12 @@ type ProjectsServiceAccountsGenerateIdTokenCall struct { header_ http.Header } -// GenerateIdToken: Generates an OpenID Connect ID token for a service -// account. +// GenerateIdToken: Generates an OpenID Connect ID token for a service account. // -// - name: The resource name of the service account for which the -// credentials are requested, in the following format: -// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` -// wildcard character is required; replacing it with a project ID is -// invalid. +// - name: The resource name of the service account for which the credentials +// are requested, in the following format: +// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard +// character is required; replacing it with a project ID is invalid. func (r *ProjectsServiceAccountsService) GenerateIdToken(name string, generateidtokenrequest *GenerateIdTokenRequest) *ProjectsServiceAccountsGenerateIdTokenCall { c := &ProjectsServiceAccountsGenerateIdTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -697,23 +576,21 @@ func (r *ProjectsServiceAccountsService) GenerateIdToken(name string, generateid } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsServiceAccountsGenerateIdTokenCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsGenerateIdTokenCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsServiceAccountsGenerateIdTokenCall) Context(ctx context.Context) *ProjectsServiceAccountsGenerateIdTokenCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsServiceAccountsGenerateIdTokenCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -722,18 +599,12 @@ func (c *ProjectsServiceAccountsGenerateIdTokenCall) Header() http.Header { } func (c *ProjectsServiceAccountsGenerateIdTokenCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateidtokenrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateIdToken") @@ -750,12 +621,11 @@ func (c *ProjectsServiceAccountsGenerateIdTokenCall) doRequest(alt string) (*htt } // Do executes the "iamcredentials.projects.serviceAccounts.generateIdToken" call. -// Exactly one of *GenerateIdTokenResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either +// Any non-2xx status code is an error. Response headers are in either // *GenerateIdTokenResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ProjectsServiceAccountsGenerateIdTokenCall) Do(opts ...googleapi.CallOption) (*GenerateIdTokenResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -786,39 +656,8 @@ func (c *ProjectsServiceAccountsGenerateIdTokenCall) Do(opts ...googleapi.CallOp return nil, err } return ret, nil - // { - // "description": "Generates an OpenID Connect ID token for a service account.", - // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:generateIdToken", - // "httpMethod": "POST", - // "id": "iamcredentials.projects.serviceAccounts.generateIdToken", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.", - // "location": "path", - // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:generateIdToken", - // "request": { - // "$ref": "GenerateIdTokenRequest" - // }, - // "response": { - // "$ref": "GenerateIdTokenResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } -// method id "iamcredentials.projects.serviceAccounts.signBlob": - type ProjectsServiceAccountsSignBlobCall struct { s *Service name string @@ -828,14 +667,12 @@ type ProjectsServiceAccountsSignBlobCall struct { header_ http.Header } -// SignBlob: Signs a blob using a service account's system-managed -// private key. +// SignBlob: Signs a blob using a service account's system-managed private key. // -// - name: The resource name of the service account for which the -// credentials are requested, in the following format: -// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` -// wildcard character is required; replacing it with a project ID is -// invalid. +// - name: The resource name of the service account for which the credentials +// are requested, in the following format: +// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard +// character is required; replacing it with a project ID is invalid. func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest *SignBlobRequest) *ProjectsServiceAccountsSignBlobCall { c := &ProjectsServiceAccountsSignBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -844,23 +681,21 @@ func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest * } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsServiceAccountsSignBlobCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsSignBlobCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsServiceAccountsSignBlobCall) Context(ctx context.Context) *ProjectsServiceAccountsSignBlobCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -869,18 +704,12 @@ func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header { } func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.signblobrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:signBlob") @@ -897,12 +726,11 @@ func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Respo } // Do executes the "iamcredentials.projects.serviceAccounts.signBlob" call. -// Exactly one of *SignBlobResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SignBlobResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *SignBlobResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) (*SignBlobResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -933,39 +761,8 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( return nil, err } return ret, nil - // { - // "description": "Signs a blob using a service account's system-managed private key.", - // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", - // "httpMethod": "POST", - // "id": "iamcredentials.projects.serviceAccounts.signBlob", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.", - // "location": "path", - // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:signBlob", - // "request": { - // "$ref": "SignBlobRequest" - // }, - // "response": { - // "$ref": "SignBlobResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } -// method id "iamcredentials.projects.serviceAccounts.signJwt": - type ProjectsServiceAccountsSignJwtCall struct { s *Service name string @@ -975,14 +772,12 @@ type ProjectsServiceAccountsSignJwtCall struct { header_ http.Header } -// SignJwt: Signs a JWT using a service account's system-managed private -// key. +// SignJwt: Signs a JWT using a service account's system-managed private key. // -// - name: The resource name of the service account for which the -// credentials are requested, in the following format: -// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` -// wildcard character is required; replacing it with a project ID is -// invalid. +// - name: The resource name of the service account for which the credentials +// are requested, in the following format: +// `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard +// character is required; replacing it with a project ID is invalid. func (r *ProjectsServiceAccountsService) SignJwt(name string, signjwtrequest *SignJwtRequest) *ProjectsServiceAccountsSignJwtCall { c := &ProjectsServiceAccountsSignJwtCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -991,23 +786,21 @@ func (r *ProjectsServiceAccountsService) SignJwt(name string, signjwtrequest *Si } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsServiceAccountsSignJwtCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsSignJwtCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsServiceAccountsSignJwtCall) Context(ctx context.Context) *ProjectsServiceAccountsSignJwtCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsServiceAccountsSignJwtCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -1016,18 +809,12 @@ func (c *ProjectsServiceAccountsSignJwtCall) Header() http.Header { } func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.signjwtrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:signJwt") @@ -1044,12 +831,11 @@ func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Respon } // Do executes the "iamcredentials.projects.serviceAccounts.signJwt" call. -// Exactly one of *SignJwtResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SignJwtResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *SignJwtResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (*SignJwtResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -1080,33 +866,4 @@ func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (* return nil, err } return ret, nil - // { - // "description": "Signs a JWT using a service account's system-managed private key.", - // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", - // "httpMethod": "POST", - // "id": "iamcredentials.projects.serviceAccounts.signJwt", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.", - // "location": "path", - // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:signJwt", - // "request": { - // "$ref": "SignJwtRequest" - // }, - // "response": { - // "$ref": "SignJwtResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - } diff --git a/vendor/google.golang.org/api/internal/gensupport/params.go b/vendor/google.golang.org/api/internal/gensupport/params.go index 1a30d2ca25..3f4074c819 100644 --- a/vendor/google.golang.org/api/internal/gensupport/params.go +++ b/vendor/google.golang.org/api/internal/gensupport/params.go @@ -5,9 +5,11 @@ package gensupport import ( + "net/http" "net/url" "google.golang.org/api/googleapi" + "google.golang.org/api/internal" ) // URLParams is a simplified replacement for url.Values @@ -55,3 +57,17 @@ func SetOptions(u URLParams, opts ...googleapi.CallOption) { u.Set(o.Get()) } } + +// SetHeaders sets common headers for all requests. +func SetHeaders(userAgent, contentType string, userHeaders http.Header) http.Header { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+GoVersion()+" gdcl/"+internal.Version) + reqHeaders.Set("User-Agent", userAgent) + if contentType != "" { + reqHeaders.Set("Content-Type", contentType) + } + for k, v := range userHeaders { + reqHeaders[k] = v + } + return reqHeaders +} diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go index 9d7274e25f..6a47694eae 100644 --- a/vendor/google.golang.org/api/internal/version.go +++ b/vendor/google.golang.org/api/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.175.0" +const Version = "0.177.0" diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index a3f17e5c6f..70a7458e3f 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -347,462 +347,344 @@ type ProjectsServiceAccountService struct { type AnywhereCache struct { // AdmissionPolicy: The cache-level entry admission policy. AdmissionPolicy string `json:"admissionPolicy,omitempty"` - // AnywhereCacheId: The ID of the Anywhere cache instance. AnywhereCacheId string `json:"anywhereCacheId,omitempty"` - // Bucket: The name of the bucket containing this cache instance. Bucket string `json:"bucket,omitempty"` - - // CreateTime: The creation time of the cache instance in RFC 3339 - // format. + // CreateTime: The creation time of the cache instance in RFC 3339 format. CreateTime string `json:"createTime,omitempty"` - - // Id: The ID of the resource, including the project number, bucket name - // and anywhere cache ID. + // Id: The ID of the resource, including the project number, bucket name and + // anywhere cache ID. Id string `json:"id,omitempty"` - // Kind: The kind of item this is. For Anywhere Cache, this is always // storage#anywhereCache. Kind string `json:"kind,omitempty"` - - // PendingUpdate: True if the cache instance has an active Update - // long-running operation. + // PendingUpdate: True if the cache instance has an active Update long-running + // operation. PendingUpdate bool `json:"pendingUpdate,omitempty"` - // SelfLink: The link to this cache instance. SelfLink string `json:"selfLink,omitempty"` - // State: The current state of the cache instance. State string `json:"state,omitempty"` - // Ttl: The TTL of all cache entries in whole seconds. e.g., "7200s". Ttl string `json:"ttl,omitempty"` - - // UpdateTime: The modification time of the cache instance metadata in - // RFC 3339 format. + // UpdateTime: The modification time of the cache instance metadata in RFC 3339 + // format. UpdateTime string `json:"updateTime,omitempty"` - // Zone: The zone in which the cache instance is running. For example, // us-central1-a. Zone string `json:"zone,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdmissionPolicy") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdmissionPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AdmissionPolicy") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *AnywhereCache) MarshalJSON() ([]byte, error) { type NoMethod AnywhereCache - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // AnywhereCaches: A list of Anywhere Caches. type AnywhereCaches struct { // Items: The list of items. Items []*AnywhereCache `json:"items,omitempty"` - - // Kind: The kind of item this is. For lists of Anywhere Caches, this is - // always storage#anywhereCaches. + // Kind: The kind of item this is. For lists of Anywhere Caches, this is always + // storage#anywhereCaches. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *AnywhereCaches) MarshalJSON() ([]byte, error) { type NoMethod AnywhereCaches - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Bucket: A bucket. type Bucket struct { // Acl: Access controls on the bucket. Acl []*BucketAccessControl `json:"acl,omitempty"` - // Autoclass: The bucket's Autoclass configuration. Autoclass *BucketAutoclass `json:"autoclass,omitempty"` - // Billing: The bucket's billing configuration. Billing *BucketBilling `json:"billing,omitempty"` - - // Cors: The bucket's Cross-Origin Resource Sharing (CORS) - // configuration. + // Cors: The bucket's Cross-Origin Resource Sharing (CORS) configuration. Cors []*BucketCors `json:"cors,omitempty"` - - // CustomPlacementConfig: The bucket's custom placement configuration - // for Custom Dual Regions. + // CustomPlacementConfig: The bucket's custom placement configuration for + // Custom Dual Regions. CustomPlacementConfig *BucketCustomPlacementConfig `json:"customPlacementConfig,omitempty"` - - // DefaultEventBasedHold: 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 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 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 event-based hold cannot be deleted, overwritten or archived - // until the hold is removed. + // DefaultEventBasedHold: 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 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 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 event-based hold cannot be deleted, overwritten or archived until the + // hold is removed. DefaultEventBasedHold bool `json:"defaultEventBasedHold,omitempty"` - - // DefaultObjectAcl: Default access controls to apply to new objects - // when no ACL is provided. + // DefaultObjectAcl: Default access controls to apply to new objects when no + // ACL is provided. DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"` - // Encryption: Encryption configuration for a bucket. Encryption *BucketEncryption `json:"encryption,omitempty"` - // Etag: HTTP 1.1 Entity tag for the bucket. Etag string `json:"etag,omitempty"` - - // HierarchicalNamespace: The bucket's hierarchical namespace - // configuration. + // HierarchicalNamespace: The bucket's hierarchical namespace configuration. HierarchicalNamespace *BucketHierarchicalNamespace `json:"hierarchicalNamespace,omitempty"` - // IamConfiguration: The bucket's IAM configuration. IamConfiguration *BucketIamConfiguration `json:"iamConfiguration,omitempty"` - - // Id: The ID of the bucket. For buckets, the id and name properties are - // the same. + // Id: The ID of the bucket. For buckets, the id and name properties are the + // same. Id string `json:"id,omitempty"` - - // Kind: The kind of item this is. For buckets, this is always - // storage#bucket. + // Kind: The kind of item this is. For buckets, this is always storage#bucket. Kind string `json:"kind,omitempty"` - // Labels: User-provided labels, in key/value pairs. Labels map[string]string `json:"labels,omitempty"` - - // Lifecycle: The bucket's lifecycle configuration. See lifecycle - // management for more information. + // Lifecycle: The bucket's lifecycle configuration. See lifecycle management + // for more information. Lifecycle *BucketLifecycle `json:"lifecycle,omitempty"` - - // Location: The location of the bucket. Object data for objects in the - // bucket resides in physical storage within this region. Defaults to - // US. See the developer's guide for the authoritative list. + // Location: The location of the bucket. Object data for objects in the bucket + // resides in physical storage within this region. Defaults to US. See the + // developer's guide for the authoritative list. Location string `json:"location,omitempty"` - // LocationType: The type of the bucket location. LocationType string `json:"locationType,omitempty"` - - // Logging: The bucket's logging configuration, which defines the - // destination bucket and optional name prefix for the current bucket's - // logs. + // Logging: The bucket's logging configuration, which defines the destination + // bucket and optional name prefix for the current bucket's logs. Logging *BucketLogging `json:"logging,omitempty"` - // Metageneration: The metadata generation of this bucket. Metageneration int64 `json:"metageneration,omitempty,string"` - // Name: The name of the bucket. Name string `json:"name,omitempty"` - // ObjectRetention: The bucket's object retention config. ObjectRetention *BucketObjectRetention `json:"objectRetention,omitempty"` - - // Owner: The owner of the bucket. This is always the project team's - // owner group. + // Owner: The owner of the bucket. This is always the project team's owner + // group. Owner *BucketOwner `json:"owner,omitempty"` - - // ProjectNumber: The project number of the project the bucket belongs - // to. + // ProjectNumber: The project number of the project the bucket belongs to. ProjectNumber uint64 `json:"projectNumber,omitempty,string"` - // RetentionPolicy: 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 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 + // 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 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. RetentionPolicy *BucketRetentionPolicy `json:"retentionPolicy,omitempty"` - - // Rpo: The Recovery Point Objective (RPO) of this bucket. Set to - // ASYNC_TURBO to turn on Turbo Replication on a bucket. + // Rpo: The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO + // to turn on Turbo Replication on a bucket. Rpo string `json:"rpo,omitempty"` - // SatisfiesPZS: Reserved for future use. SatisfiesPZS bool `json:"satisfiesPZS,omitempty"` - // SelfLink: The URI of this bucket. SelfLink string `json:"selfLink,omitempty"` - - // SoftDeletePolicy: The bucket's soft delete policy, which defines the - // period of time that soft-deleted objects will be retained, and cannot - // be permanently deleted. + // SoftDeletePolicy: The bucket's soft delete policy, which defines the period + // of time that soft-deleted objects will be retained, and cannot be + // permanently deleted. SoftDeletePolicy *BucketSoftDeletePolicy `json:"softDeletePolicy,omitempty"` - // StorageClass: 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. Values include MULTI_REGIONAL, REGIONAL, STANDARD, - // NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If - // this value is not specified when the bucket is created, it will - // default to STANDARD. For more information, see storage classes. + // 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. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, + // COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not + // specified when the bucket is created, it will default to STANDARD. For more + // information, see storage classes. StorageClass string `json:"storageClass,omitempty"` - // TimeCreated: The creation time of the bucket in RFC 3339 format. TimeCreated string `json:"timeCreated,omitempty"` - // Updated: The modification time of the bucket in RFC 3339 format. Updated string `json:"updated,omitempty"` - // Versioning: The bucket's versioning configuration. Versioning *BucketVersioning `json:"versioning,omitempty"` - - // Website: The bucket's website configuration, controlling how the - // service behaves when accessing bucket contents as a web site. See the - // Static Website Examples for more information. + // Website: The bucket's website configuration, controlling how the service + // behaves when accessing bucket contents as a web site. See the Static Website + // Examples for more information. Website *BucketWebsite `json:"website,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Acl") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Acl") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Acl") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Acl") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Bucket) MarshalJSON() ([]byte, error) { type NoMethod Bucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketAutoclass: The bucket's Autoclass configuration. type BucketAutoclass struct { // Enabled: Whether or not Autoclass is enabled on this bucket Enabled bool `json:"enabled,omitempty"` - // TerminalStorageClass: The storage class that objects in the bucket - // eventually transition to if they are not read for a certain length of - // time. Valid values are NEARLINE and ARCHIVE. + // eventually transition to if they are not read for a certain length of time. + // Valid values are NEARLINE and ARCHIVE. TerminalStorageClass string `json:"terminalStorageClass,omitempty"` - // TerminalStorageClassUpdateTime: A date and time in RFC 3339 format - // representing the time of the most recent update to - // "terminalStorageClass". + // representing the time of the most recent update to "terminalStorageClass". TerminalStorageClassUpdateTime string `json:"terminalStorageClassUpdateTime,omitempty"` - - // ToggleTime: A date and time in RFC 3339 format representing the - // instant at which "enabled" was last toggled. + // ToggleTime: A date and time in RFC 3339 format representing the instant at + // which "enabled" was last toggled. ToggleTime string `json:"toggleTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketAutoclass) MarshalJSON() ([]byte, error) { type NoMethod BucketAutoclass - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketBilling: The bucket's billing configuration. type BucketBilling struct { - // RequesterPays: When set to true, Requester Pays is enabled for this - // bucket. + // RequesterPays: When set to true, Requester Pays is enabled for this bucket. RequesterPays bool `json:"requesterPays,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequesterPays") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RequesterPays") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "RequesterPays") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketBilling) MarshalJSON() ([]byte, error) { type NoMethod BucketBilling - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type BucketCors struct { // MaxAgeSeconds: The value, in seconds, to return in the // Access-Control-Max-Age header used in preflight responses. MaxAgeSeconds int64 `json:"maxAgeSeconds,omitempty"` - - // Method: The list of HTTP methods on which to include CORS response - // headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list - // of methods, and means "any method". + // Method: The list of HTTP methods on which to include CORS response headers, + // (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and + // means "any method". Method []string `json:"method,omitempty"` - - // Origin: The list of Origins eligible to receive CORS response - // headers. Note: "*" is permitted in the list of origins, and means - // "any Origin". + // Origin: The list of Origins eligible to receive CORS response headers. Note: + // "*" is permitted in the list of origins, and means "any Origin". Origin []string `json:"origin,omitempty"` - - // ResponseHeader: The list of HTTP headers other than the simple - // response headers to give permission for the user-agent to share - // across domains. + // ResponseHeader: The list of HTTP headers other than the simple response + // headers to give permission for the user-agent to share across domains. ResponseHeader []string `json:"responseHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxAgeSeconds") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MaxAgeSeconds") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "MaxAgeSeconds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketCors) MarshalJSON() ([]byte, error) { type NoMethod BucketCors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketCustomPlacementConfig: The bucket's custom placement -// configuration for Custom Dual Regions. +// BucketCustomPlacementConfig: The bucket's custom placement configuration for +// Custom Dual Regions. type BucketCustomPlacementConfig struct { - // DataLocations: The list of regional locations in which data is - // placed. + // DataLocations: The list of regional locations in which data is placed. DataLocations []string `json:"dataLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataLocations") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DataLocations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DataLocations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketCustomPlacementConfig) MarshalJSON() ([]byte, error) { type NoMethod BucketCustomPlacementConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketEncryption: Encryption configuration for a bucket. type BucketEncryption struct { - // DefaultKmsKeyName: A Cloud KMS key that will be used to encrypt - // objects inserted into this bucket, if no encryption method is - // specified. + // DefaultKmsKeyName: A Cloud KMS key that will be used to encrypt objects + // inserted into this bucket, if no encryption method is specified. DefaultKmsKeyName string `json:"defaultKmsKeyName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DefaultKmsKeyName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DefaultKmsKeyName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketEncryption) MarshalJSON() ([]byte, error) { type NoMethod BucketEncryption - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketHierarchicalNamespace: The bucket's hierarchical namespace @@ -811,600 +693,469 @@ type BucketHierarchicalNamespace struct { // Enabled: When set to true, hierarchical namespace is enabled for this // bucket. Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketHierarchicalNamespace) MarshalJSON() ([]byte, error) { type NoMethod BucketHierarchicalNamespace - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketIamConfiguration: The bucket's IAM configuration. type BucketIamConfiguration struct { - // BucketPolicyOnly: The bucket's uniform bucket-level access - // configuration. The feature was formerly known as Bucket Policy Only. - // For backward compatibility, this field will be populated with - // identical information as the uniformBucketLevelAccess field. We - // recommend using the uniformBucketLevelAccess field to enable and - // disable the feature. + // BucketPolicyOnly: The bucket's uniform bucket-level access configuration. + // The feature was formerly known as Bucket Policy Only. For backward + // compatibility, this field will be populated with identical information as + // the uniformBucketLevelAccess field. We recommend using the + // uniformBucketLevelAccess field to enable and disable the feature. BucketPolicyOnly *BucketIamConfigurationBucketPolicyOnly `json:"bucketPolicyOnly,omitempty"` - - // PublicAccessPrevention: The bucket's Public Access Prevention - // configuration. Currently, 'inherited' and 'enforced' are supported. + // PublicAccessPrevention: The bucket's Public Access Prevention configuration. + // Currently, 'inherited' and 'enforced' are supported. PublicAccessPrevention string `json:"publicAccessPrevention,omitempty"` - // UniformBucketLevelAccess: The bucket's uniform bucket-level access // configuration. UniformBucketLevelAccess *BucketIamConfigurationUniformBucketLevelAccess `json:"uniformBucketLevelAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketPolicyOnly") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketPolicyOnly") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "BucketPolicyOnly") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketIamConfiguration) MarshalJSON() ([]byte, error) { type NoMethod BucketIamConfiguration - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketIamConfigurationBucketPolicyOnly: The bucket's uniform -// bucket-level access configuration. The feature was formerly known as -// Bucket Policy Only. For backward compatibility, this field will be -// populated with identical information as the uniformBucketLevelAccess -// field. We recommend using the uniformBucketLevelAccess field to -// enable and disable the feature. +// BucketIamConfigurationBucketPolicyOnly: The bucket's uniform bucket-level +// access configuration. The feature was formerly known as Bucket Policy Only. +// For backward compatibility, this field will be populated with identical +// information as the uniformBucketLevelAccess field. We recommend using the +// uniformBucketLevelAccess field to enable and disable the feature. type BucketIamConfigurationBucketPolicyOnly struct { - // Enabled: If set, access is controlled only by bucket-level or above - // IAM policies. + // Enabled: If set, access is controlled only by bucket-level or above IAM + // policies. Enabled bool `json:"enabled,omitempty"` - // LockedTime: The deadline for changing - // iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC - // 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed - // from true to false until the locked time, after which the field is - // immutable. + // iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 + // format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true + // to false until the locked time, after which the field is immutable. LockedTime string `json:"lockedTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketIamConfigurationBucketPolicyOnly) MarshalJSON() ([]byte, error) { type NoMethod BucketIamConfigurationBucketPolicyOnly - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketIamConfigurationUniformBucketLevelAccess: The bucket's uniform // bucket-level access configuration. type BucketIamConfigurationUniformBucketLevelAccess struct { - // Enabled: If set, access is controlled only by bucket-level or above - // IAM policies. + // Enabled: If set, access is controlled only by bucket-level or above IAM + // policies. Enabled bool `json:"enabled,omitempty"` - // LockedTime: The deadline for changing - // iamConfiguration.uniformBucketLevelAccess.enabled from true to false - // in RFC 3339 format. - // iamConfiguration.uniformBucketLevelAccess.enabled may be changed from - // true to false until the locked time, after which the field is + // iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC + // 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be + // changed from true to false until the locked time, after which the field is // immutable. LockedTime string `json:"lockedTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketIamConfigurationUniformBucketLevelAccess) MarshalJSON() ([]byte, error) { type NoMethod BucketIamConfigurationUniformBucketLevelAccess - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketLifecycle: The bucket's lifecycle configuration. See lifecycle // management for more information. type BucketLifecycle struct { - // Rule: A lifecycle management rule, which is made of an action to take - // and the condition(s) under which the action will be taken. + // Rule: A lifecycle management rule, which is made of an action to take and + // the condition(s) under which the action will be taken. Rule []*BucketLifecycleRule `json:"rule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Rule") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Rule") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Rule") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Rule") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketLifecycle) MarshalJSON() ([]byte, error) { type NoMethod BucketLifecycle - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type BucketLifecycleRule struct { // Action: The action to take. Action *BucketLifecycleRuleAction `json:"action,omitempty"` - // Condition: The condition(s) under which the action will be taken. Condition *BucketLifecycleRuleCondition `json:"condition,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Action") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketLifecycleRule) MarshalJSON() ([]byte, error) { type NoMethod BucketLifecycleRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketLifecycleRuleAction: The action to take. type BucketLifecycleRuleAction struct { - // StorageClass: Target storage class. Required iff the type of the - // action is SetStorageClass. + // StorageClass: Target storage class. Required iff the type of the action is + // SetStorageClass. StorageClass string `json:"storageClass,omitempty"` - - // Type: Type of the action. Currently, only Delete, SetStorageClass, - // and AbortIncompleteMultipartUpload are supported. + // Type: Type of the action. Currently, only Delete, SetStorageClass, and + // AbortIncompleteMultipartUpload are supported. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "StorageClass") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "StorageClass") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "StorageClass") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketLifecycleRuleAction) MarshalJSON() ([]byte, error) { type NoMethod BucketLifecycleRuleAction - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketLifecycleRuleCondition: The condition(s) under which the action -// will be taken. +// BucketLifecycleRuleCondition: The condition(s) under which the action will +// be taken. type BucketLifecycleRuleCondition struct { - // Age: Age of an object (in days). This condition is satisfied when an - // object reaches the specified age. + // Age: Age of an object (in days). This condition is satisfied when an object + // reaches the specified age. Age *int64 `json:"age,omitempty"` - // CreatedBefore: A date in RFC 3339 format with only the date part (for - // instance, "2013-01-15"). This condition is satisfied when an object - // is created before midnight of the specified date in UTC. + // instance, "2013-01-15"). This condition is satisfied when an object is + // created before midnight of the specified date in UTC. CreatedBefore string `json:"createdBefore,omitempty"` - - // CustomTimeBefore: A date in RFC 3339 format with only the date part - // (for instance, "2013-01-15"). This condition is satisfied when the - // custom time on an object is before this date in UTC. + // CustomTimeBefore: A date in RFC 3339 format with only the date part (for + // instance, "2013-01-15"). This condition is satisfied when the custom time on + // an object is before this date in UTC. CustomTimeBefore string `json:"customTimeBefore,omitempty"` - // DaysSinceCustomTime: Number of days elapsed since the user-specified - // timestamp set on an object. The condition is satisfied if the days - // elapsed is at least this number. If no custom timestamp is specified - // on an object, the condition does not apply. + // timestamp set on an object. The condition is satisfied if the days elapsed + // is at least this number. If no custom timestamp is specified on an object, + // the condition does not apply. DaysSinceCustomTime int64 `json:"daysSinceCustomTime,omitempty"` - // DaysSinceNoncurrentTime: Number of days elapsed since the noncurrent - // timestamp of an object. The condition is satisfied if the days - // elapsed is at least this number. This condition is relevant only for - // versioned objects. The value of the field must be a nonnegative - // integer. If it's zero, the object version will become eligible for - // Lifecycle action as soon as it becomes noncurrent. + // timestamp of an object. The condition is satisfied if the days elapsed is at + // least this number. This condition is relevant only for versioned objects. + // The value of the field must be a nonnegative integer. If it's zero, the + // object version will become eligible for Lifecycle action as soon as it + // becomes noncurrent. DaysSinceNoncurrentTime int64 `json:"daysSinceNoncurrentTime,omitempty"` - - // IsLive: Relevant only for versioned objects. If the value is true, - // this condition matches live objects; if the value is false, it - // matches archived objects. + // IsLive: Relevant only for versioned objects. If the value is true, this + // condition matches live objects; if the value is false, it matches archived + // objects. IsLive *bool `json:"isLive,omitempty"` - - // MatchesPattern: A regular expression that satisfies the RE2 syntax. - // This condition is satisfied when the name of the object matches the - // RE2 pattern. Note: This feature is currently in the "Early Access" - // launch stage and is only available to a whitelisted set of users; - // that means that this feature may be changed in backward-incompatible - // ways and that it is not guaranteed to be released. + // MatchesPattern: A regular expression that satisfies the RE2 syntax. This + // condition is satisfied when the name of the object matches the RE2 pattern. + // Note: This feature is currently in the "Early Access" launch stage and is + // only available to a whitelisted set of users; that means that this feature + // may be changed in backward-incompatible ways and that it is not guaranteed + // to be released. MatchesPattern string `json:"matchesPattern,omitempty"` - // MatchesPrefix: List of object name prefixes. This condition will be - // satisfied when at least one of the prefixes exactly matches the - // beginning of the object name. + // satisfied when at least one of the prefixes exactly matches the beginning of + // the object name. MatchesPrefix []string `json:"matchesPrefix,omitempty"` - - // MatchesStorageClass: Objects having any of the storage classes - // specified by this condition will be matched. Values include - // MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and - // DURABLE_REDUCED_AVAILABILITY. + // MatchesStorageClass: Objects having any of the storage classes specified by + // this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, + // NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. MatchesStorageClass []string `json:"matchesStorageClass,omitempty"` - // MatchesSuffix: List of object name suffixes. This condition will be - // satisfied when at least one of the suffixes exactly matches the end - // of the object name. + // satisfied when at least one of the suffixes exactly matches the end of the + // object name. MatchesSuffix []string `json:"matchesSuffix,omitempty"` - - // NoncurrentTimeBefore: A date in RFC 3339 format with only the date - // part (for instance, "2013-01-15"). This condition is satisfied when - // the noncurrent time on an object is before this date in UTC. This - // condition is relevant only for versioned objects. + // NoncurrentTimeBefore: A date in RFC 3339 format with only the date part (for + // instance, "2013-01-15"). This condition is satisfied when the noncurrent + // time on an object is before this date in UTC. This condition is relevant + // only for versioned objects. NoncurrentTimeBefore string `json:"noncurrentTimeBefore,omitempty"` - - // NumNewerVersions: Relevant only for versioned objects. If the value - // is N, this condition is satisfied when there are at least N versions - // (including the live version) newer than this version of the object. + // NumNewerVersions: Relevant only for versioned objects. If the value is N, + // this condition is satisfied when there are at least N versions (including + // the live version) newer than this version of the object. NumNewerVersions int64 `json:"numNewerVersions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Age") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Age") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Age") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Age") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketLifecycleRuleCondition) MarshalJSON() ([]byte, error) { type NoMethod BucketLifecycleRuleCondition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketLogging: The bucket's logging configuration, which defines the -// destination bucket and optional name prefix for the current bucket's -// logs. +// destination bucket and optional name prefix for the current bucket's logs. type BucketLogging struct { - // LogBucket: The destination bucket where the current bucket's logs - // should be placed. + // LogBucket: The destination bucket where the current bucket's logs should be + // placed. LogBucket string `json:"logBucket,omitempty"` - // LogObjectPrefix: A prefix for log object names. LogObjectPrefix string `json:"logObjectPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogBucket") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LogBucket") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LogBucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketLogging) MarshalJSON() ([]byte, error) { type NoMethod BucketLogging - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketObjectRetention: The bucket's object retention config. type BucketObjectRetention struct { // Mode: The bucket's object retention mode. Can be Enabled. Mode string `json:"mode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Mode") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Mode") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketObjectRetention) MarshalJSON() ([]byte, error) { type NoMethod BucketObjectRetention - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketOwner: The owner of the bucket. This is always the project -// team's owner group. +// BucketOwner: The owner of the bucket. This is always the project team's +// owner group. type BucketOwner struct { // Entity: The entity, in the form project-owner-projectId. Entity string `json:"entity,omitempty"` - // EntityId: The ID for the entity. EntityId string `json:"entityId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Entity") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entity") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketOwner) MarshalJSON() ([]byte, error) { type NoMethod BucketOwner - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BucketRetentionPolicy: 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 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 + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// BucketRetentionPolicy: 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 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. type BucketRetentionPolicy struct { - // EffectiveTime: Server-determined value that indicates the time from - // which policy was enforced and effective. This value is in RFC 3339 - // format. + // EffectiveTime: Server-determined value that indicates the time from which + // policy was enforced and effective. This value is in RFC 3339 format. EffectiveTime string `json:"effectiveTime,omitempty"` - // IsLocked: Once locked, an object retention policy cannot be modified. IsLocked bool `json:"isLocked,omitempty"` - - // RetentionPeriod: The duration in seconds that objects need to be - // retained. Retention 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. + // RetentionPeriod: The duration in seconds that objects need to be retained. + // Retention 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. RetentionPeriod int64 `json:"retentionPeriod,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EffectiveTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EffectiveTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EffectiveTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketRetentionPolicy) MarshalJSON() ([]byte, error) { type NoMethod BucketRetentionPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketSoftDeletePolicy: The bucket's soft delete policy, which -// defines the period of time that soft-deleted objects will be -// retained, and cannot be permanently deleted. +// BucketSoftDeletePolicy: The bucket's soft delete policy, which defines the +// period of time that soft-deleted objects will be retained, and cannot be +// permanently deleted. type BucketSoftDeletePolicy struct { - // EffectiveTime: Server-determined value that indicates the time from - // which the policy, or one with a greater retention, was effective. - // This value is in RFC 3339 format. + // EffectiveTime: Server-determined value that indicates the time from which + // the policy, or one with a greater retention, was effective. This value is in + // RFC 3339 format. EffectiveTime string `json:"effectiveTime,omitempty"` - - // RetentionDurationSeconds: The duration in seconds that soft-deleted - // objects in the bucket will be retained and cannot be permanently - // deleted. + // RetentionDurationSeconds: The duration in seconds that soft-deleted objects + // in the bucket will be retained and cannot be permanently deleted. RetentionDurationSeconds int64 `json:"retentionDurationSeconds,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EffectiveTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EffectiveTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EffectiveTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketSoftDeletePolicy) MarshalJSON() ([]byte, error) { type NoMethod BucketSoftDeletePolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketVersioning: The bucket's versioning configuration. type BucketVersioning struct { - // Enabled: While set to true, versioning is fully enabled for this - // bucket. + // Enabled: While set to true, versioning is fully enabled for this bucket. Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketVersioning) MarshalJSON() ([]byte, error) { type NoMethod BucketVersioning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketWebsite: The bucket's website configuration, controlling how -// the service behaves when accessing bucket contents as a web site. See -// the Static Website Examples for more information. +// BucketWebsite: The bucket's website configuration, controlling how the +// service behaves when accessing bucket contents as a web site. See the Static +// Website Examples for more information. type BucketWebsite struct { - // MainPageSuffix: 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. + // MainPageSuffix: 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. MainPageSuffix string `json:"mainPageSuffix,omitempty"` - // NotFoundPage: 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 404 Not - // Found result. + // mainPageSuffix object is missing, if applicable, the service will return the + // named object from this bucket as the content for a 404 Not Found result. NotFoundPage string `json:"notFoundPage,omitempty"` - // ForceSendFields is a list of field names (e.g. "MainPageSuffix") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MainPageSuffix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "MainPageSuffix") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketWebsite) MarshalJSON() ([]byte, error) { type NoMethod BucketWebsite - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketAccessControl: An access-control entry. type BucketAccessControl struct { // Bucket: The name of the bucket. Bucket string `json:"bucket,omitempty"` - // Domain: The domain associated with the entity, if any. Domain string `json:"domain,omitempty"` - // Email: The email address associated with the entity, if any. Email string `json:"email,omitempty"` - - // Entity: The entity holding the permission, in one of the following - // forms: + // Entity: The entity holding the permission, in one of the following forms: // - user-userId // - user-email // - group-groupId @@ -1419,1363 +1170,1031 @@ type BucketAccessControl struct { // - To refer to all members of the Google Apps for Business domain // example.com, the entity would be domain-example.com. Entity string `json:"entity,omitempty"` - // EntityId: The ID for the entity, if any. EntityId string `json:"entityId,omitempty"` - // Etag: HTTP 1.1 Entity tag for the access-control entry. Etag string `json:"etag,omitempty"` - // Id: The ID of the access-control entry. Id string `json:"id,omitempty"` - - // Kind: The kind of item this is. For bucket access control entries, - // this is always storage#bucketAccessControl. + // Kind: The kind of item this is. For bucket access control entries, this is + // always storage#bucketAccessControl. Kind string `json:"kind,omitempty"` - // ProjectTeam: The project team associated with the entity, if any. ProjectTeam *BucketAccessControlProjectTeam `json:"projectTeam,omitempty"` - // Role: The access permission for the entity. Role string `json:"role,omitempty"` - // SelfLink: The link to this access-control entry. SelfLink string `json:"selfLink,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bucket") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketAccessControl) MarshalJSON() ([]byte, error) { type NoMethod BucketAccessControl - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// BucketAccessControlProjectTeam: The project team associated with the -// entity, if any. +// BucketAccessControlProjectTeam: The project team associated with the entity, +// if any. type BucketAccessControlProjectTeam struct { // ProjectNumber: The project number. ProjectNumber string `json:"projectNumber,omitempty"` - // Team: The team. Team string `json:"team,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectNumber") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProjectNumber") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ProjectNumber") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketAccessControlProjectTeam) MarshalJSON() ([]byte, error) { type NoMethod BucketAccessControlProjectTeam - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BucketAccessControls: An access-control list. type BucketAccessControls struct { // Items: The list of items. Items []*BucketAccessControl `json:"items,omitempty"` - - // Kind: The kind of item this is. For lists of bucket access control - // entries, this is always storage#bucketAccessControls. + // Kind: The kind of item this is. For lists of bucket access control entries, + // this is always storage#bucketAccessControls. Kind string `json:"kind,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BucketAccessControls) MarshalJSON() ([]byte, error) { type NoMethod BucketAccessControls - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Buckets: A list of buckets. type Buckets struct { // Items: The list of items. Items []*Bucket `json:"items,omitempty"` - // Kind: The kind of item this is. For lists of buckets, this is always // storage#buckets. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Buckets) MarshalJSON() ([]byte, error) { type NoMethod Buckets - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // BulkRestoreObjectsRequest: A bulk restore objects request. type BulkRestoreObjectsRequest struct { - // AllowOverwrite: If false (default), the restore will not overwrite - // live objects with the same name at the destination. This means some - // deleted objects may be skipped. If true, live objects will be - // overwritten resulting in a noncurrent object (if versioning is - // enabled). If versioning is not enabled, overwriting the object will - // result in a soft-deleted object. In either case, if a noncurrent - // object already exists with the same name, a live version can be - // written without issue. + // AllowOverwrite: If false (default), the restore will not overwrite live + // objects with the same name at the destination. This means some deleted + // objects may be skipped. If true, live objects will be overwritten resulting + // in a noncurrent object (if versioning is enabled). If versioning is not + // enabled, overwriting the object will result in a soft-deleted object. In + // either case, if a noncurrent object already exists with the same name, a + // live version can be written without issue. AllowOverwrite bool `json:"allowOverwrite,omitempty"` - - // CopySourceAcl: If true, copies the source object's ACL; otherwise, - // uses the bucket's default object ACL. The default is false. + // CopySourceAcl: If true, copies the source object's ACL; otherwise, uses the + // bucket's default object ACL. The default is false. CopySourceAcl bool `json:"copySourceAcl,omitempty"` - - // MatchGlobs: Restores only the objects matching any of the specified - // glob(s). If this parameter is not specified, all objects will be - // restored within the specified time range. + // MatchGlobs: Restores only the objects matching any of the specified glob(s). + // If this parameter is not specified, all objects will be restored within the + // specified time range. MatchGlobs []string `json:"matchGlobs,omitempty"` - - // SoftDeletedAfterTime: Restores only the objects that were - // soft-deleted after this time. + // SoftDeletedAfterTime: Restores only the objects that were soft-deleted after + // this time. SoftDeletedAfterTime string `json:"softDeletedAfterTime,omitempty"` - - // SoftDeletedBeforeTime: Restores only the objects that were - // soft-deleted before this time. + // SoftDeletedBeforeTime: Restores only the objects that were soft-deleted + // before this time. SoftDeletedBeforeTime string `json:"softDeletedBeforeTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowOverwrite") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AllowOverwrite") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AllowOverwrite") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *BulkRestoreObjectsRequest) MarshalJSON() ([]byte, error) { type NoMethod BulkRestoreObjectsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Channel: An notification channel used to watch for resource changes. type Channel struct { - // Address: The address where notifications are delivered for this - // channel. + // Address: The address where notifications are delivered for this channel. Address string `json:"address,omitempty"` - - // Expiration: Date and time of notification channel expiration, - // expressed as a Unix timestamp, in milliseconds. Optional. + // Expiration: Date and time of notification channel expiration, expressed as a + // Unix timestamp, in milliseconds. Optional. Expiration int64 `json:"expiration,omitempty,string"` - // Id: A UUID or similar unique string that identifies this channel. Id string `json:"id,omitempty"` - - // Kind: Identifies this as a notification channel used to watch for - // changes to a resource, which is "api#channel". + // Kind: Identifies this as a notification channel used to watch for changes to + // a resource, which is "api#channel". Kind string `json:"kind,omitempty"` - // Params: Additional parameters controlling delivery channel behavior. // Optional. Params map[string]string `json:"params,omitempty"` - - // Payload: A Boolean value to indicate whether payload is wanted. - // Optional. + // Payload: A Boolean value to indicate whether payload is wanted. Optional. Payload bool `json:"payload,omitempty"` - - // ResourceId: An opaque ID that identifies the resource being watched - // on this channel. Stable across different API versions. + // ResourceId: An opaque ID that identifies the resource being watched on this + // channel. Stable across different API versions. ResourceId string `json:"resourceId,omitempty"` - // ResourceUri: A version-specific identifier for the watched resource. ResourceUri string `json:"resourceUri,omitempty"` - // Token: An arbitrary string delivered to the target address with each // notification delivered over this channel. Optional. Token string `json:"token,omitempty"` - // Type: The type of delivery mechanism used for this channel. Type string `json:"type,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Channel) MarshalJSON() ([]byte, error) { type NoMethod Channel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ComposeRequest: A Compose request. type ComposeRequest struct { // Destination: Properties of the resulting object. Destination *Object `json:"destination,omitempty"` - // Kind: The kind of item this is. Kind string `json:"kind,omitempty"` - - // SourceObjects: The list of source objects that will be concatenated - // into a single object. + // SourceObjects: The list of source objects that will be concatenated into a + // single object. SourceObjects []*ComposeRequestSourceObjects `json:"sourceObjects,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Destination") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Destination") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ComposeRequest) MarshalJSON() ([]byte, error) { type NoMethod ComposeRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type ComposeRequestSourceObjects struct { // Generation: The generation of this object to use as the source. Generation int64 `json:"generation,omitempty,string"` - - // Name: The source object's name. All source objects must reside in the - // same bucket. + // Name: The source object's name. All source objects must reside in the same + // bucket. Name string `json:"name,omitempty"` - - // ObjectPreconditions: Conditions that must be met for this operation - // to execute. + // ObjectPreconditions: Conditions that must be met for this operation to + // execute. ObjectPreconditions *ComposeRequestSourceObjectsObjectPreconditions `json:"objectPreconditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Generation") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Generation") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Generation") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ComposeRequestSourceObjects) MarshalJSON() ([]byte, error) { type NoMethod ComposeRequestSourceObjects - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ComposeRequestSourceObjectsObjectPreconditions: Conditions that must -// be met for this operation to execute. +// ComposeRequestSourceObjectsObjectPreconditions: Conditions that must be met +// for this operation to execute. type ComposeRequestSourceObjectsObjectPreconditions struct { - // IfGenerationMatch: 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. + // IfGenerationMatch: 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. IfGenerationMatch int64 `json:"ifGenerationMatch,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "IfGenerationMatch") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "IfGenerationMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IfGenerationMatch") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "IfGenerationMatch") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON() ([]byte, error) { type NoMethod ComposeRequestSourceObjectsObjectPreconditions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Expr: Represents an expression text. Example: title: "User account -// presence" description: "Determines whether the request has a user -// account" expression: "size(request.user) > 0" +// Expr: Represents an expression text. Example: title: "User account presence" +// description: "Determines whether the request has a user account" expression: +// "size(request.user) > 0" type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. + // Description: An optional description of the expression. This is a longer + // text which describes the expression, e.g. when hovered over it in a UI. Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax. The application context of the containing - // message determines which well-known feature set of CEL is supported. + // Expression: Textual representation of an expression in Common Expression + // Language syntax. The application context of the containing message + // determines which well-known feature set of CEL is supported. Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error reporting, e.g. a file name and a position in - // the file. + // Location: An optional string indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. + // Title: An optional title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Expr) MarshalJSON() ([]byte, error) { type NoMethod Expr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// Folder: A folder. Only available in buckets with hierarchical -// namespace enabled. +// Folder: A folder. Only available in buckets with hierarchical namespace +// enabled. type Folder struct { // Bucket: The name of the bucket containing this folder. Bucket string `json:"bucket,omitempty"` - // CreateTime: The creation time of the folder in RFC 3339 format. CreateTime string `json:"createTime,omitempty"` - // Id: The ID of the folder, including the bucket name, folder name. Id string `json:"id,omitempty"` - - // Kind: The kind of item this is. For folders, this is always - // storage#folder. + // Kind: The kind of item this is. For folders, this is always storage#folder. Kind string `json:"kind,omitempty"` - // Metageneration: The version of the metadata for this folder. Used for // preconditions and for detecting changes in metadata. Metageneration int64 `json:"metageneration,omitempty,string"` - - // Name: The name of the folder. Required if not specified by URL - // parameter. + // Name: The name of the folder. Required if not specified by URL parameter. Name string `json:"name,omitempty"` - - // PendingRenameInfo: Only present if the folder is part of an ongoing - // rename folder operation. Contains information which can be used to - // query the operation status. + // PendingRenameInfo: Only present if the folder is part of an ongoing rename + // folder operation. Contains information which can be used to query the + // operation status. PendingRenameInfo *FolderPendingRenameInfo `json:"pendingRenameInfo,omitempty"` - // SelfLink: The link to this folder. SelfLink string `json:"selfLink,omitempty"` - - // UpdateTime: The modification time of the folder metadata in RFC 3339 - // format. + // UpdateTime: The modification time of the folder metadata in RFC 3339 format. UpdateTime string `json:"updateTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bucket") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Folder) MarshalJSON() ([]byte, error) { type NoMethod Folder - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// FolderPendingRenameInfo: Only present if the folder is part of an -// ongoing rename folder operation. Contains information which can be -// used to query the operation status. +// FolderPendingRenameInfo: Only present if the folder is part of an ongoing +// rename folder operation. Contains information which can be used to query the +// operation status. type FolderPendingRenameInfo struct { // OperationId: The ID of the rename folder operation. OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "OperationId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "OperationId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *FolderPendingRenameInfo) MarshalJSON() ([]byte, error) { type NoMethod FolderPendingRenameInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Folders: A list of folders. type Folders struct { // Items: The list of items. Items []*Folder `json:"items,omitempty"` - // Kind: The kind of item this is. For lists of folders, this is always // storage#folders. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Folders) MarshalJSON() ([]byte, error) { type NoMethod Folders - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // GoogleLongrunningListOperationsResponse: The response message for // storage.buckets.operations.list. type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. + // Operations: A list of operations that matches the specified filter in the + // request. Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { type NoMethod GoogleLongrunningListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // GoogleLongrunningOperation: This resource represents a long-running // operation that is the result of a network API call. type GoogleLongrunningOperation struct { - // Done: If the value is "false", it means the operation is still in - // progress. If "true", the operation is completed, and either "error" - // or "response" is available. + // Done: If the value is "false", it means the operation is still in progress. + // If "true", the operation is completed, and either "error" or "response" is + // available. Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. + // Error: The error result of the operation in case of failure or cancellation. Error *GoogleRpcStatus `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the "name" should be a resource name ending with - // "operations/{operationId}". + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the "name" + // should be a resource name ending with "operations/{operationId}". Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as "Delete", the - // response is google.protobuf.Empty. If the original method is standard - // Get/Create/Update, the response should be the resource. For other - // methods, the response should have the type "XxxResponse", where "Xxx" - // is the original method name. For example, if the original method name - // is "TakeSnapshot()", the inferred response type is - // "TakeSnapshotResponse". + // Response: The normal response of the operation in case of success. If the + // original method returns no data on success, such as "Delete", the response + // is google.protobuf.Empty. If the original method is standard + // Get/Create/Update, the response should be the resource. For other methods, + // the response should have the type "XxxResponse", where "Xxx" is the original + // method name. For example, if the original method name is "TakeSnapshot()", + // the inferred response type is "TakeSnapshotResponse". Response googleapi.RawMessage `json:"response,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { type NoMethod GoogleLongrunningOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleRpcStatus: The "Status" type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// "Status" message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). +// GoogleRpcStatus: The "Status" type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each "Status" message +// contains three pieces of data: error code, error message, and error details. +// You can find out more about this error model and how to work with it in the +// API Design Guide (https://cloud.google.com/apis/design/errors). type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. + // Code: The status code, which should be an enum value of google.rpc.Code. Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. + // Message: A developer-facing error message, which should be in English. Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HmacKey: JSON template to produce a JSON-style HMAC Key resource for -// Create responses. +// HmacKey: JSON template to produce a JSON-style HMAC Key resource for Create +// responses. type HmacKey struct { // Kind: The kind of item this is. For HMAC keys, this is always // storage#hmacKey. Kind string `json:"kind,omitempty"` - // Metadata: Key metadata. Metadata *HmacKeyMetadata `json:"metadata,omitempty"` - // Secret: HMAC secret key material. Secret string `json:"secret,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *HmacKey) MarshalJSON() ([]byte, error) { type NoMethod HmacKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HmacKeyMetadata: JSON template to produce a JSON-style HMAC Key -// metadata resource. +// HmacKeyMetadata: JSON template to produce a JSON-style HMAC Key metadata +// resource. type HmacKeyMetadata struct { // AccessId: The ID of the HMAC Key. AccessId string `json:"accessId,omitempty"` - // Etag: HTTP 1.1 Entity tag for the HMAC key. Etag string `json:"etag,omitempty"` - - // Id: The ID of the HMAC key, including the Project ID and the Access - // ID. + // Id: The ID of the HMAC key, including the Project ID and the Access ID. Id string `json:"id,omitempty"` - // Kind: The kind of item this is. For HMAC Key metadata, this is always // storage#hmacKeyMetadata. Kind string `json:"kind,omitempty"` - // ProjectId: Project ID owning the service account to which the key // authenticates. ProjectId string `json:"projectId,omitempty"` - // SelfLink: The link to this resource. SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccountEmail: The email address of the key's associated - // service account. + // ServiceAccountEmail: The email address of the key's associated service + // account. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` - - // State: The state of the key. Can be one of ACTIVE, INACTIVE, or - // DELETED. + // State: The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. State string `json:"state,omitempty"` - // TimeCreated: The creation time of the HMAC key in RFC 3339 format. TimeCreated string `json:"timeCreated,omitempty"` - - // Updated: The last modification time of the HMAC key metadata in RFC - // 3339 format. + // Updated: The last modification time of the HMAC key metadata in RFC 3339 + // format. Updated string `json:"updated,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AccessId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *HmacKeyMetadata) MarshalJSON() ([]byte, error) { type NoMethod HmacKeyMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // HmacKeysMetadata: A list of hmacKeys. type HmacKeysMetadata struct { // Items: The list of items. Items []*HmacKeyMetadata `json:"items,omitempty"` - // Kind: The kind of item this is. For lists of hmacKeys, this is always // storage#hmacKeysMetadata. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *HmacKeysMetadata) MarshalJSON() ([]byte, error) { type NoMethod HmacKeysMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ManagedFolder: A managed folder. type ManagedFolder struct { // Bucket: The name of the bucket containing this managed folder. Bucket string `json:"bucket,omitempty"` - - // CreateTime: The creation time of the managed folder in RFC 3339 - // format. + // CreateTime: The creation time of the managed folder in RFC 3339 format. CreateTime string `json:"createTime,omitempty"` - - // Id: The ID of the managed folder, including the bucket name and - // managed folder name. + // Id: The ID of the managed folder, including the bucket name and managed + // folder name. Id string `json:"id,omitempty"` - // Kind: The kind of item this is. For managed folders, this is always // storage#managedFolder. Kind string `json:"kind,omitempty"` - - // Metageneration: The version of the metadata for this managed folder. - // Used for preconditions and for detecting changes in metadata. + // Metageneration: The version of the metadata for this managed folder. Used + // for preconditions and for detecting changes in metadata. Metageneration int64 `json:"metageneration,omitempty,string"` - - // Name: The name of the managed folder. Required if not specified by - // URL parameter. + // Name: The name of the managed folder. Required if not specified by URL + // parameter. Name string `json:"name,omitempty"` - // SelfLink: The link to this managed folder. SelfLink string `json:"selfLink,omitempty"` - - // UpdateTime: The last update time of the managed folder metadata in - // RFC 3339 format. + // UpdateTime: The last update time of the managed folder metadata in RFC 3339 + // format. UpdateTime string `json:"updateTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bucket") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ManagedFolder) MarshalJSON() ([]byte, error) { type NoMethod ManagedFolder - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ManagedFolders: A list of managed folders. type ManagedFolders struct { // Items: The list of items. Items []*ManagedFolder `json:"items,omitempty"` - - // Kind: The kind of item this is. For lists of managed folders, this is - // always storage#managedFolders. + // Kind: The kind of item this is. For lists of managed folders, this is always + // storage#managedFolders. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ManagedFolders) MarshalJSON() ([]byte, error) { type NoMethod ManagedFolders - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Notification: A subscription to receive Google PubSub notifications. type Notification struct { - // CustomAttributes: An optional list of additional attributes to attach - // to each Cloud PubSub message published for this notification - // subscription. + // CustomAttributes: An optional list of additional attributes to attach to + // each Cloud PubSub message published for this notification subscription. CustomAttributes map[string]string `json:"custom_attributes,omitempty"` - // Etag: HTTP 1.1 Entity tag for this subscription notification. Etag string `json:"etag,omitempty"` - - // EventTypes: If present, only send notifications about listed event - // types. If empty, sent notifications for all event types. + // EventTypes: If present, only send notifications about listed event types. If + // empty, sent notifications for all event types. EventTypes []string `json:"event_types,omitempty"` - // Id: The ID of the notification. Id string `json:"id,omitempty"` - // Kind: The kind of item this is. For notifications, this is always // storage#notification. Kind string `json:"kind,omitempty"` - - // ObjectNamePrefix: If present, only apply this notification - // configuration to object names that begin with this prefix. + // ObjectNamePrefix: If present, only apply this notification configuration to + // object names that begin with this prefix. ObjectNamePrefix string `json:"object_name_prefix,omitempty"` - // PayloadFormat: The desired content of the Payload. PayloadFormat string `json:"payload_format,omitempty"` - // SelfLink: The canonical URL of this notification. SelfLink string `json:"selfLink,omitempty"` - // Topic: The Cloud PubSub topic to which this subscription publishes. // Formatted as: - // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topi - // c}' + // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' Topic string `json:"topic,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CustomAttributes") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CustomAttributes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CustomAttributes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Notification) MarshalJSON() ([]byte, error) { type NoMethod Notification - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Notifications: A list of notification subscriptions. type Notifications struct { // Items: The list of items. Items []*Notification `json:"items,omitempty"` - - // Kind: The kind of item this is. For lists of notifications, this is - // always storage#notifications. + // Kind: The kind of item this is. For lists of notifications, this is always + // storage#notifications. Kind string `json:"kind,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Notifications) MarshalJSON() ([]byte, error) { type NoMethod Notifications - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Object: An object. type Object struct { // Acl: Access controls on the object. Acl []*ObjectAccessControl `json:"acl,omitempty"` - // Bucket: The name of the bucket containing this object. Bucket string `json:"bucket,omitempty"` - - // CacheControl: Cache-Control directive for the object data. If - // omitted, and the object is accessible to all anonymous users, the - // default will be public, max-age=3600. + // CacheControl: Cache-Control directive for the object data. If omitted, and + // the object is accessible to all anonymous users, the default will be public, + // max-age=3600. CacheControl string `json:"cacheControl,omitempty"` - - // ComponentCount: Number of underlying components that make up this - // object. Components are accumulated by compose operations. + // ComponentCount: Number of underlying components that make up this object. + // Components are accumulated by compose operations. ComponentCount int64 `json:"componentCount,omitempty"` - // ContentDisposition: Content-Disposition of the object data. ContentDisposition string `json:"contentDisposition,omitempty"` - // ContentEncoding: Content-Encoding of the object data. ContentEncoding string `json:"contentEncoding,omitempty"` - // ContentLanguage: Content-Language of the object data. ContentLanguage string `json:"contentLanguage,omitempty"` - - // ContentType: Content-Type of the object data. If an object is stored - // without a Content-Type, it is served as application/octet-stream. + // ContentType: Content-Type of the object data. If an object is stored without + // a Content-Type, it is served as application/octet-stream. ContentType string `json:"contentType,omitempty"` - - // Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B; - // encoded using base64 in big-endian byte order. For more information - // about using the CRC32c checksum, see Hashes and ETags: Best - // Practices. + // Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B; encoded using + // base64 in big-endian byte order. For more information about using the CRC32c + // checksum, see Hashes and ETags: Best Practices. Crc32c string `json:"crc32c,omitempty"` - - // CustomTime: A timestamp in RFC 3339 format specified by the user for - // an object. + // CustomTime: A timestamp in RFC 3339 format specified by the user for an + // object. CustomTime string `json:"customTime,omitempty"` - - // CustomerEncryption: Metadata of customer-supplied encryption key, if - // the object is encrypted by such a key. + // CustomerEncryption: Metadata of customer-supplied encryption key, if the + // object is encrypted by such a key. CustomerEncryption *ObjectCustomerEncryption `json:"customerEncryption,omitempty"` - // Etag: HTTP 1.1 Entity tag for the object. Etag string `json:"etag,omitempty"` - - // EventBasedHold: Whether an object is under event-based hold. - // Event-based hold is a way to retain objects until an event occurs, - // which is signified by the hold's release (i.e. this value is set to - // false). After being released (set to false), 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 least 3 years - // after loan is paid in full. Here, bucket-level retention is 3 years - // and the event is the loan being paid in full. In this example, these - // objects will be 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. + // EventBasedHold: Whether an object is under event-based hold. Event-based + // hold is a way to retain objects until an event occurs, which is signified by + // the hold's release (i.e. this value is set to false). After being released + // (set to false), 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 least 3 years after loan is paid in full. Here, bucket-level + // retention is 3 years and the event is the loan being paid in full. In this + // example, these objects will be 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. EventBasedHold bool `json:"eventBasedHold,omitempty"` - // Generation: The content generation of this object. Used for object // versioning. Generation int64 `json:"generation,omitempty,string"` - - // HardDeleteTime: This is the time (in the future) when the - // soft-deleted object will no longer be restorable. It is equal to the - // soft delete time plus the current soft delete retention duration of - // the bucket. + // HardDeleteTime: This is the time (in the future) when the soft-deleted + // object will no longer be restorable. It is equal to the soft delete time + // plus the current soft delete retention duration of the bucket. HardDeleteTime string `json:"hardDeleteTime,omitempty"` - // Id: The ID of the object, including the bucket name, object name, and // generation number. Id string `json:"id,omitempty"` - - // Kind: The kind of item this is. For objects, this is always - // storage#object. + // Kind: The kind of item this is. For objects, this is always storage#object. Kind string `json:"kind,omitempty"` - - // KmsKeyName: Not currently supported. Specifying the parameter causes - // the request to fail with status code 400 - Bad Request. + // KmsKeyName: Not currently supported. Specifying the parameter causes the + // request to fail with status code 400 - Bad Request. KmsKeyName string `json:"kmsKeyName,omitempty"` - - // Md5Hash: MD5 hash of the data; encoded using base64. For more - // information about using the MD5 hash, see Hashes and ETags: Best - // Practices. + // Md5Hash: MD5 hash of the data; encoded using base64. For more information + // about using the MD5 hash, see Hashes and ETags: Best Practices. Md5Hash string `json:"md5Hash,omitempty"` - // MediaLink: Media download link. MediaLink string `json:"mediaLink,omitempty"` - // Metadata: User-provided metadata, in key/value pairs. Metadata map[string]string `json:"metadata,omitempty"` - // Metageneration: The version of the metadata for this object at this - // generation. Used for preconditions and for detecting changes in - // metadata. A metageneration number is only meaningful in the context - // of a particular generation of a particular object. + // generation. Used for preconditions and for detecting changes in metadata. A + // metageneration number is only meaningful in the context of a particular + // generation of a particular object. Metageneration int64 `json:"metageneration,omitempty,string"` - - // Name: The name of the object. Required if not specified by URL - // parameter. + // Name: The name of the object. Required if not specified by URL parameter. Name string `json:"name,omitempty"` - - // Owner: The owner of the object. This will always be the uploader of - // the object. + // Owner: The owner of the object. This will always be the uploader of the + // object. Owner *ObjectOwner `json:"owner,omitempty"` - // Retention: A collection of object level retention parameters. Retention *ObjectRetention `json:"retention,omitempty"` - // RetentionExpirationTime: A server-determined value that specifies the - // earliest time that the object's retention period expires. This value - // is in RFC 3339 format. Note 1: This field is not provided for objects - // with an active event-based hold, since retention expiration is - // unknown until the hold is removed. Note 2: This value can be provided - // even when temporary hold is set (so that the user can reason about - // policy without having to first unset the temporary hold). + // earliest time that the object's retention period expires. This value is in + // RFC 3339 format. Note 1: This field is not provided for objects with an + // active event-based hold, since retention expiration is unknown until the + // hold is removed. Note 2: This value can be provided even when temporary hold + // is set (so that the user can reason about policy without having to first + // unset the temporary hold). RetentionExpirationTime string `json:"retentionExpirationTime,omitempty"` - // SelfLink: The link to this object. SelfLink string `json:"selfLink,omitempty"` - // Size: Content-Length of the data in bytes. Size uint64 `json:"size,omitempty,string"` - - // SoftDeleteTime: The time at which the object became soft-deleted in - // RFC 3339 format. + // SoftDeleteTime: The time at which the object became soft-deleted in RFC 3339 + // format. SoftDeleteTime string `json:"softDeleteTime,omitempty"` - // StorageClass: Storage class of the object. StorageClass string `json:"storageClass,omitempty"` - - // TemporaryHold: Whether an object is under temporary hold. While this - // flag is set to true, the object is protected against deletion and - // overwrites. A common use case of this flag is regulatory - // investigations where objects need to be retained while the - // investigation is ongoing. Note that unlike event-based hold, - // temporary hold does not impact retention expiration time of an - // object. + // TemporaryHold: Whether an object is under temporary hold. While this flag is + // set to true, the object is protected against deletion and overwrites. A + // common use case of this flag is regulatory investigations where objects need + // to be retained while the investigation is ongoing. Note that unlike + // event-based hold, temporary hold does not impact retention expiration time + // of an object. TemporaryHold bool `json:"temporaryHold,omitempty"` - // TimeCreated: The creation time of the object in RFC 3339 format. TimeCreated string `json:"timeCreated,omitempty"` - - // TimeDeleted: The time at which the object became noncurrent in RFC - // 3339 format. Will be returned if and only if this version of the - // object has been deleted. + // TimeDeleted: The time at which the object became noncurrent in RFC 3339 + // format. Will be returned if and only if this version of the object has been + // deleted. TimeDeleted string `json:"timeDeleted,omitempty"` - - // TimeStorageClassUpdated: The time at which the object's storage class - // was last changed. When the object is initially created, it will be - // set to timeCreated. + // TimeStorageClassUpdated: The time at which the object's storage class was + // last changed. When the object is initially created, it will be set to + // timeCreated. TimeStorageClassUpdated string `json:"timeStorageClassUpdated,omitempty"` - - // Updated: The modification time of the object metadata in RFC 3339 - // format. Set initially to object creation time and then updated - // whenever any metadata of the object changes. This includes changes - // made by a requester, such as modifying custom metadata, as well as - // changes made by Cloud Storage on behalf of a requester, such as - // changing the storage class based on an Object Lifecycle - // Configuration. + // Updated: The modification time of the object metadata in RFC 3339 format. + // Set initially to object creation time and then updated whenever any metadata + // of the object changes. This includes changes made by a requester, such as + // modifying custom metadata, as well as changes made by Cloud Storage on + // behalf of a requester, such as changing the storage class based on an Object + // Lifecycle Configuration. Updated string `json:"updated,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Acl") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Acl") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Acl") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Acl") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Object) MarshalJSON() ([]byte, error) { type NoMethod Object - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ObjectCustomerEncryption: Metadata of customer-supplied encryption -// key, if the object is encrypted by such a key. +// ObjectCustomerEncryption: Metadata of customer-supplied encryption key, if +// the object is encrypted by such a key. type ObjectCustomerEncryption struct { // EncryptionAlgorithm: The encryption algorithm. EncryptionAlgorithm string `json:"encryptionAlgorithm,omitempty"` - // KeySha256: SHA256 hash value of the encryption key. KeySha256 string `json:"keySha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EncryptionAlgorithm") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "EncryptionAlgorithm") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EncryptionAlgorithm") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "EncryptionAlgorithm") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectCustomerEncryption) MarshalJSON() ([]byte, error) { type NoMethod ObjectCustomerEncryption - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ObjectOwner: The owner of the object. This will always be the -// uploader of the object. +// ObjectOwner: The owner of the object. This will always be the uploader of +// the object. type ObjectOwner struct { // Entity: The entity, in the form user-userId. Entity string `json:"entity,omitempty"` - // EntityId: The ID for the entity. EntityId string `json:"entityId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Entity") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entity") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectOwner) MarshalJSON() ([]byte, error) { type NoMethod ObjectOwner - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ObjectRetention: A collection of object level retention parameters. type ObjectRetention struct { - // Mode: The bucket's object retention mode, can only be Unlocked or - // Locked. + // Mode: The bucket's object retention mode, can only be Unlocked or Locked. Mode string `json:"mode,omitempty"` - - // RetainUntilTime: A time in RFC 3339 format until which object - // retention protects this object. + // RetainUntilTime: A time in RFC 3339 format until which object retention + // protects this object. RetainUntilTime string `json:"retainUntilTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Mode") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Mode") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectRetention) MarshalJSON() ([]byte, error) { type NoMethod ObjectRetention - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ObjectAccessControl: An access-control entry. type ObjectAccessControl struct { // Bucket: The name of the bucket. Bucket string `json:"bucket,omitempty"` - // Domain: The domain associated with the entity, if any. Domain string `json:"domain,omitempty"` - // Email: The email address associated with the entity, if any. Email string `json:"email,omitempty"` - - // Entity: The entity holding the permission, in one of the following - // forms: + // Entity: The entity holding the permission, in one of the following forms: // - user-userId // - user-email // - group-groupId @@ -2790,174 +2209,132 @@ type ObjectAccessControl struct { // - To refer to all members of the Google Apps for Business domain // example.com, the entity would be domain-example.com. Entity string `json:"entity,omitempty"` - // EntityId: The ID for the entity, if any. EntityId string `json:"entityId,omitempty"` - // Etag: HTTP 1.1 Entity tag for the access-control entry. Etag string `json:"etag,omitempty"` - - // Generation: The content generation of the object, if applied to an - // object. + // Generation: The content generation of the object, if applied to an object. Generation int64 `json:"generation,omitempty,string"` - // Id: The ID of the access-control entry. Id string `json:"id,omitempty"` - - // Kind: The kind of item this is. For object access control entries, - // this is always storage#objectAccessControl. + // Kind: The kind of item this is. For object access control entries, this is + // always storage#objectAccessControl. Kind string `json:"kind,omitempty"` - // Object: The name of the object, if applied to an object. Object string `json:"object,omitempty"` - // ProjectTeam: The project team associated with the entity, if any. ProjectTeam *ObjectAccessControlProjectTeam `json:"projectTeam,omitempty"` - // Role: The access permission for the entity. Role string `json:"role,omitempty"` - // SelfLink: The link to this access-control entry. SelfLink string `json:"selfLink,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bucket") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bucket") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectAccessControl) MarshalJSON() ([]byte, error) { type NoMethod ObjectAccessControl - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ObjectAccessControlProjectTeam: The project team associated with the -// entity, if any. +// ObjectAccessControlProjectTeam: The project team associated with the entity, +// if any. type ObjectAccessControlProjectTeam struct { // ProjectNumber: The project number. ProjectNumber string `json:"projectNumber,omitempty"` - // Team: The team. Team string `json:"team,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectNumber") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProjectNumber") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ProjectNumber") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectAccessControlProjectTeam) MarshalJSON() ([]byte, error) { type NoMethod ObjectAccessControlProjectTeam - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // ObjectAccessControls: An access-control list. type ObjectAccessControls struct { // Items: The list of items. Items []*ObjectAccessControl `json:"items,omitempty"` - - // Kind: The kind of item this is. For lists of object access control - // entries, this is always storage#objectAccessControls. + // Kind: The kind of item this is. For lists of object access control entries, + // this is always storage#objectAccessControls. Kind string `json:"kind,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ObjectAccessControls) MarshalJSON() ([]byte, error) { type NoMethod ObjectAccessControls - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Objects: A list of objects. type Objects struct { // Items: The list of items. Items []*Object `json:"items,omitempty"` - // Kind: The kind of item this is. For lists of objects, this is always // storage#objects. Kind string `json:"kind,omitempty"` - - // NextPageToken: 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: 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 `json:"nextPageToken,omitempty"` - - // Prefixes: The list of prefixes of objects matching-but-not-listed up - // to and including the requested delimiter. + // Prefixes: The list of prefixes of objects matching-but-not-listed up to and + // including the requested delimiter. Prefixes []string `json:"prefixes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Objects) MarshalJSON() ([]byte, error) { type NoMethod Objects - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // Policy: A bucket/object/managedFolder IAM policy. @@ -2965,231 +2342,182 @@ type Policy struct { // Bindings: An association between a role, which comes with a set of // permissions, and members who may assume that role. Bindings []*PolicyBindings `json:"bindings,omitempty"` - // Etag: HTTP 1.1 Entity tag for the policy. Etag string `json:"etag,omitempty"` - - // Kind: The kind of item this is. For policies, this is always - // storage#policy. This field is ignored on input. + // Kind: The kind of item this is. For policies, this is always storage#policy. + // This field is ignored on input. Kind string `json:"kind,omitempty"` - - // ResourceId: The ID of the resource to which this policy belongs. Will - // be of the form projects/_/buckets/bucket for buckets, + // ResourceId: The ID of the resource to which this policy belongs. Will be of + // the form projects/_/buckets/bucket for buckets, // projects/_/buckets/bucket/objects/object for objects, and // projects/_/buckets/bucket/managedFolders/managedFolder. A specific - // generation may be specified by appending #generationNumber to the end - // of the object name, e.g. - // projects/_/buckets/my-bucket/objects/data.txt#17. The current - // generation can be denoted with #0. This field is ignored on input. + // generation may be specified by appending #generationNumber to the end of the + // object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The + // current generation can be denoted with #0. This field is ignored on input. ResourceId string `json:"resourceId,omitempty"` - // Version: The IAM policy format version. Version int64 `json:"version,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Bindings") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Bindings") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *Policy) MarshalJSON() ([]byte, error) { type NoMethod Policy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } type PolicyBindings struct { - // Condition: The condition that is associated with this binding. NOTE: - // an unsatisfied condition will not allow user access via current - // binding. Different bindings, including their conditions, are examined - // independently. + // Condition: The condition that is associated with this binding. NOTE: an + // unsatisfied condition will not allow user access via current binding. + // Different bindings, including their conditions, are examined independently. Condition *Expr `json:"condition,omitempty"` - - // Members: A collection of identifiers for members who may assume the - // provided role. Recognized identifiers are as follows: - // - allUsers — A special identifier that represents anyone on the - // internet; with or without a Google account. - // - allAuthenticatedUsers — A special identifier that represents - // anyone who is authenticated with a Google account or a service - // account. - // - user:emailid — An email address that represents a specific - // account. For example, user:alice@gmail.com or user:joe@example.com. - // - // - serviceAccount:emailid — An email address that represents a - // service account. For example, + // Members: A collection of identifiers for members who may assume the provided + // role. Recognized identifiers are as follows: + // - allUsers — A special identifier that represents anyone on the internet; + // with or without a Google account. + // - allAuthenticatedUsers — A special identifier that represents anyone who + // is authenticated with a Google account or a service account. + // - user:emailid — An email address that represents a specific account. For + // example, user:alice@gmail.com or user:joe@example.com. + // - serviceAccount:emailid — An email address that represents a service + // account. For example, // serviceAccount:my-other-app@appspot.gserviceaccount.com . - // - group:emailid — An email address that represents a Google group. - // For example, group:admins@example.com. - // - domain:domain — A Google Apps domain name that represents all the - // users of that domain. For example, domain:google.com or - // domain:example.com. - // - projectOwner:projectid — Owners of the given project. For - // example, projectOwner:my-example-project - // - projectEditor:projectid — Editors of the given project. For - // example, projectEditor:my-example-project - // - projectViewer:projectid — Viewers of the given project. For - // example, projectViewer:my-example-project + // - group:emailid — An email address that represents a Google group. For + // example, group:admins@example.com. + // - domain:domain — A Google Apps domain name that represents all the users + // of that domain. For example, domain:google.com or domain:example.com. + // - projectOwner:projectid — Owners of the given project. For example, + // projectOwner:my-example-project + // - projectEditor:projectid — Editors of the given project. For example, + // projectEditor:my-example-project + // - projectViewer:projectid — Viewers of the given project. For example, + // projectViewer:my-example-project Members []string `json:"members,omitempty"` - - // Role: The role to which members belong. Two types of roles are - // supported: new IAM roles, which grant permissions that do not map - // directly to those provided by ACLs, and legacy IAM roles, which do - // map directly to ACL permissions. All roles are of the format - // roles/storage.specificRole. + // Role: The role to which members belong. Two types of roles are supported: + // new IAM roles, which grant permissions that do not map directly to those + // provided by ACLs, and legacy IAM roles, which do map directly to ACL + // permissions. All roles are of the format roles/storage.specificRole. // The new IAM roles are: - // - roles/storage.admin — Full control of Google Cloud Storage - // resources. - // - roles/storage.objectViewer — Read-Only access to Google Cloud - // Storage objects. - // - roles/storage.objectCreator — Access to create objects in Google - // Cloud Storage. + // - roles/storage.admin — Full control of Google Cloud Storage resources. + // + // - roles/storage.objectViewer — Read-Only access to Google Cloud Storage + // objects. + // - roles/storage.objectCreator — Access to create objects in Google Cloud + // Storage. // - roles/storage.objectAdmin — Full control of Google Cloud Storage // objects. The legacy IAM roles are: - // - roles/storage.legacyObjectReader — Read-only access to objects - // without listing. Equivalent to an ACL entry on an object with the - // READER role. - // - roles/storage.legacyObjectOwner — Read/write access to existing - // objects without listing. Equivalent to an ACL entry on an object with - // the OWNER role. - // - roles/storage.legacyBucketReader — Read access to buckets with - // object listing. Equivalent to an ACL entry on a bucket with the - // READER role. - // - roles/storage.legacyBucketWriter — Read access to buckets with - // object listing/creation/deletion. Equivalent to an ACL entry on a - // bucket with the WRITER role. - // - roles/storage.legacyBucketOwner — Read and write access to - // existing buckets with object listing/creation/deletion. Equivalent to - // an ACL entry on a bucket with the OWNER role. + // - roles/storage.legacyObjectReader — Read-only access to objects without + // listing. Equivalent to an ACL entry on an object with the READER role. + // - roles/storage.legacyObjectOwner — Read/write access to existing objects + // without listing. Equivalent to an ACL entry on an object with the OWNER + // role. + // - roles/storage.legacyBucketReader — Read access to buckets with object + // listing. Equivalent to an ACL entry on a bucket with the READER role. + // - roles/storage.legacyBucketWriter — Read access to buckets with object + // listing/creation/deletion. Equivalent to an ACL entry on a bucket with the + // WRITER role. + // - roles/storage.legacyBucketOwner — Read and write access to existing + // buckets with object listing/creation/deletion. Equivalent to an ACL entry on + // a bucket with the OWNER role. Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *PolicyBindings) MarshalJSON() ([]byte, error) { type NoMethod PolicyBindings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // RewriteResponse: A rewrite response. type RewriteResponse struct { - // Done: true if the copy is finished; otherwise, false if the copy is - // in progress. This property is always present in the response. + // Done: true if the copy is finished; otherwise, false if the copy is in + // progress. This property is always present in the response. Done bool `json:"done,omitempty"` - // Kind: The kind of item this is. Kind string `json:"kind,omitempty"` - // ObjectSize: The total size of the object being copied in bytes. This // property is always present in the response. ObjectSize int64 `json:"objectSize,omitempty,string"` - - // Resource: A resource containing the metadata for the copied-to - // object. This property is present in the response only when copying - // completes. + // Resource: A resource containing the metadata for the copied-to object. This + // property is present in the response only when copying completes. Resource *Object `json:"resource,omitempty"` - - // RewriteToken: A token to use in subsequent requests to continue - // copying data. This token is present in the response only when there - // is more data to copy. + // RewriteToken: A token to use in subsequent requests to continue copying + // data. This token is present in the response only when there is more data to + // copy. RewriteToken string `json:"rewriteToken,omitempty"` - - // TotalBytesRewritten: The total bytes written so far, which can be - // used to provide a waiting user with a progress indicator. This - // property is always present in the response. + // TotalBytesRewritten: The total bytes written so far, which can be used to + // provide a waiting user with a progress indicator. This property is always + // present in the response. TotalBytesRewritten int64 `json:"totalBytesRewritten,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *RewriteResponse) MarshalJSON() ([]byte, error) { type NoMethod RewriteResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ServiceAccount: A subscription to receive Google PubSub -// notifications. +// ServiceAccount: A subscription to receive Google PubSub notifications. type ServiceAccount struct { // EmailAddress: The ID of the notification. EmailAddress string `json:"email_address,omitempty"` - // Kind: The kind of item this is. For notifications, this is always // storage#notification. Kind string `json:"kind,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EmailAddress") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EmailAddress") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EmailAddress") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *ServiceAccount) MarshalJSON() ([]byte, error) { type NoMethod ServiceAccount - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // TestIamPermissionsResponse: A @@ -3197,11 +2525,9 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { type TestIamPermissionsResponse struct { // Kind: The kind of item this is. Kind string `json:"kind,omitempty"` - - // Permissions: The permissions held by the caller. Permissions are - // always of the format storage.resource.capability, where resource is - // one of buckets, objects, or managedFolders. The supported permissions - // are as follows: + // Permissions: The permissions held by the caller. Permissions are always of + // the format storage.resource.capability, where resource is one of buckets, + // objects, or managedFolders. The supported permissions are as follows: // - storage.buckets.delete — Delete bucket. // - storage.buckets.get — Read bucket metadata. // - storage.buckets.getIamPolicy — Read bucket IAM policy. @@ -3218,43 +2544,33 @@ type TestIamPermissionsResponse struct { // - storage.objects.update — Update object metadata. // - storage.managedFolders.delete — Delete managed folder. // - storage.managedFolders.get — Read managed folder metadata. - // - storage.managedFolders.getIamPolicy — Read managed folder IAM - // policy. + // - storage.managedFolders.getIamPolicy — Read managed folder IAM policy. + // // - storage.managedFolders.create — Create managed folder. // - storage.managedFolders.list — List managed folders. - // - storage.managedFolders.setIamPolicy — Update managed folder IAM - // policy. + // - storage.managedFolders.setIamPolicy — Update managed folder IAM policy. Permissions []string `json:"permissions,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// method id "storage.anywhereCaches.disable": - type AnywhereCachesDisableCall struct { s *Service bucket string @@ -3276,23 +2592,21 @@ func (r *AnywhereCachesService) Disable(bucket string, anywhereCacheId string) * } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesDisableCall) Fields(s ...googleapi.Field) *AnywhereCachesDisableCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesDisableCall) Context(ctx context.Context) *AnywhereCachesDisableCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesDisableCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -3301,12 +2615,7 @@ func (c *AnywhereCachesDisableCall) Header() http.Header { } func (c *AnywhereCachesDisableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -3325,12 +2634,10 @@ func (c *AnywhereCachesDisableCall) doRequest(alt string) (*http.Response, error } // Do executes the "storage.anywhereCaches.disable" call. -// Exactly one of *AnywhereCache or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AnywhereCache.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *AnywhereCache.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *AnywhereCachesDisableCall) Do(opts ...googleapi.CallOption) (*AnywhereCache, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -3361,42 +2668,7 @@ func (c *AnywhereCachesDisableCall) Do(opts ...googleapi.CallOption) (*AnywhereC return nil, err } return ret, nil - // { - // "description": "Disables an Anywhere Cache instance.", - // "httpMethod": "POST", - // "id": "storage.anywhereCaches.disable", - // "parameterOrder": [ - // "bucket", - // "anywhereCacheId" - // ], - // "parameters": { - // "anywhereCacheId": { - // "description": "The ID of requested Anywhere Cache instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/disable", - // "response": { - // "$ref": "AnywhereCache" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.anywhereCaches.get": +} type AnywhereCachesGetCall struct { s *Service @@ -3420,33 +2692,29 @@ func (r *AnywhereCachesService) Get(bucket string, anywhereCacheId string) *Anyw } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesGetCall) Fields(s ...googleapi.Field) *AnywhereCachesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *AnywhereCachesGetCall) IfNoneMatch(entityTag string) *AnywhereCachesGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesGetCall) Context(ctx context.Context) *AnywhereCachesGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -3455,12 +2723,7 @@ func (c *AnywhereCachesGetCall) Header() http.Header { } func (c *AnywhereCachesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -3482,12 +2745,10 @@ func (c *AnywhereCachesGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.anywhereCaches.get" call. -// Exactly one of *AnywhereCache or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AnywhereCache.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *AnywhereCache.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *AnywhereCachesGetCall) Do(opts ...googleapi.CallOption) (*AnywhereCache, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -3518,44 +2779,7 @@ func (c *AnywhereCachesGetCall) Do(opts ...googleapi.CallOption) (*AnywhereCache return nil, err } return ret, nil - // { - // "description": "Returns the metadata of an Anywhere Cache instance.", - // "httpMethod": "GET", - // "id": "storage.anywhereCaches.get", - // "parameterOrder": [ - // "bucket", - // "anywhereCacheId" - // ], - // "parameters": { - // "anywhereCacheId": { - // "description": "The ID of requested Anywhere Cache instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", - // "response": { - // "$ref": "AnywhereCache" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.anywhereCaches.insert": +} type AnywhereCachesInsertCall struct { s *Service @@ -3577,23 +2801,21 @@ func (r *AnywhereCachesService) Insert(bucket string, anywherecache *AnywhereCac } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesInsertCall) Fields(s ...googleapi.Field) *AnywhereCachesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesInsertCall) Context(ctx context.Context) *AnywhereCachesInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -3602,18 +2824,12 @@ func (c *AnywhereCachesInsertCall) Header() http.Header { } func (c *AnywhereCachesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.anywherecache) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/anywhereCaches") @@ -3630,12 +2846,11 @@ func (c *AnywhereCachesInsertCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.anywhereCaches.insert" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *AnywhereCachesInsertCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -3666,38 +2881,7 @@ func (c *AnywhereCachesInsertCall) Do(opts ...googleapi.CallOption) (*GoogleLong return nil, err } return ret, nil - // { - // "description": "Creates an Anywhere Cache instance.", - // "httpMethod": "POST", - // "id": "storage.anywhereCaches.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches", - // "request": { - // "$ref": "AnywhereCache" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.anywhereCaches.list": +} type AnywhereCachesListCall struct { s *Service @@ -3708,8 +2892,8 @@ type AnywhereCachesListCall struct { header_ http.Header } -// List: Returns a list of Anywhere Cache instances of the bucket -// matching the criteria. +// List: Returns a list of Anywhere Cache instances of the bucket matching the +// criteria. // // - bucket: Name of the parent bucket. func (r *AnywhereCachesService) List(bucket string) *AnywhereCachesListCall { @@ -3718,49 +2902,44 @@ func (r *AnywhereCachesService) List(bucket string) *AnywhereCachesListCall { return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// items to return in a single page of responses. Maximum 1000. +// PageSize sets the optional parameter "pageSize": Maximum number of items to +// return in a single page of responses. Maximum 1000. func (c *AnywhereCachesListCall) PageSize(pageSize int64) *AnywhereCachesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *AnywhereCachesListCall) PageToken(pageToken string) *AnywhereCachesListCall { c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesListCall) Fields(s ...googleapi.Field) *AnywhereCachesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *AnywhereCachesListCall) IfNoneMatch(entityTag string) *AnywhereCachesListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesListCall) Context(ctx context.Context) *AnywhereCachesListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -3769,12 +2948,7 @@ func (c *AnywhereCachesListCall) Header() http.Header { } func (c *AnywhereCachesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -3795,12 +2969,10 @@ func (c *AnywhereCachesListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.anywhereCaches.list" call. -// Exactly one of *AnywhereCaches or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AnywhereCaches.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *AnywhereCaches.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *AnywhereCachesListCall) Do(opts ...googleapi.CallOption) (*AnywhereCaches, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -3831,46 +3003,6 @@ func (c *AnywhereCachesListCall) Do(opts ...googleapi.CallOption) (*AnywhereCach return nil, err } return ret, nil - // { - // "description": "Returns a list of Anywhere Cache instances of the bucket matching the criteria.", - // "httpMethod": "GET", - // "id": "storage.anywhereCaches.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of items to return in a single page of responses. Maximum 1000.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches", - // "response": { - // "$ref": "AnywhereCaches" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } // Pages invokes f for each page of results. @@ -3878,7 +3010,7 @@ func (c *AnywhereCachesListCall) Do(opts ...googleapi.CallOption) (*AnywhereCach // The provided context supersedes any context provided to the Context method. func (c *AnywhereCachesListCall) Pages(ctx context.Context, f func(*AnywhereCaches) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -3894,8 +3026,6 @@ func (c *AnywhereCachesListCall) Pages(ctx context.Context, f func(*AnywhereCach } } -// method id "storage.anywhereCaches.pause": - type AnywhereCachesPauseCall struct { s *Service bucket string @@ -3917,23 +3047,21 @@ func (r *AnywhereCachesService) Pause(bucket string, anywhereCacheId string) *An } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesPauseCall) Fields(s ...googleapi.Field) *AnywhereCachesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesPauseCall) Context(ctx context.Context) *AnywhereCachesPauseCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -3942,12 +3070,7 @@ func (c *AnywhereCachesPauseCall) Header() http.Header { } func (c *AnywhereCachesPauseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -3966,12 +3089,10 @@ func (c *AnywhereCachesPauseCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.anywhereCaches.pause" call. -// Exactly one of *AnywhereCache or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AnywhereCache.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *AnywhereCache.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *AnywhereCachesPauseCall) Do(opts ...googleapi.CallOption) (*AnywhereCache, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4002,42 +3123,7 @@ func (c *AnywhereCachesPauseCall) Do(opts ...googleapi.CallOption) (*AnywhereCac return nil, err } return ret, nil - // { - // "description": "Pauses an Anywhere Cache instance.", - // "httpMethod": "POST", - // "id": "storage.anywhereCaches.pause", - // "parameterOrder": [ - // "bucket", - // "anywhereCacheId" - // ], - // "parameters": { - // "anywhereCacheId": { - // "description": "The ID of requested Anywhere Cache instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/pause", - // "response": { - // "$ref": "AnywhereCache" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.anywhereCaches.resume": +} type AnywhereCachesResumeCall struct { s *Service @@ -4060,23 +3146,21 @@ func (r *AnywhereCachesService) Resume(bucket string, anywhereCacheId string) *A } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesResumeCall) Fields(s ...googleapi.Field) *AnywhereCachesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesResumeCall) Context(ctx context.Context) *AnywhereCachesResumeCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4085,12 +3169,7 @@ func (c *AnywhereCachesResumeCall) Header() http.Header { } func (c *AnywhereCachesResumeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -4109,12 +3188,10 @@ func (c *AnywhereCachesResumeCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.anywhereCaches.resume" call. -// Exactly one of *AnywhereCache or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AnywhereCache.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *AnywhereCache.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *AnywhereCachesResumeCall) Do(opts ...googleapi.CallOption) (*AnywhereCache, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4145,42 +3222,7 @@ func (c *AnywhereCachesResumeCall) Do(opts ...googleapi.CallOption) (*AnywhereCa return nil, err } return ret, nil - // { - // "description": "Resumes a paused or disabled Anywhere Cache instance.", - // "httpMethod": "POST", - // "id": "storage.anywhereCaches.resume", - // "parameterOrder": [ - // "bucket", - // "anywhereCacheId" - // ], - // "parameters": { - // "anywhereCacheId": { - // "description": "The ID of requested Anywhere Cache instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/resume", - // "response": { - // "$ref": "AnywhereCache" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.anywhereCaches.update": +} type AnywhereCachesUpdateCall struct { s *Service @@ -4192,8 +3234,8 @@ type AnywhereCachesUpdateCall struct { header_ http.Header } -// Update: Updates the config(ttl and admissionPolicy) of an Anywhere -// Cache instance. +// Update: Updates the config(ttl and admissionPolicy) of an Anywhere Cache +// instance. // // - anywhereCacheId: The ID of requested Anywhere Cache instance. // - bucket: Name of the parent bucket. @@ -4206,23 +3248,21 @@ func (r *AnywhereCachesService) Update(bucket string, anywhereCacheId string, an } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *AnywhereCachesUpdateCall) Fields(s ...googleapi.Field) *AnywhereCachesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *AnywhereCachesUpdateCall) Context(ctx context.Context) *AnywhereCachesUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *AnywhereCachesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4231,18 +3271,12 @@ func (c *AnywhereCachesUpdateCall) Header() http.Header { } func (c *AnywhereCachesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.anywherecache) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/anywhereCaches/{anywhereCacheId}") @@ -4260,12 +3294,11 @@ func (c *AnywhereCachesUpdateCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.anywhereCaches.update" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *AnywhereCachesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4296,45 +3329,7 @@ func (c *AnywhereCachesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLong return nil, err } return ret, nil - // { - // "description": "Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.", - // "httpMethod": "PATCH", - // "id": "storage.anywhereCaches.update", - // "parameterOrder": [ - // "bucket", - // "anywhereCacheId" - // ], - // "parameters": { - // "anywhereCacheId": { - // "description": "The ID of requested Anywhere Cache instance.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "bucket": { - // "description": "Name of the parent bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", - // "request": { - // "$ref": "AnywhereCache" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.bucketAccessControls.delete": +} type BucketAccessControlsDeleteCall struct { s *Service @@ -4345,8 +3340,8 @@ type BucketAccessControlsDeleteCall struct { header_ http.Header } -// Delete: Permanently deletes the ACL entry for the specified entity on -// the specified bucket. +// Delete: Permanently deletes the ACL entry for the specified entity on the +// specified bucket. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, @@ -4359,31 +3354,29 @@ func (r *BucketAccessControlsService) Delete(bucket string, entity string) *Buck return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsDeleteCall) UserProject(userProject string) *BucketAccessControlsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsDeleteCall) Fields(s ...googleapi.Field) *BucketAccessControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4392,12 +3385,7 @@ func (c *BucketAccessControlsDeleteCall) Header() http.Header { } func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -4427,43 +3415,7 @@ func (c *BucketAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.", - // "httpMethod": "DELETE", - // "id": "storage.bucketAccessControls.delete", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl/{entity}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.bucketAccessControls.get": +} type BucketAccessControlsGetCall struct { s *Service @@ -4475,8 +3427,7 @@ type BucketAccessControlsGetCall struct { header_ http.Header } -// Get: Returns the ACL entry for the specified entity on the specified -// bucket. +// Get: Returns the ACL entry for the specified entity on the specified bucket. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, @@ -4489,41 +3440,37 @@ func (r *BucketAccessControlsService) Get(bucket string, entity string) *BucketA return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsGetCall) UserProject(userProject string) *BucketAccessControlsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsGetCall) Fields(s ...googleapi.Field) *BucketAccessControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketAccessControlsGetCall) IfNoneMatch(entityTag string) *BucketAccessControlsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4532,12 +3479,7 @@ func (c *BucketAccessControlsGetCall) Header() http.Header { } func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -4559,12 +3501,11 @@ func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, err } // Do executes the "storage.bucketAccessControls.get" call. -// Exactly one of *BucketAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BucketAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *BucketAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4595,46 +3536,7 @@ func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketA return nil, err } return ret, nil - // { - // "description": "Returns the ACL entry for the specified entity on the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.bucketAccessControls.get", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl/{entity}", - // "response": { - // "$ref": "BucketAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.bucketAccessControls.insert": +} type BucketAccessControlsInsertCall struct { s *Service @@ -4655,31 +3557,29 @@ func (r *BucketAccessControlsService) Insert(bucket string, bucketaccesscontrol return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsInsertCall) UserProject(userProject string) *BucketAccessControlsInsertCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsInsertCall) Fields(s ...googleapi.Field) *BucketAccessControlsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4688,18 +3588,12 @@ func (c *BucketAccessControlsInsertCall) Header() http.Header { } func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl") @@ -4716,12 +3610,11 @@ func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.bucketAccessControls.insert" call. -// Exactly one of *BucketAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BucketAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *BucketAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4752,42 +3645,7 @@ func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Buck return nil, err } return ret, nil - // { - // "description": "Creates a new ACL entry on the specified bucket.", - // "httpMethod": "POST", - // "id": "storage.bucketAccessControls.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl", - // "request": { - // "$ref": "BucketAccessControl" - // }, - // "response": { - // "$ref": "BucketAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.bucketAccessControls.list": +} type BucketAccessControlsListCall struct { s *Service @@ -4807,41 +3665,37 @@ func (r *BucketAccessControlsService) List(bucket string) *BucketAccessControlsL return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsListCall) UserProject(userProject string) *BucketAccessControlsListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsListCall) Fields(s ...googleapi.Field) *BucketAccessControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketAccessControlsListCall) IfNoneMatch(entityTag string) *BucketAccessControlsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -4850,12 +3704,7 @@ func (c *BucketAccessControlsListCall) Header() http.Header { } func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -4876,12 +3725,11 @@ func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, er } // Do executes the "storage.bucketAccessControls.list" call. -// Exactly one of *BucketAccessControls or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BucketAccessControls.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *BucketAccessControls.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*BucketAccessControls, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -4912,39 +3760,7 @@ func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Bucket return nil, err } return ret, nil - // { - // "description": "Retrieves ACL entries on the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.bucketAccessControls.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl", - // "response": { - // "$ref": "BucketAccessControls" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.bucketAccessControls.patch": +} type BucketAccessControlsPatchCall struct { s *Service @@ -4970,31 +3786,29 @@ func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucket return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsPatchCall) UserProject(userProject string) *BucketAccessControlsPatchCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsPatchCall) Fields(s ...googleapi.Field) *BucketAccessControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5003,18 +3817,12 @@ func (c *BucketAccessControlsPatchCall) Header() http.Header { } func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}") @@ -5032,12 +3840,11 @@ func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, e } // Do executes the "storage.bucketAccessControls.patch" call. -// Exactly one of *BucketAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BucketAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *BucketAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -5068,49 +3875,7 @@ func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Bucke return nil, err } return ret, nil - // { - // "description": "Patches an ACL entry on the specified bucket.", - // "httpMethod": "PATCH", - // "id": "storage.bucketAccessControls.patch", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl/{entity}", - // "request": { - // "$ref": "BucketAccessControl" - // }, - // "response": { - // "$ref": "BucketAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.bucketAccessControls.update": +} type BucketAccessControlsUpdateCall struct { s *Service @@ -5136,31 +3901,29 @@ func (r *BucketAccessControlsService) Update(bucket string, entity string, bucke return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketAccessControlsUpdateCall) UserProject(userProject string) *BucketAccessControlsUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketAccessControlsUpdateCall) Fields(s ...googleapi.Field) *BucketAccessControlsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketAccessControlsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5169,18 +3932,12 @@ func (c *BucketAccessControlsUpdateCall) Header() http.Header { } func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}") @@ -5198,12 +3955,11 @@ func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.bucketAccessControls.update" call. -// Exactly one of *BucketAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BucketAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *BucketAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -5234,49 +3990,7 @@ func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Buck return nil, err } return ret, nil - // { - // "description": "Updates an ACL entry on the specified bucket.", - // "httpMethod": "PUT", - // "id": "storage.bucketAccessControls.update", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/acl/{entity}", - // "request": { - // "$ref": "BucketAccessControl" - // }, - // "response": { - // "$ref": "BucketAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.buckets.delete": +} type BucketsDeleteCall struct { s *Service @@ -5295,9 +4009,8 @@ func (r *BucketsService) Delete(bucket string) *BucketsDeleteCall { return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": If set, only deletes the bucket if its -// metageneration matches this value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// If set, only deletes the bucket if its metageneration matches this value. func (c *BucketsDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsDeleteCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -5311,31 +4024,29 @@ func (c *BucketsDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsDeleteCall) UserProject(userProject string) *BucketsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsDeleteCall) Fields(s ...googleapi.Field) *BucketsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5344,12 +4055,7 @@ func (c *BucketsDeleteCall) Header() http.Header { } func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -5378,49 +4084,7 @@ func (c *BucketsDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes an empty bucket.", - // "httpMethod": "DELETE", - // "id": "storage.buckets.delete", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "If set, only deletes the bucket if its metageneration matches this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "If set, only deletes the bucket if its metageneration does not match this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.get": +} type BucketsGetCall struct { s *Service @@ -5440,10 +4104,9 @@ func (r *BucketsService) Get(bucket string) *BucketsGetCall { return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration matches -// the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the return of the bucket metadata conditional on whether the bucket's +// current metageneration matches the given value. func (c *BucketsGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsGetCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -5451,15 +4114,15 @@ func (c *BucketsGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *Buc // IfMetagenerationNotMatch sets the optional parameter // "ifMetagenerationNotMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration does not -// match the given value. +// conditional on whether the bucket's current metageneration does not match +// the given value. func (c *BucketsGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsGetCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl. // // Possible values: // @@ -5470,41 +4133,37 @@ func (c *BucketsGetCall) Projection(projection string) *BucketsGetCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsGetCall) UserProject(userProject string) *BucketsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsGetCall) Fields(s ...googleapi.Field) *BucketsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketsGetCall) IfNoneMatch(entityTag string) *BucketsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5513,12 +4172,7 @@ func (c *BucketsGetCall) Header() http.Header { } func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -5539,12 +4193,10 @@ func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.get" call. -// Exactly one of *Bucket or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Bucket.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -5575,67 +4227,7 @@ func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { return nil, err } return ret, nil - // { - // "description": "Returns metadata for the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.buckets.get", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit owner, acl and defaultObjectAcl properties." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}", - // "response": { - // "$ref": "Bucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.getIamPolicy": +} type BucketsGetIamPolicyCall struct { s *Service @@ -5657,49 +4249,44 @@ func (r *BucketsService) GetIamPolicy(bucket string) *BucketsGetIamPolicyCall { // OptionsRequestedPolicyVersion sets the optional parameter // "optionsRequestedPolicyVersion": The IAM policy format version to be -// returned. If the optionsRequestedPolicyVersion is for an older -// version that doesn't support part of the requested IAM policy, the -// request fails. +// returned. If the optionsRequestedPolicyVersion is for an older version that +// doesn't support part of the requested IAM policy, the request fails. func (c *BucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BucketsGetIamPolicyCall { c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsGetIamPolicyCall) UserProject(userProject string) *BucketsGetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BucketsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BucketsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsGetIamPolicyCall) Context(ctx context.Context) *BucketsGetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5708,12 +4295,7 @@ func (c *BucketsGetIamPolicyCall) Header() http.Header { } func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -5734,12 +4316,10 @@ func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.buckets.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -5770,46 +4350,7 @@ func (c *BucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err return nil, err } return ret, nil - // { - // "description": "Returns an IAM policy for the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.buckets.getIamPolicy", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "optionsRequestedPolicyVersion": { - // "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", - // "format": "int32", - // "location": "query", - // "minimum": "1", - // "type": "integer" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/iam", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.buckets.insert": +} type BucketsInsertCall struct { s *Service @@ -5829,9 +4370,8 @@ func (r *BucketsService) Insert(projectid string, bucket *Bucket) *BucketsInsert return c } -// EnableObjectRetention sets the optional parameter -// "enableObjectRetention": When set to true, object retention is -// enabled for this bucket. +// EnableObjectRetention sets the optional parameter "enableObjectRetention": +// When set to true, object retention is enabled for this bucket. func (c *BucketsInsertCall) EnableObjectRetention(enableObjectRetention bool) *BucketsInsertCall { c.urlParams_.Set("enableObjectRetention", fmt.Sprint(enableObjectRetention)) return c @@ -5847,25 +4387,25 @@ func (c *BucketsInsertCall) EnableObjectRetention(enableObjectRetention bool) *B // allAuthenticatedUsers get READER access. // // "private" - Project team owners get OWNER access. -// "projectPrivate" - Project team members get access according to +// "projectPrivate" - Project team members get access according to their // -// their roles. +// roles. // -// "publicRead" - Project team owners get OWNER access, and allUsers +// "publicRead" - Project team owners get OWNER access, and allUsers get // -// get READER access. +// READER access. // -// "publicReadWrite" - Project team owners get OWNER access, and +// "publicReadWrite" - Project team owners get OWNER access, and allUsers get // -// allUsers get WRITER access. +// WRITER access. func (c *BucketsInsertCall) PredefinedAcl(predefinedAcl string) *BucketsInsertCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } // PredefinedDefaultObjectAcl sets the optional parameter -// "predefinedDefaultObjectAcl": Apply a predefined set of default -// object access controls to this bucket. +// "predefinedDefaultObjectAcl": Apply a predefined set of default object +// access controls to this bucket. // // Possible values: // @@ -5873,31 +4413,30 @@ func (c *BucketsInsertCall) PredefinedAcl(predefinedAcl string) *BucketsInsertCa // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *BucketsInsertCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsInsertCall { c.urlParams_.Set("predefinedDefaultObjectAcl", predefinedDefaultObjectAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl, unless the bucket resource -// specifies acl or defaultObjectAcl properties, when it defaults to -// full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl, unless the bucket resource specifies acl or +// defaultObjectAcl properties, when it defaults to full. // // Possible values: // @@ -5908,31 +4447,29 @@ func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *BucketsInsertCall) UserProject(userProject string) *BucketsInsertCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsInsertCall) Fields(s ...googleapi.Field) *BucketsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -5941,18 +4478,12 @@ func (c *BucketsInsertCall) Header() http.Header { } func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b") @@ -5966,12 +4497,10 @@ func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.insert" call. -// Exactly one of *Bucket or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Bucket.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -6002,102 +4531,7 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { return nil, err } return ret, nil - // { - // "description": "Creates a new bucket.", - // "httpMethod": "POST", - // "id": "storage.buckets.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "enableObjectRetention": { - // "default": "false", - // "description": "When set to true, object retention is enabled for this bucket.", - // "location": "query", - // "type": "boolean" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "private", - // "projectPrivate", - // "publicRead", - // "publicReadWrite" - // ], - // "enumDescriptions": [ - // "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - // "Project team owners get OWNER access.", - // "Project team members get access according to their roles.", - // "Project team owners get OWNER access, and allUsers get READER access.", - // "Project team owners get OWNER access, and allUsers get WRITER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "predefinedDefaultObjectAcl": { - // "description": "Apply a predefined set of default object access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "A valid API project identifier.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit owner, acl and defaultObjectAcl properties." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b", - // "request": { - // "$ref": "Bucket" - // }, - // "response": { - // "$ref": "Bucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.list": +} type BucketsListCall struct { s *Service @@ -6116,31 +4550,30 @@ func (r *BucketsService) List(projectid string) *BucketsListCall { return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of buckets to return in a single response. The service will use this -// parameter or 1,000 items, whichever is smaller. +// MaxResults sets the optional parameter "maxResults": Maximum number of +// buckets to return in a single response. The service will use this parameter +// or 1,000 items, whichever is smaller. func (c *BucketsListCall) MaxResults(maxResults int64) *BucketsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *BucketsListCall) PageToken(pageToken string) *BucketsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Prefix sets the optional parameter "prefix": Filter results to -// buckets whose names begin with this prefix. +// Prefix sets the optional parameter "prefix": Filter results to buckets whose +// names begin with this prefix. func (c *BucketsListCall) Prefix(prefix string) *BucketsListCall { c.urlParams_.Set("prefix", prefix) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl. // // Possible values: // @@ -6151,41 +4584,37 @@ func (c *BucketsListCall) Projection(projection string) *BucketsListCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *BucketsListCall) UserProject(userProject string) *BucketsListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsListCall) Fields(s ...googleapi.Field) *BucketsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketsListCall) IfNoneMatch(entityTag string) *BucketsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsListCall) Context(ctx context.Context) *BucketsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -6194,12 +4623,7 @@ func (c *BucketsListCall) Header() http.Header { } func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -6217,12 +4641,10 @@ func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.list" call. -// Exactly one of *Buckets or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Buckets.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Buckets.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -6253,70 +4675,6 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) { return nil, err } return ret, nil - // { - // "description": "Retrieves a list of buckets for a given project.", - // "httpMethod": "GET", - // "id": "storage.buckets.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "maxResults": { - // "default": "1000", - // "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "prefix": { - // "description": "Filter results to buckets whose names begin with this prefix.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "A valid API project identifier.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit owner, acl and defaultObjectAcl properties." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b", - // "response": { - // "$ref": "Buckets" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } // Pages invokes f for each page of results. @@ -6324,7 +4682,7 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) { // The provided context supersedes any context provided to the Context method. func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -6340,8 +4698,6 @@ func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) err } } -// method id "storage.buckets.lockRetentionPolicy": - type BucketsLockRetentionPolicyCall struct { s *Service bucket string @@ -6353,8 +4709,8 @@ type BucketsLockRetentionPolicyCall struct { // LockRetentionPolicy: Locks retention policy on a bucket. // // - bucket: Name of a bucket. -// - ifMetagenerationMatch: Makes the operation conditional on whether -// bucket's current metageneration matches the given value. +// - ifMetagenerationMatch: Makes the operation conditional on whether bucket's +// current metageneration matches the given value. func (r *BucketsService) LockRetentionPolicy(bucket string, ifMetagenerationMatch int64) *BucketsLockRetentionPolicyCall { c := &BucketsLockRetentionPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -6362,31 +4718,29 @@ func (r *BucketsService) LockRetentionPolicy(bucket string, ifMetagenerationMatc return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsLockRetentionPolicyCall) UserProject(userProject string) *BucketsLockRetentionPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsLockRetentionPolicyCall) Fields(s ...googleapi.Field) *BucketsLockRetentionPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsLockRetentionPolicyCall) Context(ctx context.Context) *BucketsLockRetentionPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsLockRetentionPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -6395,12 +4749,7 @@ func (c *BucketsLockRetentionPolicyCall) Header() http.Header { } func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -6418,12 +4767,10 @@ func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.buckets.lockRetentionPolicy" call. -// Exactly one of *Bucket or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Bucket.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsLockRetentionPolicyCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -6454,48 +4801,7 @@ func (c *BucketsLockRetentionPolicyCall) Do(opts ...googleapi.CallOption) (*Buck return nil, err } return ret, nil - // { - // "description": "Locks retention policy on a bucket.", - // "httpMethod": "POST", - // "id": "storage.buckets.lockRetentionPolicy", - // "parameterOrder": [ - // "bucket", - // "ifMetagenerationMatch" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/lockRetentionPolicy", - // "response": { - // "$ref": "Bucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.patch": +} type BucketsPatchCall struct { s *Service @@ -6506,9 +4812,8 @@ type BucketsPatchCall struct { header_ http.Header } -// Patch: Patches a bucket. Changes to the bucket will be readable -// immediately after writing, but configuration changes may take time to -// propagate. +// Patch: Patches a bucket. Changes to the bucket will be readable immediately +// after writing, but configuration changes may take time to propagate. // // - bucket: Name of a bucket. func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall { @@ -6518,10 +4823,9 @@ func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration matches -// the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the return of the bucket metadata conditional on whether the bucket's +// current metageneration matches the given value. func (c *BucketsPatchCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsPatchCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -6529,8 +4833,8 @@ func (c *BucketsPatchCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *B // IfMetagenerationNotMatch sets the optional parameter // "ifMetagenerationNotMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration does not -// match the given value. +// conditional on whether the bucket's current metageneration does not match +// the given value. func (c *BucketsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsPatchCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c @@ -6546,25 +4850,25 @@ func (c *BucketsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int // allAuthenticatedUsers get READER access. // // "private" - Project team owners get OWNER access. -// "projectPrivate" - Project team members get access according to +// "projectPrivate" - Project team members get access according to their // -// their roles. +// roles. // -// "publicRead" - Project team owners get OWNER access, and allUsers +// "publicRead" - Project team owners get OWNER access, and allUsers get // -// get READER access. +// READER access. // -// "publicReadWrite" - Project team owners get OWNER access, and +// "publicReadWrite" - Project team owners get OWNER access, and allUsers get // -// allUsers get WRITER access. +// WRITER access. func (c *BucketsPatchCall) PredefinedAcl(predefinedAcl string) *BucketsPatchCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } // PredefinedDefaultObjectAcl sets the optional parameter -// "predefinedDefaultObjectAcl": Apply a predefined set of default -// object access controls to this bucket. +// "predefinedDefaultObjectAcl": Apply a predefined set of default object +// access controls to this bucket. // // Possible values: // @@ -6572,29 +4876,29 @@ func (c *BucketsPatchCall) PredefinedAcl(predefinedAcl string) *BucketsPatchCall // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *BucketsPatchCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsPatchCall { c.urlParams_.Set("predefinedDefaultObjectAcl", predefinedDefaultObjectAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to full. // // Possible values: // @@ -6605,31 +4909,29 @@ func (c *BucketsPatchCall) Projection(projection string) *BucketsPatchCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsPatchCall) UserProject(userProject string) *BucketsPatchCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsPatchCall) Fields(s ...googleapi.Field) *BucketsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -6638,18 +4940,12 @@ func (c *BucketsPatchCall) Header() http.Header { } func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}") @@ -6666,12 +4962,10 @@ func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.patch" call. -// Exactly one of *Bucket or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Bucket.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -6702,107 +4996,7 @@ func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { return nil, err } return ret, nil - // { - // "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", - // "httpMethod": "PATCH", - // "id": "storage.buckets.patch", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "private", - // "projectPrivate", - // "publicRead", - // "publicReadWrite" - // ], - // "enumDescriptions": [ - // "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - // "Project team owners get OWNER access.", - // "Project team members get access according to their roles.", - // "Project team owners get OWNER access, and allUsers get READER access.", - // "Project team owners get OWNER access, and allUsers get WRITER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "predefinedDefaultObjectAcl": { - // "description": "Apply a predefined set of default object access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit owner, acl and defaultObjectAcl properties." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}", - // "request": { - // "$ref": "Bucket" - // }, - // "response": { - // "$ref": "Bucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.buckets.setIamPolicy": +} type BucketsSetIamPolicyCall struct { s *Service @@ -6823,31 +5017,29 @@ func (r *BucketsService) SetIamPolicy(bucket string, policy *Policy) *BucketsSet return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsSetIamPolicyCall) UserProject(userProject string) *BucketsSetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BucketsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsSetIamPolicyCall) Context(ctx context.Context) *BucketsSetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -6856,18 +5048,12 @@ func (c *BucketsSetIamPolicyCall) Header() http.Header { } func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/iam") @@ -6884,12 +5070,10 @@ func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.buckets.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -6920,42 +5104,7 @@ func (c *BucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err return nil, err } return ret, nil - // { - // "description": "Updates an IAM policy for the specified bucket.", - // "httpMethod": "PUT", - // "id": "storage.buckets.setIamPolicy", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/iam", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.buckets.testIamPermissions": +} type BucketsTestIamPermissionsCall struct { s *Service @@ -6966,8 +5115,8 @@ type BucketsTestIamPermissionsCall struct { header_ http.Header } -// TestIamPermissions: Tests a set of permissions on the given bucket to -// see which, if any, are held by the caller. +// TestIamPermissions: Tests a set of permissions on the given bucket to see +// which, if any, are held by the caller. // // - bucket: Name of a bucket. // - permissions: Permissions to test. @@ -6978,41 +5127,37 @@ func (r *BucketsService) TestIamPermissions(bucket string, permissions []string) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsTestIamPermissionsCall) UserProject(userProject string) *BucketsTestIamPermissionsCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BucketsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *BucketsTestIamPermissionsCall) IfNoneMatch(entityTag string) *BucketsTestIamPermissionsCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsTestIamPermissionsCall) Context(ctx context.Context) *BucketsTestIamPermissionsCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7021,12 +5166,7 @@ func (c *BucketsTestIamPermissionsCall) Header() http.Header { } func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -7047,12 +5187,11 @@ func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, e } // Do executes the "storage.buckets.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *BucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -7083,50 +5222,7 @@ func (c *BucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI return nil, err } return ret, nil - // { - // "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", - // "httpMethod": "GET", - // "id": "storage.buckets.testIamPermissions", - // "parameterOrder": [ - // "bucket", - // "permissions" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "permissions": { - // "description": "Permissions to test.", - // "location": "query", - // "repeated": true, - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/iam/testPermissions", - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.update": +} type BucketsUpdateCall struct { s *Service @@ -7137,9 +5233,8 @@ type BucketsUpdateCall struct { header_ http.Header } -// Update: Updates a bucket. Changes to the bucket will be readable -// immediately after writing, but configuration changes may take time to -// propagate. +// Update: Updates a bucket. Changes to the bucket will be readable immediately +// after writing, but configuration changes may take time to propagate. // // - bucket: Name of a bucket. func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCall { @@ -7149,10 +5244,9 @@ func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCa return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration matches -// the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the return of the bucket metadata conditional on whether the bucket's +// current metageneration matches the given value. func (c *BucketsUpdateCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsUpdateCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -7160,8 +5254,8 @@ func (c *BucketsUpdateCall) IfMetagenerationMatch(ifMetagenerationMatch int64) * // IfMetagenerationNotMatch sets the optional parameter // "ifMetagenerationNotMatch": Makes the return of the bucket metadata -// conditional on whether the bucket's current metageneration does not -// match the given value. +// conditional on whether the bucket's current metageneration does not match +// the given value. func (c *BucketsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsUpdateCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c @@ -7177,25 +5271,25 @@ func (c *BucketsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in // allAuthenticatedUsers get READER access. // // "private" - Project team owners get OWNER access. -// "projectPrivate" - Project team members get access according to +// "projectPrivate" - Project team members get access according to their // -// their roles. +// roles. // -// "publicRead" - Project team owners get OWNER access, and allUsers +// "publicRead" - Project team owners get OWNER access, and allUsers get // -// get READER access. +// READER access. // -// "publicReadWrite" - Project team owners get OWNER access, and +// "publicReadWrite" - Project team owners get OWNER access, and allUsers get // -// allUsers get WRITER access. +// WRITER access. func (c *BucketsUpdateCall) PredefinedAcl(predefinedAcl string) *BucketsUpdateCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } // PredefinedDefaultObjectAcl sets the optional parameter -// "predefinedDefaultObjectAcl": Apply a predefined set of default -// object access controls to this bucket. +// "predefinedDefaultObjectAcl": Apply a predefined set of default object +// access controls to this bucket. // // Possible values: // @@ -7203,29 +5297,29 @@ func (c *BucketsUpdateCall) PredefinedAcl(predefinedAcl string) *BucketsUpdateCa // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *BucketsUpdateCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsUpdateCall { c.urlParams_.Set("predefinedDefaultObjectAcl", predefinedDefaultObjectAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to full. // // Possible values: // @@ -7236,31 +5330,29 @@ func (c *BucketsUpdateCall) Projection(projection string) *BucketsUpdateCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *BucketsUpdateCall) UserProject(userProject string) *BucketsUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *BucketsUpdateCall) Fields(s ...googleapi.Field) *BucketsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *BucketsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7269,18 +5361,12 @@ func (c *BucketsUpdateCall) Header() http.Header { } func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}") @@ -7297,12 +5383,10 @@ func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.update" call. -// Exactly one of *Bucket or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Bucket.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Bucket.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -7333,107 +5417,7 @@ func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { return nil, err } return ret, nil - // { - // "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", - // "httpMethod": "PUT", - // "id": "storage.buckets.update", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "private", - // "projectPrivate", - // "publicRead", - // "publicReadWrite" - // ], - // "enumDescriptions": [ - // "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - // "Project team owners get OWNER access.", - // "Project team members get access according to their roles.", - // "Project team owners get OWNER access, and allUsers get READER access.", - // "Project team owners get OWNER access, and allUsers get WRITER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "predefinedDefaultObjectAcl": { - // "description": "Apply a predefined set of default object access controls to this bucket.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit owner, acl and defaultObjectAcl properties." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}", - // "request": { - // "$ref": "Bucket" - // }, - // "response": { - // "$ref": "Bucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.channels.stop": +} type ChannelsStopCall struct { s *Service @@ -7451,23 +5435,21 @@ func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall { } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ChannelsStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7476,18 +5458,12 @@ func (c *ChannelsStopCall) Header() http.Header { } func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop") @@ -7512,27 +5488,7 @@ func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Stop watching resources through this channel", - // "httpMethod": "POST", - // "id": "storage.channels.stop", - // "path": "channels/stop", - // "request": { - // "$ref": "Channel", - // "parameterName": "resource" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.delete": +} type DefaultObjectAccessControlsDeleteCall struct { s *Service @@ -7543,8 +5499,8 @@ type DefaultObjectAccessControlsDeleteCall struct { header_ http.Header } -// Delete: Permanently deletes the default object ACL entry for the -// specified entity on the specified bucket. +// Delete: Permanently deletes the default object ACL entry for the specified +// entity on the specified bucket. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, @@ -7557,31 +5513,29 @@ func (r *DefaultObjectAccessControlsService) Delete(bucket string, entity string return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsDeleteCall) UserProject(userProject string) *DefaultObjectAccessControlsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsDeleteCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsDeleteCall) Context(ctx context.Context) *DefaultObjectAccessControlsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7590,12 +5544,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header { } func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -7625,43 +5574,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.", - // "httpMethod": "DELETE", - // "id": "storage.defaultObjectAccessControls.delete", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl/{entity}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.get": +} type DefaultObjectAccessControlsGetCall struct { s *Service @@ -7673,8 +5586,8 @@ type DefaultObjectAccessControlsGetCall struct { header_ http.Header } -// Get: Returns the default object ACL entry for the specified entity on -// the specified bucket. +// Get: Returns the default object ACL entry for the specified entity on the +// specified bucket. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, @@ -7687,41 +5600,37 @@ func (r *DefaultObjectAccessControlsService) Get(bucket string, entity string) * return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsGetCall) UserProject(userProject string) *DefaultObjectAccessControlsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsGetCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *DefaultObjectAccessControlsGetCall) IfNoneMatch(entityTag string) *DefaultObjectAccessControlsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsGetCall) Context(ctx context.Context) *DefaultObjectAccessControlsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7730,12 +5639,7 @@ func (c *DefaultObjectAccessControlsGetCall) Header() http.Header { } func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -7757,12 +5661,11 @@ func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Respon } // Do executes the "storage.defaultObjectAccessControls.get" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *DefaultObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -7793,46 +5696,7 @@ func (c *DefaultObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (* return nil, err } return ret, nil - // { - // "description": "Returns the default object ACL entry for the specified entity on the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.defaultObjectAccessControls.get", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl/{entity}", - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.insert": +} type DefaultObjectAccessControlsInsertCall struct { s *Service @@ -7843,8 +5707,7 @@ type DefaultObjectAccessControlsInsertCall struct { header_ http.Header } -// Insert: Creates a new default object ACL entry on the specified -// bucket. +// Insert: Creates a new default object ACL entry on the specified bucket. // // - bucket: Name of a bucket. func (r *DefaultObjectAccessControlsService) Insert(bucket string, objectaccesscontrol *ObjectAccessControl) *DefaultObjectAccessControlsInsertCall { @@ -7854,31 +5717,29 @@ func (r *DefaultObjectAccessControlsService) Insert(bucket string, objectaccessc return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsInsertCall) UserProject(userProject string) *DefaultObjectAccessControlsInsertCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsInsertCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsInsertCall) Context(ctx context.Context) *DefaultObjectAccessControlsInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -7887,18 +5748,12 @@ func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header { } func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl") @@ -7915,12 +5770,11 @@ func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Res } // Do executes the "storage.defaultObjectAccessControls.insert" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *DefaultObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -7951,42 +5805,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) return nil, err } return ret, nil - // { - // "description": "Creates a new default object ACL entry on the specified bucket.", - // "httpMethod": "POST", - // "id": "storage.defaultObjectAccessControls.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.list": +} type DefaultObjectAccessControlsListCall struct { s *Service @@ -8006,58 +5825,53 @@ func (r *DefaultObjectAccessControlsService) List(bucket string) *DefaultObjectA return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": If present, only return default ACL listing -// if the bucket's current metageneration matches this value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// If present, only return default ACL listing if the bucket's current +// metageneration matches this value. func (c *DefaultObjectAccessControlsListCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *DefaultObjectAccessControlsListCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": If present, only return default ACL -// listing if the bucket's current metageneration does not match the -// given value. +// "ifMetagenerationNotMatch": If present, only return default ACL listing if +// the bucket's current metageneration does not match the given value. func (c *DefaultObjectAccessControlsListCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *DefaultObjectAccessControlsListCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsListCall) UserProject(userProject string) *DefaultObjectAccessControlsListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsListCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *DefaultObjectAccessControlsListCall) IfNoneMatch(entityTag string) *DefaultObjectAccessControlsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsListCall) Context(ctx context.Context) *DefaultObjectAccessControlsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8066,12 +5880,7 @@ func (c *DefaultObjectAccessControlsListCall) Header() http.Header { } func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -8092,12 +5901,11 @@ func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Respo } // Do executes the "storage.defaultObjectAccessControls.list" call. -// Exactly one of *ObjectAccessControls or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControls.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControls.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *DefaultObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControls, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -8128,51 +5936,7 @@ func (c *DefaultObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) ( return nil, err } return ret, nil - // { - // "description": "Retrieves default object ACL entries on the specified bucket.", - // "httpMethod": "GET", - // "id": "storage.defaultObjectAccessControls.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl", - // "response": { - // "$ref": "ObjectAccessControls" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.patch": +} type DefaultObjectAccessControlsPatchCall struct { s *Service @@ -8198,31 +5962,29 @@ func (r *DefaultObjectAccessControlsService) Patch(bucket string, entity string, return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsPatchCall) UserProject(userProject string) *DefaultObjectAccessControlsPatchCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsPatchCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsPatchCall) Context(ctx context.Context) *DefaultObjectAccessControlsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8231,18 +5993,12 @@ func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header { } func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl/{entity}") @@ -8260,12 +6016,11 @@ func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Resp } // Do executes the "storage.defaultObjectAccessControls.patch" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *DefaultObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -8296,49 +6051,7 @@ func (c *DefaultObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) return nil, err } return ret, nil - // { - // "description": "Patches a default object ACL entry on the specified bucket.", - // "httpMethod": "PATCH", - // "id": "storage.defaultObjectAccessControls.patch", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl/{entity}", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.defaultObjectAccessControls.update": +} type DefaultObjectAccessControlsUpdateCall struct { s *Service @@ -8364,31 +6077,29 @@ func (r *DefaultObjectAccessControlsService) Update(bucket string, entity string return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *DefaultObjectAccessControlsUpdateCall) UserProject(userProject string) *DefaultObjectAccessControlsUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *DefaultObjectAccessControlsUpdateCall) Fields(s ...googleapi.Field) *DefaultObjectAccessControlsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *DefaultObjectAccessControlsUpdateCall) Context(ctx context.Context) *DefaultObjectAccessControlsUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8397,18 +6108,12 @@ func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header { } func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl/{entity}") @@ -8426,12 +6131,11 @@ func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Res } // Do executes the "storage.defaultObjectAccessControls.update" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *DefaultObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -8462,49 +6166,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) return nil, err } return ret, nil - // { - // "description": "Updates a default object ACL entry on the specified bucket.", - // "httpMethod": "PUT", - // "id": "storage.defaultObjectAccessControls.update", - // "parameterOrder": [ - // "bucket", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/defaultObjectAcl/{entity}", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.folders.delete": +} type FoldersDeleteCall struct { s *Service @@ -8527,9 +6189,8 @@ func (r *FoldersService) Delete(bucket string, folder string) *FoldersDeleteCall return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": If set, only deletes the folder if its -// metageneration matches this value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// If set, only deletes the folder if its metageneration matches this value. func (c *FoldersDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *FoldersDeleteCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -8544,23 +6205,21 @@ func (c *FoldersDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *FoldersDeleteCall) Fields(s ...googleapi.Field) *FoldersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *FoldersDeleteCall) Context(ctx context.Context) *FoldersDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *FoldersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8569,12 +6228,7 @@ func (c *FoldersDeleteCall) Header() http.Header { } func (c *FoldersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -8604,51 +6258,7 @@ func (c *FoldersDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled.", - // "httpMethod": "DELETE", - // "id": "storage.folders.delete", - // "parameterOrder": [ - // "bucket", - // "folder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the folder resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "folder": { - // "description": "Name of a folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "If set, only deletes the folder if its metageneration matches this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "If set, only deletes the folder if its metageneration does not match this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/folders/{folder}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.folders.get": +} type FoldersGetCall struct { s *Service @@ -8660,8 +6270,8 @@ type FoldersGetCall struct { header_ http.Header } -// Get: Returns metadata for the specified folder. Only applicable to -// buckets with hierarchical namespace enabled. +// Get: Returns metadata for the specified folder. Only applicable to buckets +// with hierarchical namespace enabled. // // - bucket: Name of the bucket in which the folder resides. // - folder: Name of a folder. @@ -8672,10 +6282,9 @@ func (r *FoldersService) Get(bucket string, folder string) *FoldersGetCall { return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the return of the folder metadata -// conditional on whether the folder's current metageneration matches -// the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the return of the folder metadata conditional on whether the folder's +// current metageneration matches the given value. func (c *FoldersGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *FoldersGetCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c @@ -8683,41 +6292,37 @@ func (c *FoldersGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *Fol // IfMetagenerationNotMatch sets the optional parameter // "ifMetagenerationNotMatch": Makes the return of the folder metadata -// conditional on whether the folder's current metageneration does not -// match the given value. +// conditional on whether the folder's current metageneration does not match +// the given value. func (c *FoldersGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *FoldersGetCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *FoldersGetCall) Fields(s ...googleapi.Field) *FoldersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *FoldersGetCall) IfNoneMatch(entityTag string) *FoldersGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *FoldersGetCall) Context(ctx context.Context) *FoldersGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *FoldersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8726,12 +6331,7 @@ func (c *FoldersGetCall) Header() http.Header { } func (c *FoldersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -8753,12 +6353,10 @@ func (c *FoldersGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.folders.get" call. -// Exactly one of *Folder or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Folder.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Folder.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -8789,56 +6387,7 @@ func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error) { return nil, err } return ret, nil - // { - // "description": "Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.", - // "httpMethod": "GET", - // "id": "storage.folders.get", - // "parameterOrder": [ - // "bucket", - // "folder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the folder resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "folder": { - // "description": "Name of a folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/folders/{folder}", - // "response": { - // "$ref": "Folder" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.folders.insert": +} type FoldersInsertCall struct { s *Service @@ -8849,8 +6398,8 @@ type FoldersInsertCall struct { header_ http.Header } -// Insert: Creates a new folder. Only applicable to buckets with -// hierarchical namespace enabled. +// Insert: Creates a new folder. Only applicable to buckets with hierarchical +// namespace enabled. // // - bucket: Name of the bucket in which the folder resides. func (r *FoldersService) Insert(bucket string, folder *Folder) *FoldersInsertCall { @@ -8860,31 +6409,29 @@ func (r *FoldersService) Insert(bucket string, folder *Folder) *FoldersInsertCal return c } -// Recursive sets the optional parameter "recursive": If true, any -// parent folder which doesn’t exist will be created automatically. +// Recursive sets the optional parameter "recursive": If true, any parent +// folder which doesn’t exist will be created automatically. func (c *FoldersInsertCall) Recursive(recursive bool) *FoldersInsertCall { c.urlParams_.Set("recursive", fmt.Sprint(recursive)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *FoldersInsertCall) Fields(s ...googleapi.Field) *FoldersInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *FoldersInsertCall) Context(ctx context.Context) *FoldersInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *FoldersInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -8893,18 +6440,12 @@ func (c *FoldersInsertCall) Header() http.Header { } func (c *FoldersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/folders") @@ -8921,12 +6462,10 @@ func (c *FoldersInsertCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.folders.insert" call. -// Exactly one of *Folder or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Folder.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Folder.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *FoldersInsertCall) Do(opts ...googleapi.CallOption) (*Folder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -8957,43 +6496,7 @@ func (c *FoldersInsertCall) Do(opts ...googleapi.CallOption) (*Folder, error) { return nil, err } return ret, nil - // { - // "description": "Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.", - // "httpMethod": "POST", - // "id": "storage.folders.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the folder resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "recursive": { - // "description": "If true, any parent folder which doesn’t exist will be created automatically.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "b/{bucket}/folders", - // "request": { - // "$ref": "Folder" - // }, - // "response": { - // "$ref": "Folder" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.folders.list": +} type FoldersListCall struct { s *Service @@ -9004,8 +6507,8 @@ type FoldersListCall struct { header_ http.Header } -// List: Retrieves a list of folders matching the criteria. Only -// applicable to buckets with hierarchical namespace enabled. +// List: Retrieves a list of folders matching the criteria. Only applicable to +// buckets with hierarchical namespace enabled. // // - bucket: Name of the bucket in which to look for folders. func (r *FoldersService) List(bucket string) *FoldersListCall { @@ -9014,84 +6517,79 @@ func (r *FoldersService) List(bucket string) *FoldersListCall { return c } -// Delimiter sets the optional parameter "delimiter": Returns results in -// a directory-like mode. The only supported value is '/'. If set, items -// will only contain folders that either exactly match the prefix, or -// are one level below the prefix. +// Delimiter sets the optional parameter "delimiter": Returns results in a +// directory-like mode. The only supported value is '/'. If set, items will +// only contain folders that either exactly match the prefix, or are one level +// below the prefix. func (c *FoldersListCall) Delimiter(delimiter string) *FoldersListCall { c.urlParams_.Set("delimiter", delimiter) return c } -// EndOffset sets the optional parameter "endOffset": Filter results to -// folders whose names are lexicographically before endOffset. If -// startOffset is also set, the folders listed will have names between -// startOffset (inclusive) and endOffset (exclusive). +// EndOffset sets the optional parameter "endOffset": Filter results to folders +// whose names are lexicographically before endOffset. If startOffset is also +// set, the folders listed will have names between startOffset (inclusive) and +// endOffset (exclusive). func (c *FoldersListCall) EndOffset(endOffset string) *FoldersListCall { c.urlParams_.Set("endOffset", endOffset) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// items to return in a single page of responses. +// PageSize sets the optional parameter "pageSize": Maximum number of items to +// return in a single page of responses. func (c *FoldersListCall) PageSize(pageSize int64) *FoldersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *FoldersListCall) PageToken(pageToken string) *FoldersListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Prefix sets the optional parameter "prefix": Filter results to -// folders whose paths begin with this prefix. If set, the value must -// either be an empty string or end with a '/'. +// Prefix sets the optional parameter "prefix": Filter results to folders whose +// paths begin with this prefix. If set, the value must either be an empty +// string or end with a '/'. func (c *FoldersListCall) Prefix(prefix string) *FoldersListCall { c.urlParams_.Set("prefix", prefix) return c } -// StartOffset sets the optional parameter "startOffset": Filter results -// to folders whose names are lexicographically equal to or after -// startOffset. If endOffset is also set, the folders listed will have -// names between startOffset (inclusive) and endOffset (exclusive). +// StartOffset sets the optional parameter "startOffset": Filter results to +// folders whose names are lexicographically equal to or after startOffset. If +// endOffset is also set, the folders listed will have names between +// startOffset (inclusive) and endOffset (exclusive). func (c *FoldersListCall) StartOffset(startOffset string) *FoldersListCall { c.urlParams_.Set("startOffset", startOffset) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *FoldersListCall) Fields(s ...googleapi.Field) *FoldersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *FoldersListCall) IfNoneMatch(entityTag string) *FoldersListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *FoldersListCall) Context(ctx context.Context) *FoldersListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *FoldersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -9100,12 +6598,7 @@ func (c *FoldersListCall) Header() http.Header { } func (c *FoldersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -9126,12 +6619,10 @@ func (c *FoldersListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.folders.list" call. -// Exactly one of *Folders or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Folders.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Folders.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*Folders, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -9162,66 +6653,6 @@ func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*Folders, error) { return nil, err } return ret, nil - // { - // "description": "Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled.", - // "httpMethod": "GET", - // "id": "storage.folders.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which to look for folders.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "delimiter": { - // "description": "Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix.", - // "location": "query", - // "type": "string" - // }, - // "endOffset": { - // "description": "Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of items to return in a single page of responses.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "prefix": { - // "description": "Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'.", - // "location": "query", - // "type": "string" - // }, - // "startOffset": { - // "description": "Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/folders", - // "response": { - // "$ref": "Folders" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } // Pages invokes f for each page of results. @@ -9229,7 +6660,7 @@ func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*Folders, error) { // The provided context supersedes any context provided to the Context method. func (c *FoldersListCall) Pages(ctx context.Context, f func(*Folders) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -9245,8 +6676,6 @@ func (c *FoldersListCall) Pages(ctx context.Context, f func(*Folders) error) err } } -// method id "storage.folders.rename": - type FoldersRenameCall struct { s *Service bucket string @@ -9257,8 +6686,8 @@ type FoldersRenameCall struct { header_ http.Header } -// Rename: Renames a source folder to a destination folder. Only -// applicable to buckets with hierarchical namespace enabled. +// Rename: Renames a source folder to a destination folder. Only applicable to +// buckets with hierarchical namespace enabled. // // - bucket: Name of the bucket in which the folders are in. // - destinationFolder: Name of the destination folder. @@ -9272,41 +6701,37 @@ func (r *FoldersService) Rename(bucket string, sourceFolder string, destinationF } // IfSourceMetagenerationMatch sets the optional parameter -// "ifSourceMetagenerationMatch": Makes the operation conditional on -// whether the source object's current metageneration matches the given -// value. +// "ifSourceMetagenerationMatch": Makes the operation conditional on whether +// the source object's current metageneration matches the given value. func (c *FoldersRenameCall) IfSourceMetagenerationMatch(ifSourceMetagenerationMatch int64) *FoldersRenameCall { c.urlParams_.Set("ifSourceMetagenerationMatch", fmt.Sprint(ifSourceMetagenerationMatch)) return c } // IfSourceMetagenerationNotMatch sets the optional parameter -// "ifSourceMetagenerationNotMatch": Makes the operation conditional on -// whether the source object's current metageneration does not match the -// given value. +// "ifSourceMetagenerationNotMatch": Makes the operation conditional on whether +// the source object's current metageneration does not match the given value. func (c *FoldersRenameCall) IfSourceMetagenerationNotMatch(ifSourceMetagenerationNotMatch int64) *FoldersRenameCall { c.urlParams_.Set("ifSourceMetagenerationNotMatch", fmt.Sprint(ifSourceMetagenerationNotMatch)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *FoldersRenameCall) Fields(s ...googleapi.Field) *FoldersRenameCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *FoldersRenameCall) Context(ctx context.Context) *FoldersRenameCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *FoldersRenameCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -9315,12 +6740,7 @@ func (c *FoldersRenameCall) Header() http.Header { } func (c *FoldersRenameCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -9340,12 +6760,11 @@ func (c *FoldersRenameCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.folders.rename" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *FoldersRenameCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -9376,61 +6795,7 @@ func (c *FoldersRenameCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning return nil, err } return ret, nil - // { - // "description": "Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.", - // "httpMethod": "POST", - // "id": "storage.folders.rename", - // "parameterOrder": [ - // "bucket", - // "sourceFolder", - // "destinationFolder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the folders are in.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationFolder": { - // "description": "Name of the destination folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifSourceMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "sourceFolder": { - // "description": "Name of the source folder.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.managedFolders.delete": +} type ManagedFoldersDeleteCall struct { s *Service @@ -9453,49 +6818,46 @@ func (r *ManagedFoldersService) Delete(bucket string, managedFolder string) *Man } // AllowNonEmpty sets the optional parameter "allowNonEmpty": Allows the -// deletion of a managed folder even if it is not empty. A managed -// folder is empty if there are no objects or managed folders that it -// applies to. Callers must have storage.managedFolders.setIamPolicy -// permission. +// deletion of a managed folder even if it is not empty. A managed folder is +// empty if there are no objects or managed folders that it applies to. Callers +// must have storage.managedFolders.setIamPolicy permission. func (c *ManagedFoldersDeleteCall) AllowNonEmpty(allowNonEmpty bool) *ManagedFoldersDeleteCall { c.urlParams_.Set("allowNonEmpty", fmt.Sprint(allowNonEmpty)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": If set, only deletes the managed folder if -// its metageneration matches this value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// If set, only deletes the managed folder if its metageneration matches this +// value. func (c *ManagedFoldersDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ManagedFoldersDeleteCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": If set, only deletes the managed folder -// if its metageneration does not match this value. +// "ifMetagenerationNotMatch": If set, only deletes the managed folder if its +// metageneration does not match this value. func (c *ManagedFoldersDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ManagedFoldersDeleteCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersDeleteCall) Fields(s ...googleapi.Field) *ManagedFoldersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersDeleteCall) Context(ctx context.Context) *ManagedFoldersDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -9504,12 +6866,7 @@ func (c *ManagedFoldersDeleteCall) Header() http.Header { } func (c *ManagedFoldersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -9539,56 +6896,7 @@ func (c *ManagedFoldersDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes a managed folder.", - // "httpMethod": "DELETE", - // "id": "storage.managedFolders.delete", - // "parameterOrder": [ - // "bucket", - // "managedFolder" - // ], - // "parameters": { - // "allowNonEmpty": { - // "description": "Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission.", - // "location": "query", - // "type": "boolean" - // }, - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "If set, only deletes the managed folder if its metageneration matches this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "If set, only deletes the managed folder if its metageneration does not match this value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "managedFolder": { - // "description": "The managed folder name/path.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders/{managedFolder}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.managedFolders.get": +} type ManagedFoldersGetCall struct { s *Service @@ -9611,52 +6919,47 @@ func (r *ManagedFoldersService) Get(bucket string, managedFolder string) *Manage return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the return of the managed folder -// metadata conditional on whether the managed folder's current -// metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the return of the managed folder metadata conditional on whether the +// managed folder's current metageneration matches the given value. func (c *ManagedFoldersGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ManagedFoldersGetCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the return of the managed folder -// metadata conditional on whether the managed folder's current -// metageneration does not match the given value. +// "ifMetagenerationNotMatch": Makes the return of the managed folder metadata +// conditional on whether the managed folder's current metageneration does not +// match the given value. func (c *ManagedFoldersGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ManagedFoldersGetCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersGetCall) Fields(s ...googleapi.Field) *ManagedFoldersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ManagedFoldersGetCall) IfNoneMatch(entityTag string) *ManagedFoldersGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersGetCall) Context(ctx context.Context) *ManagedFoldersGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -9665,12 +6968,7 @@ func (c *ManagedFoldersGetCall) Header() http.Header { } func (c *ManagedFoldersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -9692,12 +6990,10 @@ func (c *ManagedFoldersGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.managedFolders.get" call. -// Exactly one of *ManagedFolder or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ManagedFolder.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ManagedFolder.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ManagedFoldersGetCall) Do(opts ...googleapi.CallOption) (*ManagedFolder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -9728,56 +7024,7 @@ func (c *ManagedFoldersGetCall) Do(opts ...googleapi.CallOption) (*ManagedFolder return nil, err } return ret, nil - // { - // "description": "Returns metadata of the specified managed folder.", - // "httpMethod": "GET", - // "id": "storage.managedFolders.get", - // "parameterOrder": [ - // "bucket", - // "managedFolder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "managedFolder": { - // "description": "The managed folder name/path.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders/{managedFolder}", - // "response": { - // "$ref": "ManagedFolder" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.managedFolders.getIamPolicy": +} type ManagedFoldersGetIamPolicyCall struct { s *Service @@ -9802,49 +7049,44 @@ func (r *ManagedFoldersService) GetIamPolicy(bucket string, managedFolder string // OptionsRequestedPolicyVersion sets the optional parameter // "optionsRequestedPolicyVersion": The IAM policy format version to be -// returned. If the optionsRequestedPolicyVersion is for an older -// version that doesn't support part of the requested IAM policy, the -// request fails. +// returned. If the optionsRequestedPolicyVersion is for an older version that +// doesn't support part of the requested IAM policy, the request fails. func (c *ManagedFoldersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ManagedFoldersGetIamPolicyCall { c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ManagedFoldersGetIamPolicyCall) UserProject(userProject string) *ManagedFoldersGetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedFoldersGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ManagedFoldersGetIamPolicyCall) IfNoneMatch(entityTag string) *ManagedFoldersGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersGetIamPolicyCall) Context(ctx context.Context) *ManagedFoldersGetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -9853,12 +7095,7 @@ func (c *ManagedFoldersGetIamPolicyCall) Header() http.Header { } func (c *ManagedFoldersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -9880,12 +7117,10 @@ func (c *ManagedFoldersGetIamPolicyCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.managedFolders.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ManagedFoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -9916,56 +7151,7 @@ func (c *ManagedFoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli return nil, err } return ret, nil - // { - // "description": "Returns an IAM policy for the specified managed folder.", - // "httpMethod": "GET", - // "id": "storage.managedFolders.getIamPolicy", - // "parameterOrder": [ - // "bucket", - // "managedFolder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "managedFolder": { - // "description": "The managed folder name/path.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "optionsRequestedPolicyVersion": { - // "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", - // "format": "int32", - // "location": "query", - // "minimum": "1", - // "type": "integer" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders/{managedFolder}/iam", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.managedFolders.insert": +} type ManagedFoldersInsertCall struct { s *Service @@ -9987,23 +7173,21 @@ func (r *ManagedFoldersService) Insert(bucket string, managedfolder *ManagedFold } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersInsertCall) Fields(s ...googleapi.Field) *ManagedFoldersInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersInsertCall) Context(ctx context.Context) *ManagedFoldersInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10012,18 +7196,12 @@ func (c *ManagedFoldersInsertCall) Header() http.Header { } func (c *ManagedFoldersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedfolder) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/managedFolders") @@ -10040,12 +7218,10 @@ func (c *ManagedFoldersInsertCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.managedFolders.insert" call. -// Exactly one of *ManagedFolder or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ManagedFolder.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ManagedFolder.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ManagedFoldersInsertCall) Do(opts ...googleapi.CallOption) (*ManagedFolder, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -10076,38 +7252,7 @@ func (c *ManagedFoldersInsertCall) Do(opts ...googleapi.CallOption) (*ManagedFol return nil, err } return ret, nil - // { - // "description": "Creates a new managed folder.", - // "httpMethod": "POST", - // "id": "storage.managedFolders.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders", - // "request": { - // "$ref": "ManagedFolder" - // }, - // "response": { - // "$ref": "ManagedFolder" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.managedFolders.list": +} type ManagedFoldersListCall struct { s *Service @@ -10127,56 +7272,51 @@ func (r *ManagedFoldersService) List(bucket string) *ManagedFoldersListCall { return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// items to return in a single page of responses. +// PageSize sets the optional parameter "pageSize": Maximum number of items to +// return in a single page of responses. func (c *ManagedFoldersListCall) PageSize(pageSize int64) *ManagedFoldersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *ManagedFoldersListCall) PageToken(pageToken string) *ManagedFoldersListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Prefix sets the optional parameter "prefix": The managed folder -// name/path prefix to filter the output list of results. +// Prefix sets the optional parameter "prefix": The managed folder name/path +// prefix to filter the output list of results. func (c *ManagedFoldersListCall) Prefix(prefix string) *ManagedFoldersListCall { c.urlParams_.Set("prefix", prefix) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersListCall) Fields(s ...googleapi.Field) *ManagedFoldersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ManagedFoldersListCall) IfNoneMatch(entityTag string) *ManagedFoldersListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersListCall) Context(ctx context.Context) *ManagedFoldersListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10185,12 +7325,7 @@ func (c *ManagedFoldersListCall) Header() http.Header { } func (c *ManagedFoldersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -10211,12 +7346,10 @@ func (c *ManagedFoldersListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.managedFolders.list" call. -// Exactly one of *ManagedFolders or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ManagedFolders.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ManagedFolders.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ManagedFoldersListCall) Do(opts ...googleapi.CallOption) (*ManagedFolders, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -10247,51 +7380,6 @@ func (c *ManagedFoldersListCall) Do(opts ...googleapi.CallOption) (*ManagedFolde return nil, err } return ret, nil - // { - // "description": "Lists managed folders in the given bucket.", - // "httpMethod": "GET", - // "id": "storage.managedFolders.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of items to return in a single page of responses.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "prefix": { - // "description": "The managed folder name/path prefix to filter the output list of results.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders", - // "response": { - // "$ref": "ManagedFolders" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } // Pages invokes f for each page of results. @@ -10299,7 +7387,7 @@ func (c *ManagedFoldersListCall) Do(opts ...googleapi.CallOption) (*ManagedFolde // The provided context supersedes any context provided to the Context method. func (c *ManagedFoldersListCall) Pages(ctx context.Context, f func(*ManagedFolders) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -10315,8 +7403,6 @@ func (c *ManagedFoldersListCall) Pages(ctx context.Context, f func(*ManagedFolde } } -// method id "storage.managedFolders.setIamPolicy": - type ManagedFoldersSetIamPolicyCall struct { s *Service bucket string @@ -10339,31 +7425,29 @@ func (r *ManagedFoldersService) SetIamPolicy(bucket string, managedFolder string return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ManagedFoldersSetIamPolicyCall) UserProject(userProject string) *ManagedFoldersSetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedFoldersSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersSetIamPolicyCall) Context(ctx context.Context) *ManagedFoldersSetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10372,18 +7456,12 @@ func (c *ManagedFoldersSetIamPolicyCall) Header() http.Header { } func (c *ManagedFoldersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/managedFolders/{managedFolder}/iam") @@ -10401,12 +7479,10 @@ func (c *ManagedFoldersSetIamPolicyCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.managedFolders.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ManagedFoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -10437,49 +7513,7 @@ func (c *ManagedFoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli return nil, err } return ret, nil - // { - // "description": "Updates an IAM policy for the specified managed folder.", - // "httpMethod": "PUT", - // "id": "storage.managedFolders.setIamPolicy", - // "parameterOrder": [ - // "bucket", - // "managedFolder" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "managedFolder": { - // "description": "The managed folder name/path.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders/{managedFolder}/iam", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.managedFolders.testIamPermissions": +} type ManagedFoldersTestIamPermissionsCall struct { s *Service @@ -10491,8 +7525,8 @@ type ManagedFoldersTestIamPermissionsCall struct { header_ http.Header } -// TestIamPermissions: Tests a set of permissions on the given managed -// folder to see which, if any, are held by the caller. +// TestIamPermissions: Tests a set of permissions on the given managed folder +// to see which, if any, are held by the caller. // // - bucket: Name of the bucket containing the managed folder. // - managedFolder: The managed folder name/path. @@ -10505,41 +7539,37 @@ func (r *ManagedFoldersService) TestIamPermissions(bucket string, managedFolder return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ManagedFoldersTestIamPermissionsCall) UserProject(userProject string) *ManagedFoldersTestIamPermissionsCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ManagedFoldersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedFoldersTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ManagedFoldersTestIamPermissionsCall) IfNoneMatch(entityTag string) *ManagedFoldersTestIamPermissionsCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ManagedFoldersTestIamPermissionsCall) Context(ctx context.Context) *ManagedFoldersTestIamPermissionsCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ManagedFoldersTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10548,12 +7578,7 @@ func (c *ManagedFoldersTestIamPermissionsCall) Header() http.Header { } func (c *ManagedFoldersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -10575,12 +7600,11 @@ func (c *ManagedFoldersTestIamPermissionsCall) doRequest(alt string) (*http.Resp } // Do executes the "storage.managedFolders.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ManagedFoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -10611,57 +7635,7 @@ func (c *ManagedFoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) return nil, err } return ret, nil - // { - // "description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.", - // "httpMethod": "GET", - // "id": "storage.managedFolders.testIamPermissions", - // "parameterOrder": [ - // "bucket", - // "managedFolder", - // "permissions" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket containing the managed folder.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "managedFolder": { - // "description": "The managed folder name/path.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "permissions": { - // "description": "Permissions to test.", - // "location": "query", - // "repeated": true, - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions", - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.notifications.delete": +} type NotificationsDeleteCall struct { s *Service @@ -10683,31 +7657,29 @@ func (r *NotificationsService) Delete(bucket string, notification string) *Notif return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *NotificationsDeleteCall) UserProject(userProject string) *NotificationsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *NotificationsDeleteCall) Fields(s ...googleapi.Field) *NotificationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *NotificationsDeleteCall) Context(ctx context.Context) *NotificationsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *NotificationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10716,12 +7688,7 @@ func (c *NotificationsDeleteCall) Header() http.Header { } func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -10751,44 +7718,7 @@ func (c *NotificationsDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes a notification subscription.", - // "httpMethod": "DELETE", - // "id": "storage.notifications.delete", - // "parameterOrder": [ - // "bucket", - // "notification" - // ], - // "parameters": { - // "bucket": { - // "description": "The parent bucket of the notification.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "notification": { - // "description": "ID of the notification to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/notificationConfigs/{notification}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.notifications.get": +} type NotificationsGetCall struct { s *Service @@ -10811,41 +7741,37 @@ func (r *NotificationsService) Get(bucket string, notification string) *Notifica return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *NotificationsGetCall) UserProject(userProject string) *NotificationsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *NotificationsGetCall) Fields(s ...googleapi.Field) *NotificationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *NotificationsGetCall) IfNoneMatch(entityTag string) *NotificationsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *NotificationsGetCall) Context(ctx context.Context) *NotificationsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *NotificationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -10854,12 +7780,7 @@ func (c *NotificationsGetCall) Header() http.Header { } func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -10881,12 +7802,10 @@ func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.notifications.get" call. -// Exactly one of *Notification or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Notification.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Notification.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -10917,49 +7836,7 @@ func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification, return nil, err } return ret, nil - // { - // "description": "View a notification configuration.", - // "httpMethod": "GET", - // "id": "storage.notifications.get", - // "parameterOrder": [ - // "bucket", - // "notification" - // ], - // "parameters": { - // "bucket": { - // "description": "The parent bucket of the notification.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "notification": { - // "description": "Notification ID", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/notificationConfigs/{notification}", - // "response": { - // "$ref": "Notification" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.notifications.insert": +} type NotificationsInsertCall struct { s *Service @@ -10980,31 +7857,29 @@ func (r *NotificationsService) Insert(bucket string, notification *Notification) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *NotificationsInsertCall) UserProject(userProject string) *NotificationsInsertCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *NotificationsInsertCall) Fields(s ...googleapi.Field) *NotificationsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *NotificationsInsertCall) Context(ctx context.Context) *NotificationsInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *NotificationsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11013,18 +7888,12 @@ func (c *NotificationsInsertCall) Header() http.Header { } func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/notificationConfigs") @@ -11041,12 +7910,10 @@ func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.notifications.insert" call. -// Exactly one of *Notification or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Notification.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Notification.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *NotificationsInsertCall) Do(opts ...googleapi.CallOption) (*Notification, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -11077,43 +7944,7 @@ func (c *NotificationsInsertCall) Do(opts ...googleapi.CallOption) (*Notificatio return nil, err } return ret, nil - // { - // "description": "Creates a notification subscription for a given bucket.", - // "httpMethod": "POST", - // "id": "storage.notifications.insert", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "The parent bucket of the notification.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/notificationConfigs", - // "request": { - // "$ref": "Notification" - // }, - // "response": { - // "$ref": "Notification" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.notifications.list": +} type NotificationsListCall struct { s *Service @@ -11124,8 +7955,7 @@ type NotificationsListCall struct { header_ http.Header } -// List: Retrieves a list of notification subscriptions for a given -// bucket. +// List: Retrieves a list of notification subscriptions for a given bucket. // // - bucket: Name of a Google Cloud Storage bucket. func (r *NotificationsService) List(bucket string) *NotificationsListCall { @@ -11134,41 +7964,37 @@ func (r *NotificationsService) List(bucket string) *NotificationsListCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *NotificationsListCall) UserProject(userProject string) *NotificationsListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *NotificationsListCall) Fields(s ...googleapi.Field) *NotificationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *NotificationsListCall) IfNoneMatch(entityTag string) *NotificationsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *NotificationsListCall) Context(ctx context.Context) *NotificationsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *NotificationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11177,12 +8003,7 @@ func (c *NotificationsListCall) Header() http.Header { } func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -11203,12 +8024,10 @@ func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.notifications.list" call. -// Exactly one of *Notifications or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Notifications.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Notifications.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -11239,42 +8058,7 @@ func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications return nil, err } return ret, nil - // { - // "description": "Retrieves a list of notification subscriptions for a given bucket.", - // "httpMethod": "GET", - // "id": "storage.notifications.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a Google Cloud Storage bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/notificationConfigs", - // "response": { - // "$ref": "Notifications" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objectAccessControls.delete": +} type ObjectAccessControlsDeleteCall struct { s *Service @@ -11286,15 +8070,15 @@ type ObjectAccessControlsDeleteCall struct { header_ http.Header } -// Delete: Permanently deletes the ACL entry for the specified entity on -// the specified object. +// Delete: Permanently deletes the ACL entry for the specified entity on the +// specified object. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, // user-emailAddress, group-groupId, group-emailAddress, allUsers, or // allAuthenticatedUsers. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) Delete(bucket string, object string, entity string) *ObjectAccessControlsDeleteCall { c := &ObjectAccessControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11304,39 +8088,37 @@ func (r *ObjectAccessControlsService) Delete(bucket string, object string, entit return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsDeleteCall) Generation(generation int64) *ObjectAccessControlsDeleteCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsDeleteCall) UserProject(userProject string) *ObjectAccessControlsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsDeleteCall) Fields(s ...googleapi.Field) *ObjectAccessControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11345,12 +8127,7 @@ func (c *ObjectAccessControlsDeleteCall) Header() http.Header { } func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -11381,56 +8158,7 @@ func (c *ObjectAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error return gensupport.WrapError(err) } return nil - // { - // "description": "Permanently deletes the ACL entry for the specified entity on the specified object.", - // "httpMethod": "DELETE", - // "id": "storage.objectAccessControls.delete", - // "parameterOrder": [ - // "bucket", - // "object", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl/{entity}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objectAccessControls.get": +} type ObjectAccessControlsGetCall struct { s *Service @@ -11443,15 +8171,14 @@ type ObjectAccessControlsGetCall struct { header_ http.Header } -// Get: Returns the ACL entry for the specified entity on the specified -// object. +// Get: Returns the ACL entry for the specified entity on the specified object. // // - bucket: Name of a bucket. // - entity: The entity holding the permission. Can be user-userId, // user-emailAddress, group-groupId, group-emailAddress, allUsers, or // allAuthenticatedUsers. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) Get(bucket string, object string, entity string) *ObjectAccessControlsGetCall { c := &ObjectAccessControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11461,49 +8188,45 @@ func (r *ObjectAccessControlsService) Get(bucket string, object string, entity s return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsGetCall) Generation(generation int64) *ObjectAccessControlsGetCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsGetCall) UserProject(userProject string) *ObjectAccessControlsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsGetCall) Fields(s ...googleapi.Field) *ObjectAccessControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectAccessControlsGetCall) IfNoneMatch(entityTag string) *ObjectAccessControlsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11512,12 +8235,7 @@ func (c *ObjectAccessControlsGetCall) Header() http.Header { } func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -11540,12 +8258,11 @@ func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, err } // Do executes the "storage.objectAccessControls.get" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -11576,59 +8293,7 @@ func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectA return nil, err } return ret, nil - // { - // "description": "Returns the ACL entry for the specified entity on the specified object.", - // "httpMethod": "GET", - // "id": "storage.objectAccessControls.get", - // "parameterOrder": [ - // "bucket", - // "object", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl/{entity}", - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objectAccessControls.insert": +} type ObjectAccessControlsInsertCall struct { s *Service @@ -11643,8 +8308,8 @@ type ObjectAccessControlsInsertCall struct { // Insert: Creates a new ACL entry on the specified object. // // - bucket: Name of a bucket. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) Insert(bucket string, object string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsInsertCall { c := &ObjectAccessControlsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11654,39 +8319,37 @@ func (r *ObjectAccessControlsService) Insert(bucket string, object string, objec return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsInsertCall) Generation(generation int64) *ObjectAccessControlsInsertCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsInsertCall) UserProject(userProject string) *ObjectAccessControlsInsertCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsInsertCall) Fields(s ...googleapi.Field) *ObjectAccessControlsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11695,18 +8358,12 @@ func (c *ObjectAccessControlsInsertCall) Header() http.Header { } func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl") @@ -11724,12 +8381,11 @@ func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.objectAccessControls.insert" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -11760,55 +8416,7 @@ func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Obje return nil, err } return ret, nil - // { - // "description": "Creates a new ACL entry on the specified object.", - // "httpMethod": "POST", - // "id": "storage.objectAccessControls.insert", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objectAccessControls.list": +} type ObjectAccessControlsListCall struct { s *Service @@ -11823,8 +8431,8 @@ type ObjectAccessControlsListCall struct { // List: Retrieves ACL entries on the specified object. // // - bucket: Name of a bucket. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) List(bucket string, object string) *ObjectAccessControlsListCall { c := &ObjectAccessControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11833,49 +8441,45 @@ func (r *ObjectAccessControlsService) List(bucket string, object string) *Object return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsListCall) Generation(generation int64) *ObjectAccessControlsListCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsListCall) UserProject(userProject string) *ObjectAccessControlsListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsListCall) Fields(s ...googleapi.Field) *ObjectAccessControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectAccessControlsListCall) IfNoneMatch(entityTag string) *ObjectAccessControlsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -11884,12 +8488,7 @@ func (c *ObjectAccessControlsListCall) Header() http.Header { } func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -11911,12 +8510,11 @@ func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, er } // Do executes the "storage.objectAccessControls.list" call. -// Exactly one of *ObjectAccessControls or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControls.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControls.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControls, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -11947,52 +8545,7 @@ func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Object return nil, err } return ret, nil - // { - // "description": "Retrieves ACL entries on the specified object.", - // "httpMethod": "GET", - // "id": "storage.objectAccessControls.list", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl", - // "response": { - // "$ref": "ObjectAccessControls" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objectAccessControls.patch": +} type ObjectAccessControlsPatchCall struct { s *Service @@ -12011,8 +8564,8 @@ type ObjectAccessControlsPatchCall struct { // - entity: The entity holding the permission. Can be user-userId, // user-emailAddress, group-groupId, group-emailAddress, allUsers, or // allAuthenticatedUsers. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall { c := &ObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12023,39 +8576,37 @@ func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsPatchCall) Generation(generation int64) *ObjectAccessControlsPatchCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsPatchCall) UserProject(userProject string) *ObjectAccessControlsPatchCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsPatchCall) Fields(s ...googleapi.Field) *ObjectAccessControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -12064,18 +8615,12 @@ func (c *ObjectAccessControlsPatchCall) Header() http.Header { } func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}") @@ -12094,12 +8639,11 @@ func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, e } // Do executes the "storage.objectAccessControls.patch" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -12130,62 +8674,7 @@ func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Objec return nil, err } return ret, nil - // { - // "description": "Patches an ACL entry on the specified object.", - // "httpMethod": "PATCH", - // "id": "storage.objectAccessControls.patch", - // "parameterOrder": [ - // "bucket", - // "object", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl/{entity}", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objectAccessControls.update": +} type ObjectAccessControlsUpdateCall struct { s *Service @@ -12204,8 +8693,8 @@ type ObjectAccessControlsUpdateCall struct { // - entity: The entity holding the permission. Can be user-userId, // user-emailAddress, group-groupId, group-emailAddress, allUsers, or // allAuthenticatedUsers. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectAccessControlsService) Update(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsUpdateCall { c := &ObjectAccessControlsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12216,39 +8705,37 @@ func (r *ObjectAccessControlsService) Update(bucket string, object string, entit return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectAccessControlsUpdateCall) Generation(generation int64) *ObjectAccessControlsUpdateCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectAccessControlsUpdateCall) UserProject(userProject string) *ObjectAccessControlsUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectAccessControlsUpdateCall) Fields(s ...googleapi.Field) *ObjectAccessControlsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectAccessControlsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -12257,18 +8744,12 @@ func (c *ObjectAccessControlsUpdateCall) Header() http.Header { } func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}") @@ -12287,12 +8768,11 @@ func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, } // Do executes the "storage.objectAccessControls.update" call. -// Exactly one of *ObjectAccessControl or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ObjectAccessControl.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectAccessControl.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -12323,62 +8803,7 @@ func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Obje return nil, err } return ret, nil - // { - // "description": "Updates an ACL entry on the specified object.", - // "httpMethod": "PUT", - // "id": "storage.objectAccessControls.update", - // "parameterOrder": [ - // "bucket", - // "object", - // "entity" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of a bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "entity": { - // "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/acl/{entity}", - // "request": { - // "$ref": "ObjectAccessControl" - // }, - // "response": { - // "$ref": "ObjectAccessControl" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objects.bulkRestore": +} type ObjectsBulkRestoreCall struct { s *Service @@ -12401,23 +8826,21 @@ func (r *ObjectsService) BulkRestore(bucket string, bulkrestoreobjectsrequest *B } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsBulkRestoreCall) Fields(s ...googleapi.Field) *ObjectsBulkRestoreCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsBulkRestoreCall) Context(ctx context.Context) *ObjectsBulkRestoreCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsBulkRestoreCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -12426,18 +8849,12 @@ func (c *ObjectsBulkRestoreCall) Header() http.Header { } func (c *ObjectsBulkRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkrestoreobjectsrequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/bulkRestore") @@ -12454,12 +8871,11 @@ func (c *ObjectsBulkRestoreCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.bulkRestore" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ObjectsBulkRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -12490,38 +8906,7 @@ func (c *ObjectsBulkRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongru return nil, err } return ret, nil - // { - // "description": "Initiates a long-running bulk restore operation on the specified bucket.", - // "httpMethod": "POST", - // "id": "storage.objects.bulkRestore", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/bulkRestore", - // "request": { - // "$ref": "BulkRestoreObjectsRequest" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.compose": +} type ObjectsComposeCall struct { s *Service @@ -12533,14 +8918,13 @@ type ObjectsComposeCall struct { header_ http.Header } -// Compose: Concatenates a list of existing objects into a new object in -// the same bucket. +// Compose: Concatenates a list of existing objects into a new object in the +// same bucket. // -// - destinationBucket: Name of the bucket containing the source -// objects. The destination object is stored in this bucket. -// - destinationObject: Name of the new object. For information about -// how to URL encode object names to be path safe, see Encoding URI -// Path Parts +// - destinationBucket: Name of the bucket containing the source objects. The +// destination object is stored in this bucket. +// - destinationObject: Name of the new object. For information about how to +// URL encode object names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Compose(destinationBucket string, destinationObject string, composerequest *ComposeRequest) *ObjectsComposeCall { c := &ObjectsComposeCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12551,8 +8935,8 @@ func (r *ObjectsService) Compose(destinationBucket string, destinationObject str } // DestinationPredefinedAcl sets the optional parameter -// "destinationPredefinedAcl": Apply a predefined set of access controls -// to the destination object. +// "destinationPredefinedAcl": Apply a predefined set of access controls to the +// destination object. // // Possible values: // @@ -12560,81 +8944,77 @@ func (r *ObjectsService) Compose(destinationBucket string, destinationObject str // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsComposeCall) DestinationPredefinedAcl(destinationPredefinedAcl string) *ObjectsComposeCall { c.urlParams_.Set("destinationPredefinedAcl", destinationPredefinedAcl) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsComposeCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsComposeCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsComposeCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsComposeCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } -// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of -// the Cloud KMS key, of the form -// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, -// -// that will be used to encrypt the object. Overrides the object -// -// metadata's kms_key_name value, if any. +// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of the +// Cloud KMS key, of the form +// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that +// will be used to encrypt the object. Overrides the object metadata's +// kms_key_name value, if any. func (c *ObjectsComposeCall) KmsKeyName(kmsKeyName string) *ObjectsComposeCall { c.urlParams_.Set("kmsKeyName", kmsKeyName) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsComposeCall) UserProject(userProject string) *ObjectsComposeCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsComposeCall) Fields(s ...googleapi.Field) *ObjectsComposeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsComposeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -12643,18 +9023,12 @@ func (c *ObjectsComposeCall) Header() http.Header { } func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.composerequest) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{destinationBucket}/o/{destinationObject}/compose") @@ -12672,12 +9046,10 @@ func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.compose" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -12708,88 +9080,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Concatenates a list of existing objects into a new object in the same bucket.", - // "httpMethod": "POST", - // "id": "storage.objects.compose", - // "parameterOrder": [ - // "destinationBucket", - // "destinationObject" - // ], - // "parameters": { - // "destinationBucket": { - // "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationObject": { - // "description": "Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationPredefinedAcl": { - // "description": "Apply a predefined set of access controls to the destination object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "kmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{destinationBucket}/o/{destinationObject}/compose", - // "request": { - // "$ref": "ComposeRequest" - // }, - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.copy": +} type ObjectsCopyCall struct { s *Service @@ -12803,22 +9094,20 @@ type ObjectsCopyCall struct { header_ http.Header } -// Copy: Copies a source object to a destination object. Optionally -// overrides metadata. +// Copy: Copies a source object to a destination object. Optionally overrides +// metadata. // -// - destinationBucket: Name of the bucket in which to store the new -// object. Overrides the provided object metadata's bucket value, if -// any.For information about how to URL encode object names to be path -// safe, see Encoding URI Path Parts +// - destinationBucket: Name of the bucket in which to store the new object. +// Overrides the provided object metadata's bucket value, if any.For +// information about how to URL encode object names to be path safe, see +// Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). // - destinationObject: Name of the new object. Required when the object -// metadata is not otherwise provided. Overrides the object metadata's -// name value, if any. -// - sourceBucket: Name of the bucket in which to find the source -// object. -// - sourceObject: Name of the source object. For information about how -// to URL encode object names to be path safe, see Encoding URI Path -// Parts +// metadata is not otherwise provided. Overrides the object metadata's name +// value, if any. +// - sourceBucket: Name of the bucket in which to find the source object. +// - sourceObject: Name of the source object. For information about how to URL +// encode object names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Copy(sourceBucket string, sourceObject string, destinationBucket string, destinationObject string, object *Object) *ObjectsCopyCall { c := &ObjectsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12830,22 +9119,19 @@ func (r *ObjectsService) Copy(sourceBucket string, sourceObject string, destinat return c } -// DestinationKmsKeyName sets the optional parameter -// "destinationKmsKeyName": Resource name of the Cloud KMS key, of the -// form -// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, -// -// that will be used to encrypt the object. Overrides the object -// -// metadata's kms_key_name value, if any. +// DestinationKmsKeyName sets the optional parameter "destinationKmsKeyName": +// Resource name of the Cloud KMS key, of the form +// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that +// will be used to encrypt the object. Overrides the object metadata's +// kms_key_name value, if any. func (c *ObjectsCopyCall) DestinationKmsKeyName(destinationKmsKeyName string) *ObjectsCopyCall { c.urlParams_.Set("destinationKmsKeyName", destinationKmsKeyName) return c } // DestinationPredefinedAcl sets the optional parameter -// "destinationPredefinedAcl": Apply a predefined set of access controls -// to the destination object. +// "destinationPredefinedAcl": Apply a predefined set of access controls to the +// destination object. // // Possible values: // @@ -12853,103 +9139,97 @@ func (c *ObjectsCopyCall) DestinationKmsKeyName(destinationKmsKeyName string) *O // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsCopyCall) DestinationPredefinedAcl(destinationPredefinedAcl string) *ObjectsCopyCall { c.urlParams_.Set("destinationPredefinedAcl", destinationPredefinedAcl) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the destination object's -// current generation matches the given value. Setting to 0 makes the -// operation succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the destination object's current generation +// matches the given value. Setting to 0 makes the operation succeed only if +// there are no live versions of the object. func (c *ObjectsCopyCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the destination object's current generation does not match the given -// value. If no live object exists, the precondition fails. Setting to 0 -// makes the operation succeed only if there is a live version of the -// object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the destination object's current +// generation does not match the given value. If no live object exists, the +// precondition fails. Setting to 0 makes the operation succeed only if there +// is a live version of the object. func (c *ObjectsCopyCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the destination object's current metageneration matches the given -// value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the destination object's current +// metageneration matches the given value. func (c *ObjectsCopyCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the destination object's current metageneration does not -// match the given value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// destination object's current metageneration does not match the given value. func (c *ObjectsCopyCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } // IfSourceGenerationMatch sets the optional parameter -// "ifSourceGenerationMatch": Makes the operation conditional on whether -// the source object's current generation matches the given value. +// "ifSourceGenerationMatch": Makes the operation conditional on whether the +// source object's current generation matches the given value. func (c *ObjectsCopyCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch)) return c } // IfSourceGenerationNotMatch sets the optional parameter -// "ifSourceGenerationNotMatch": Makes the operation conditional on -// whether the source object's current generation does not match the -// given value. +// "ifSourceGenerationNotMatch": Makes the operation conditional on whether the +// source object's current generation does not match the given value. func (c *ObjectsCopyCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch)) return c } // IfSourceMetagenerationMatch sets the optional parameter -// "ifSourceMetagenerationMatch": Makes the operation conditional on -// whether the source object's current metageneration matches the given -// value. +// "ifSourceMetagenerationMatch": Makes the operation conditional on whether +// the source object's current metageneration matches the given value. func (c *ObjectsCopyCall) IfSourceMetagenerationMatch(ifSourceMetagenerationMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceMetagenerationMatch", fmt.Sprint(ifSourceMetagenerationMatch)) return c } // IfSourceMetagenerationNotMatch sets the optional parameter -// "ifSourceMetagenerationNotMatch": Makes the operation conditional on -// whether the source object's current metageneration does not match the -// given value. +// "ifSourceMetagenerationNotMatch": Makes the operation conditional on whether +// the source object's current metageneration does not match the given value. func (c *ObjectsCopyCall) IfSourceMetagenerationNotMatch(ifSourceMetagenerationNotMatch int64) *ObjectsCopyCall { c.urlParams_.Set("ifSourceMetagenerationNotMatch", fmt.Sprint(ifSourceMetagenerationNotMatch)) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl, unless the object resource -// specifies the acl property, when it defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl, unless the object resource specifies the acl +// property, when it defaults to full. // // Possible values: // @@ -12960,39 +9240,37 @@ func (c *ObjectsCopyCall) Projection(projection string) *ObjectsCopyCall { return c } -// SourceGeneration sets the optional parameter "sourceGeneration": If -// present, selects a specific revision of the source object (as opposed -// to the latest version, the default). +// SourceGeneration sets the optional parameter "sourceGeneration": If present, +// selects a specific revision of the source object (as opposed to the latest +// version, the default). func (c *ObjectsCopyCall) SourceGeneration(sourceGeneration int64) *ObjectsCopyCall { c.urlParams_.Set("sourceGeneration", fmt.Sprint(sourceGeneration)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsCopyCall) UserProject(userProject string) *ObjectsCopyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsCopyCall) Fields(s ...googleapi.Field) *ObjectsCopyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsCopyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -13001,18 +9279,12 @@ func (c *ObjectsCopyCall) Header() http.Header { } func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}") @@ -13032,12 +9304,10 @@ func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.copy" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -13068,157 +9338,7 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Copies a source object to a destination object. Optionally overrides metadata.", - // "httpMethod": "POST", - // "id": "storage.objects.copy", - // "parameterOrder": [ - // "sourceBucket", - // "sourceObject", - // "destinationBucket", - // "destinationObject" - // ], - // "parameters": { - // "destinationBucket": { - // "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationKmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - // "location": "query", - // "type": "string" - // }, - // "destinationObject": { - // "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationPredefinedAcl": { - // "description": "Apply a predefined set of access controls to the destination object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceGenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "sourceBucket": { - // "description": "Name of the bucket in which to find the source object.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sourceGeneration": { - // "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "sourceObject": { - // "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}", - // "request": { - // "$ref": "Object" - // }, - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.delete": +} type ObjectsDeleteCall struct { s *Service @@ -13229,13 +9349,13 @@ type ObjectsDeleteCall struct { header_ http.Header } -// Delete: Deletes an object and its metadata. Deletions are permanent -// if versioning is not enabled for the bucket, or if the generation -// parameter is used. +// Delete: Deletes an object and its metadata. Deletions are permanent if +// versioning is not enabled for the bucket, or if the generation parameter is +// used. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Delete(bucket string, object string) *ObjectsDeleteCall { c := &ObjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13244,75 +9364,72 @@ func (r *ObjectsService) Delete(bucket string, object string) *ObjectsDeleteCall return c } -// Generation sets the optional parameter "generation": If present, -// permanently deletes a specific revision of this object (as opposed to -// the latest version, the default). +// Generation sets the optional parameter "generation": If present, permanently +// deletes a specific revision of this object (as opposed to the latest +// version, the default). func (c *ObjectsDeleteCall) Generation(generation int64) *ObjectsDeleteCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsDeleteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsDeleteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the object's current metageneration does not match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// object's current metageneration does not match the given value. func (c *ObjectsDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsDeleteCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsDeleteCall) UserProject(userProject string) *ObjectsDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsDeleteCall) Fields(s ...googleapi.Field) *ObjectsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -13321,12 +9438,7 @@ func (c *ObjectsDeleteCall) Header() http.Header { } func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -13356,74 +9468,7 @@ func (c *ObjectsDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.", - // "httpMethod": "DELETE", - // "id": "storage.objects.delete", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.get": +} type ObjectsGetCall struct { s *Service @@ -13438,8 +9483,8 @@ type ObjectsGetCall struct { // Get: Retrieves an object or its metadata. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Get(bucket string, object string) *ObjectsGetCall { c := &ObjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13448,52 +9493,51 @@ func (r *ObjectsService) Get(bucket string, object string) *ObjectsGetCall { return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsGetCall) Generation(generation int64) *ObjectsGetCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsGetCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsGetCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the object's current metageneration does not match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// object's current metageneration does not match the given value. func (c *ObjectsGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsGetCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl. // // Possible values: // @@ -13505,48 +9549,44 @@ func (c *ObjectsGetCall) Projection(projection string) *ObjectsGetCall { } // SoftDeleted sets the optional parameter "softDeleted": If true, only -// soft-deleted object versions will be listed. The default is false. -// For more information, see Soft Delete. +// soft-deleted object versions will be listed. The default is false. For more +// information, see Soft Delete. func (c *ObjectsGetCall) SoftDeleted(softDeleted bool) *ObjectsGetCall { c.urlParams_.Set("softDeleted", fmt.Sprint(softDeleted)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsGetCall) UserProject(userProject string) *ObjectsGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsGetCall) Fields(s ...googleapi.Field) *ObjectsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectsGetCall) IfNoneMatch(entityTag string) *ObjectsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do and Download -// methods. Any pending HTTP request will be aborted if the provided -// context is canceled. +// Context sets the context to be used in this call's Do and Download methods. func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -13555,12 +9595,7 @@ func (c *ObjectsGetCall) Header() http.Header { } func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -13598,12 +9633,10 @@ func (c *ObjectsGetCall) Download(opts ...googleapi.CallOption) (*http.Response, } // Do executes the "storage.objects.get" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -13634,99 +9667,7 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Retrieves an object or its metadata.", - // "httpMethod": "GET", - // "id": "storage.objects.get", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "softDeleted": { - // "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", - // "location": "query", - // "type": "boolean" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}", - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsMediaDownload": true, - // "useMediaDownloadService": true - // } - -} - -// method id "storage.objects.getIamPolicy": +} type ObjectsGetIamPolicyCall struct { s *Service @@ -13741,8 +9682,8 @@ type ObjectsGetIamPolicyCall struct { // GetIamPolicy: Returns an IAM policy for the specified object. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) GetIamPolicy(bucket string, object string) *ObjectsGetIamPolicyCall { c := &ObjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13751,49 +9692,45 @@ func (r *ObjectsService) GetIamPolicy(bucket string, object string) *ObjectsGetI return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsGetIamPolicyCall) Generation(generation int64) *ObjectsGetIamPolicyCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsGetIamPolicyCall) UserProject(userProject string) *ObjectsGetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsGetIamPolicyCall) Fields(s ...googleapi.Field) *ObjectsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectsGetIamPolicyCall) IfNoneMatch(entityTag string) *ObjectsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsGetIamPolicyCall) Context(ctx context.Context) *ObjectsGetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -13802,12 +9739,7 @@ func (c *ObjectsGetIamPolicyCall) Header() http.Header { } func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -13829,12 +9761,10 @@ func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.objects.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -13865,55 +9795,7 @@ func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err return nil, err } return ret, nil - // { - // "description": "Returns an IAM policy for the specified object.", - // "httpMethod": "GET", - // "id": "storage.objects.getIamPolicy", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/iam", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.insert": +} type ObjectsInsertCall struct { s *Service @@ -13928,8 +9810,8 @@ type ObjectsInsertCall struct { // Insert: Stores a new object and metadata. // -// - bucket: Name of the bucket in which to store the new object. -// Overrides the provided object metadata's bucket value, if any. +// - bucket: Name of the bucket in which to store the new object. Overrides the +// provided object metadata's bucket value, if any. func (r *ObjectsService) Insert(bucket string, object *Object) *ObjectsInsertCall { c := &ObjectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -13937,69 +9819,65 @@ func (r *ObjectsService) Insert(bucket string, object *Object) *ObjectsInsertCal return c } -// ContentEncoding sets the optional parameter "contentEncoding": If -// set, sets the contentEncoding property of the final object to this -// value. Setting this parameter is equivalent to setting the -// contentEncoding metadata property. This can be useful when uploading -// an object with uploadType=media to indicate the encoding of the -// content being uploaded. +// ContentEncoding sets the optional parameter "contentEncoding": If set, sets +// the contentEncoding property of the final object to this value. Setting this +// parameter is equivalent to setting the contentEncoding metadata property. +// This can be useful when uploading an object with uploadType=media to +// indicate the encoding of the content being uploaded. func (c *ObjectsInsertCall) ContentEncoding(contentEncoding string) *ObjectsInsertCall { c.urlParams_.Set("contentEncoding", contentEncoding) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsInsertCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsInsertCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsInsertCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the object's current metageneration does not match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// object's current metageneration does not match the given value. func (c *ObjectsInsertCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsInsertCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of -// the Cloud KMS key, of the form -// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, -// -// that will be used to encrypt the object. Overrides the object -// -// metadata's kms_key_name value, if any. +// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of the +// Cloud KMS key, of the form +// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that +// will be used to encrypt the object. Overrides the object metadata's +// kms_key_name value, if any. func (c *ObjectsInsertCall) KmsKeyName(kmsKeyName string) *ObjectsInsertCall { c.urlParams_.Set("kmsKeyName", kmsKeyName) return c } -// Name sets the optional parameter "name": Name of the object. Required -// when the object metadata is not otherwise provided. Overrides the -// object metadata's name value, if any. For information about how to -// URL encode object names to be path safe, see Encoding URI Path Parts +// Name sets the optional parameter "name": Name of the object. Required when +// the object metadata is not otherwise provided. Overrides the object +// metadata's name value, if any. For information about how to URL encode +// object names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (c *ObjectsInsertCall) Name(name string) *ObjectsInsertCall { c.urlParams_.Set("name", name) @@ -14015,30 +9893,30 @@ func (c *ObjectsInsertCall) Name(name string) *ObjectsInsertCall { // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsInsertCall) PredefinedAcl(predefinedAcl string) *ObjectsInsertCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl, unless the object resource -// specifies the acl property, when it defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl, unless the object resource specifies the acl +// property, when it defaults to full. // // Possible values: // @@ -14049,20 +9927,19 @@ func (c *ObjectsInsertCall) Projection(projection string) *ObjectsInsertCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsInsertCall) UserProject(userProject string) *ObjectsInsertCall { c.urlParams_.Set("userProject", userProject) return c } -// Media specifies the media to upload in one or more chunks. The chunk -// size may be controlled by supplying a MediaOption generated by +// Media specifies the media to upload in one or more chunks. The chunk size +// may be controlled by supplying a MediaOption generated by // googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the -// upload request will be determined by sniffing the contents of r, -// unless a MediaOption generated by googleapi.ContentType is -// supplied. +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload +// request will be determined by sniffing the contents of r, unless a +// MediaOption generated by googleapi.ContentType is supplied. // At most one of Media and ResumableMedia may be set. func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ObjectsInsertCall { if ct := c.object.ContentType; ct != "" { @@ -14072,46 +9949,45 @@ func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) return c } -// ResumableMedia specifies the media to upload in chunks and can be -// canceled with ctx. +// ResumableMedia specifies the media to upload in chunks and can be canceled +// with ctx. // // Deprecated: use Media instead. // -// At most one of Media and ResumableMedia may be set. mediaType -// identifies the MIME media type of the upload, such as "image/png". If -// mediaType is "", it will be auto-detected. The provided ctx will -// supersede any context previously provided to the Context method. +// At most one of Media and ResumableMedia may be set. mediaType identifies the +// MIME media type of the upload, such as "image/png". If mediaType is "", it +// will be auto-detected. The provided ctx will supersede any context +// previously provided to the Context method. func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall { c.ctx_ = ctx c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) return c } -// ProgressUpdater provides a callback function that will be called -// after every chunk. It should be a low-latency function in order to -// not slow down the upload operation. This should only be called when -// using ResumableMedia (as opposed to Media). +// ProgressUpdater provides a callback function that will be called after every +// chunk. It should be a low-latency function in order to not slow down the +// upload operation. This should only be called when using ResumableMedia (as +// opposed to Media). func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall { c.mediaInfo_.SetProgressUpdater(pu) return c } -// WithRetry causes the library to retry the initial request of the -// upload(for resumable uploads) or the entire upload (for multipart -// uploads) ifa transient error occurs. This is contingent on ChunkSize -// being > 0 (sothat the input data may be buffered). The backoff -// argument will be used todetermine exponential backoff timing, and the -// errorFunc is used to determinewhich errors are considered retryable. -// By default, exponetial backoff will beapplied using gax defaults, and -// the following errors are retried: +// WithRetry causes the library to retry the initial request of the upload(for +// resumable uploads) or the entire upload (for multipart uploads) ifa +// transient error occurs. This is contingent on ChunkSize being > 0 (sothat +// the input data may be buffered). The backoff argument will be used +// todetermine exponential backoff timing, and the errorFunc is used to +// determinewhich errors are considered retryable. By default, exponetial +// backoff will beapplied using gax defaults, and the following errors are +// retried: // // - HTTP responses with codes 408, 429, 502, 503, and 504. // // - Transient network errors such as connection reset and // io.ErrUnexpectedEOF. // -// - Errors which are considered transient using the Temporary() -// interface. +// - Errors which are considered transient using the Temporary() interface. // // - Wrapped versions of these errors. func (c *ObjectsInsertCall) WithRetry(bo *gax.Backoff, errorFunc func(err error) bool) *ObjectsInsertCall { @@ -14123,16 +9999,14 @@ func (c *ObjectsInsertCall) WithRetry(bo *gax.Backoff, errorFunc func(err error) } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsInsertCall) Fields(s ...googleapi.Field) *ObjectsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. // This context will supersede any context previously provided to the // ResumableMedia method. func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall { @@ -14140,8 +10014,8 @@ func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall { return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -14150,18 +10024,12 @@ func (c *ObjectsInsertCall) Header() http.Header { } func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o") @@ -14192,12 +10060,10 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.insert" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -14246,132 +10112,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Stores a new object and metadata.", - // "httpMethod": "POST", - // "id": "storage.objects.insert", - // "mediaUpload": { - // "accept": [ - // "*/*" - // ], - // "protocols": { - // "resumable": { - // "multipart": true, - // "path": "/resumable/upload/storage/v1/b/{bucket}/o" - // }, - // "simple": { - // "multipart": true, - // "path": "/upload/storage/v1/b/{bucket}/o" - // } - // } - // }, - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "contentEncoding": { - // "description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "kmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "query", - // "type": "string" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o", - // "request": { - // "$ref": "Object" - // }, - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsMediaUpload": true - // } - -} - -// method id "storage.objects.list": +} type ObjectsListCall struct { s *Service @@ -14391,30 +10132,29 @@ func (r *ObjectsService) List(bucket string) *ObjectsListCall { return c } -// Delimiter sets the optional parameter "delimiter": Returns results in -// a directory-like mode. items will contain 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 sets the optional parameter "delimiter": Returns results in a +// directory-like mode. items will contain 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. func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall { c.urlParams_.Set("delimiter", delimiter) return c } -// EndOffset sets the optional parameter "endOffset": Filter results to -// objects whose names are lexicographically before endOffset. If -// startOffset is also set, the objects listed will have names between -// startOffset (inclusive) and endOffset (exclusive). +// EndOffset sets the optional parameter "endOffset": Filter results to objects +// whose names are lexicographically before endOffset. If startOffset is also +// set, the objects listed will have names between startOffset (inclusive) and +// endOffset (exclusive). func (c *ObjectsListCall) EndOffset(endOffset string) *ObjectsListCall { c.urlParams_.Set("endOffset", endOffset) return c } // IncludeFoldersAsPrefixes sets the optional parameter -// "includeFoldersAsPrefixes": Only applicable if delimiter is set to -// '/'. If true, will also include folders and managed folders (besides -// objects) in the returned prefixes. +// "includeFoldersAsPrefixes": Only applicable if delimiter is set to '/'. If +// true, will also include folders and managed folders (besides objects) in the +// returned prefixes. func (c *ObjectsListCall) IncludeFoldersAsPrefixes(includeFoldersAsPrefixes bool) *ObjectsListCall { c.urlParams_.Set("includeFoldersAsPrefixes", fmt.Sprint(includeFoldersAsPrefixes)) return c @@ -14422,47 +10162,45 @@ func (c *ObjectsListCall) IncludeFoldersAsPrefixes(includeFoldersAsPrefixes bool // IncludeTrailingDelimiter sets the optional parameter // "includeTrailingDelimiter": If true, objects that end in exactly one -// instance of delimiter will have their metadata included in items in -// addition to prefixes. +// instance of delimiter will have their metadata included in items in addition +// to prefixes. func (c *ObjectsListCall) IncludeTrailingDelimiter(includeTrailingDelimiter bool) *ObjectsListCall { c.urlParams_.Set("includeTrailingDelimiter", fmt.Sprint(includeTrailingDelimiter)) return c } -// MatchGlob sets the optional parameter "matchGlob": Filter results to -// objects and prefixes that match this glob pattern. +// MatchGlob sets the optional parameter "matchGlob": Filter results to objects +// and prefixes that match this glob pattern. func (c *ObjectsListCall) MatchGlob(matchGlob string) *ObjectsListCall { c.urlParams_.Set("matchGlob", matchGlob) return c } -// MaxResults sets the optional parameter "maxResults": 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. +// MaxResults sets the optional parameter "maxResults": 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. func (c *ObjectsListCall) MaxResults(maxResults int64) *ObjectsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *ObjectsListCall) PageToken(pageToken string) *ObjectsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Prefix sets the optional parameter "prefix": Filter results to -// objects whose names begin with this prefix. +// Prefix sets the optional parameter "prefix": Filter results to objects whose +// names begin with this prefix. func (c *ObjectsListCall) Prefix(prefix string) *ObjectsListCall { c.urlParams_.Set("prefix", prefix) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl. // // Possible values: // @@ -14474,65 +10212,61 @@ func (c *ObjectsListCall) Projection(projection string) *ObjectsListCall { } // SoftDeleted sets the optional parameter "softDeleted": If true, only -// soft-deleted object versions will be listed. The default is false. -// For more information, see Soft Delete. +// soft-deleted object versions will be listed. The default is false. For more +// information, see Soft Delete. func (c *ObjectsListCall) SoftDeleted(softDeleted bool) *ObjectsListCall { c.urlParams_.Set("softDeleted", fmt.Sprint(softDeleted)) return c } -// StartOffset sets the optional parameter "startOffset": Filter results -// to objects whose names are lexicographically equal to or after -// startOffset. If endOffset is also set, the objects listed will have -// names between startOffset (inclusive) and endOffset (exclusive). +// StartOffset sets the optional parameter "startOffset": Filter results to +// objects whose names are lexicographically equal to or after startOffset. If +// endOffset is also set, the objects listed will have names between +// startOffset (inclusive) and endOffset (exclusive). func (c *ObjectsListCall) StartOffset(startOffset string) *ObjectsListCall { c.urlParams_.Set("startOffset", startOffset) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsListCall) UserProject(userProject string) *ObjectsListCall { c.urlParams_.Set("userProject", userProject) return c } -// Versions sets the optional parameter "versions": If true, lists all -// versions of an object as distinct results. The default is false. For -// more information, see Object Versioning. +// Versions sets the optional parameter "versions": If true, lists all versions +// of an object as distinct results. The default is false. For more +// information, see Object Versioning. func (c *ObjectsListCall) Versions(versions bool) *ObjectsListCall { c.urlParams_.Set("versions", fmt.Sprint(versions)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsListCall) Fields(s ...googleapi.Field) *ObjectsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectsListCall) IfNoneMatch(entityTag string) *ObjectsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -14541,12 +10275,7 @@ func (c *ObjectsListCall) Header() http.Header { } func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -14567,12 +10296,10 @@ func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.list" call. -// Exactly one of *Objects or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Objects.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Objects.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -14603,111 +10330,6 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { return nil, err } return ret, nil - // { - // "description": "Retrieves a list of objects matching the criteria.", - // "httpMethod": "GET", - // "id": "storage.objects.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which to look for objects.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "delimiter": { - // "description": "Returns results in a directory-like mode. items will contain 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.", - // "location": "query", - // "type": "string" - // }, - // "endOffset": { - // "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // }, - // "includeFoldersAsPrefixes": { - // "description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.", - // "location": "query", - // "type": "boolean" - // }, - // "includeTrailingDelimiter": { - // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", - // "location": "query", - // "type": "boolean" - // }, - // "matchGlob": { - // "description": "Filter results to objects and prefixes that match this glob pattern.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "1000", - // "description": "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.", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "prefix": { - // "description": "Filter results to objects whose names begin with this prefix.", - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "softDeleted": { - // "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", - // "location": "query", - // "type": "boolean" - // }, - // "startOffset": { - // "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // }, - // "versions": { - // "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "b/{bucket}/o", - // "response": { - // "$ref": "Objects" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsSubscription": true - // } - } // Pages invokes f for each page of results. @@ -14715,7 +10337,7 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) { // The provided context supersedes any context provided to the Context method. func (c *ObjectsListCall) Pages(ctx context.Context, f func(*Objects) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -14731,8 +10353,6 @@ func (c *ObjectsListCall) Pages(ctx context.Context, f func(*Objects) error) err } } -// method id "storage.objects.patch": - type ObjectsPatchCall struct { s *Service bucket string @@ -14746,8 +10366,8 @@ type ObjectsPatchCall struct { // Patch: Patches an object's metadata. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall { c := &ObjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14757,45 +10377,44 @@ func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *O return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsPatchCall) Generation(generation int64) *ObjectsPatchCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsPatchCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsPatchCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsPatchCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the object's current metageneration does not match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// object's current metageneration does not match the given value. func (c *ObjectsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsPatchCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c @@ -14803,8 +10422,8 @@ func (c *ObjectsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int // OverrideUnlockedRetention sets the optional parameter // "overrideUnlockedRetention": Must be true to remove the retention -// configuration, reduce its unlocked retention period, or change its -// mode from unlocked to locked. +// configuration, reduce its unlocked retention period, or change its mode from +// unlocked to locked. func (c *ObjectsPatchCall) OverrideUnlockedRetention(overrideUnlockedRetention bool) *ObjectsPatchCall { c.urlParams_.Set("overrideUnlockedRetention", fmt.Sprint(overrideUnlockedRetention)) return c @@ -14819,29 +10438,29 @@ func (c *ObjectsPatchCall) OverrideUnlockedRetention(overrideUnlockedRetention b // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsPatchCall) PredefinedAcl(predefinedAcl string) *ObjectsPatchCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to full. // // Possible values: // @@ -14852,31 +10471,29 @@ func (c *ObjectsPatchCall) Projection(projection string) *ObjectsPatchCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request, for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request, for Requester Pays buckets. func (c *ObjectsPatchCall) UserProject(userProject string) *ObjectsPatchCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsPatchCall) Fields(s ...googleapi.Field) *ObjectsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -14885,18 +10502,12 @@ func (c *ObjectsPatchCall) Header() http.Header { } func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}") @@ -14914,12 +10525,10 @@ func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.patch" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -14950,118 +10559,7 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Patches an object's metadata.", - // "httpMethod": "PATCH", - // "id": "storage.objects.patch", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "overrideUnlockedRetention": { - // "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", - // "location": "query", - // "type": "boolean" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request, for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}", - // "request": { - // "$ref": "Object" - // }, - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objects.restore": +} type ObjectsRestoreCall struct { s *Service @@ -15076,8 +10574,8 @@ type ObjectsRestoreCall struct { // // - bucket: Name of the bucket in which the object resides. // - generation: Selects a specific revision of this object. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts. +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts. func (r *ObjectsService) Restore(bucket string, object string, generation int64) *ObjectsRestoreCall { c := &ObjectsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -15086,52 +10584,51 @@ func (r *ObjectsService) Restore(bucket string, object string, generation int64) return c } -// CopySourceAcl sets the optional parameter "copySourceAcl": If true, -// copies the source object's ACL; otherwise, uses the bucket's default -// object ACL. The default is false. +// CopySourceAcl sets the optional parameter "copySourceAcl": If true, copies +// the source object's ACL; otherwise, uses the bucket's default object ACL. +// The default is false. func (c *ObjectsRestoreCall) CopySourceAcl(copySourceAcl bool) *ObjectsRestoreCall { c.urlParams_.Set("copySourceAcl", fmt.Sprint(copySourceAcl)) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's one live -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's one live generation matches +// the given value. Setting to 0 makes the operation succeed only if there are +// no live versions of the object. func (c *ObjectsRestoreCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsRestoreCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// none of the object's live generations match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether none of the object's live +// generations match the given value. If no live object exists, the +// precondition fails. Setting to 0 makes the operation succeed only if there +// is a live version of the object. func (c *ObjectsRestoreCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsRestoreCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's one live metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's one live +// metageneration matches the given value. func (c *ObjectsRestoreCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsRestoreCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether none of the object's live metagenerations match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether none +// of the object's live metagenerations match the given value. func (c *ObjectsRestoreCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsRestoreCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to full. // // Possible values: // @@ -15142,31 +10639,29 @@ func (c *ObjectsRestoreCall) Projection(projection string) *ObjectsRestoreCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsRestoreCall) UserProject(userProject string) *ObjectsRestoreCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsRestoreCall) Fields(s ...googleapi.Field) *ObjectsRestoreCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsRestoreCall) Context(ctx context.Context) *ObjectsRestoreCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsRestoreCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -15175,12 +10670,7 @@ func (c *ObjectsRestoreCall) Header() http.Header { } func (c *ObjectsRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -15199,12 +10689,10 @@ func (c *ObjectsRestoreCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.restore" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsRestoreCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -15235,96 +10723,7 @@ func (c *ObjectsRestoreCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Restores a soft-deleted object.", - // "httpMethod": "POST", - // "id": "storage.objects.restore", - // "parameterOrder": [ - // "bucket", - // "object", - // "generation" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "copySourceAcl": { - // "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", - // "location": "query", - // "type": "boolean" - // }, - // "generation": { - // "description": "Selects a specific revision of this object.", - // "format": "int64", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's one live metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether none of the object's live metagenerations match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/restore", - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objects.rewrite": +} type ObjectsRewriteCall struct { s *Service @@ -15341,19 +10740,16 @@ type ObjectsRewriteCall struct { // Rewrite: Rewrites a source object to a destination object. Optionally // overrides metadata. // -// - destinationBucket: Name of the bucket in which to store the new -// object. Overrides the provided object metadata's bucket value, if -// any. +// - destinationBucket: Name of the bucket in which to store the new object. +// Overrides the provided object metadata's bucket value, if any. // - destinationObject: Name of the new object. Required when the object -// metadata is not otherwise provided. Overrides the object metadata's -// name value, if any. For information about how to URL encode object -// names to be path safe, see Encoding URI Path Parts +// metadata is not otherwise provided. Overrides the object metadata's name +// value, if any. For information about how to URL encode object names to be +// path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). -// - sourceBucket: Name of the bucket in which to find the source -// object. -// - sourceObject: Name of the source object. For information about how -// to URL encode object names to be path safe, see Encoding URI Path -// Parts +// - sourceBucket: Name of the bucket in which to find the source object. +// - sourceObject: Name of the source object. For information about how to URL +// encode object names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Rewrite(sourceBucket string, sourceObject string, destinationBucket string, destinationObject string, object *Object) *ObjectsRewriteCall { c := &ObjectsRewriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15365,22 +10761,19 @@ func (r *ObjectsService) Rewrite(sourceBucket string, sourceObject string, desti return c } -// DestinationKmsKeyName sets the optional parameter -// "destinationKmsKeyName": Resource name of the Cloud KMS key, of the -// form -// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, -// -// that will be used to encrypt the object. Overrides the object -// -// metadata's kms_key_name value, if any. +// DestinationKmsKeyName sets the optional parameter "destinationKmsKeyName": +// Resource name of the Cloud KMS key, of the form +// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that +// will be used to encrypt the object. Overrides the object metadata's +// kms_key_name value, if any. func (c *ObjectsRewriteCall) DestinationKmsKeyName(destinationKmsKeyName string) *ObjectsRewriteCall { c.urlParams_.Set("destinationKmsKeyName", destinationKmsKeyName) return c } // DestinationPredefinedAcl sets the optional parameter -// "destinationPredefinedAcl": Apply a predefined set of access controls -// to the destination object. +// "destinationPredefinedAcl": Apply a predefined set of access controls to the +// destination object. // // Possible values: // @@ -15388,94 +10781,89 @@ func (c *ObjectsRewriteCall) DestinationKmsKeyName(destinationKmsKeyName string) // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsRewriteCall) DestinationPredefinedAcl(destinationPredefinedAcl string) *ObjectsRewriteCall { c.urlParams_.Set("destinationPredefinedAcl", destinationPredefinedAcl) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsRewriteCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsRewriteCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the destination object's current metageneration matches the given -// value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the destination object's current +// metageneration matches the given value. func (c *ObjectsRewriteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the destination object's current metageneration does not -// match the given value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// destination object's current metageneration does not match the given value. func (c *ObjectsRewriteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c } // IfSourceGenerationMatch sets the optional parameter -// "ifSourceGenerationMatch": Makes the operation conditional on whether -// the source object's current generation matches the given value. +// "ifSourceGenerationMatch": Makes the operation conditional on whether the +// source object's current generation matches the given value. func (c *ObjectsRewriteCall) IfSourceGenerationMatch(ifSourceGenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceGenerationMatch", fmt.Sprint(ifSourceGenerationMatch)) return c } // IfSourceGenerationNotMatch sets the optional parameter -// "ifSourceGenerationNotMatch": Makes the operation conditional on -// whether the source object's current generation does not match the -// given value. +// "ifSourceGenerationNotMatch": Makes the operation conditional on whether the +// source object's current generation does not match the given value. func (c *ObjectsRewriteCall) IfSourceGenerationNotMatch(ifSourceGenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceGenerationNotMatch", fmt.Sprint(ifSourceGenerationNotMatch)) return c } // IfSourceMetagenerationMatch sets the optional parameter -// "ifSourceMetagenerationMatch": Makes the operation conditional on -// whether the source object's current metageneration matches the given -// value. +// "ifSourceMetagenerationMatch": Makes the operation conditional on whether +// the source object's current metageneration matches the given value. func (c *ObjectsRewriteCall) IfSourceMetagenerationMatch(ifSourceMetagenerationMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceMetagenerationMatch", fmt.Sprint(ifSourceMetagenerationMatch)) return c } // IfSourceMetagenerationNotMatch sets the optional parameter -// "ifSourceMetagenerationNotMatch": Makes the operation conditional on -// whether the source object's current metageneration does not match the -// given value. +// "ifSourceMetagenerationNotMatch": Makes the operation conditional on whether +// the source object's current metageneration does not match the given value. func (c *ObjectsRewriteCall) IfSourceMetagenerationNotMatch(ifSourceMetagenerationNotMatch int64) *ObjectsRewriteCall { c.urlParams_.Set("ifSourceMetagenerationNotMatch", fmt.Sprint(ifSourceMetagenerationNotMatch)) return c @@ -15483,21 +10871,20 @@ func (c *ObjectsRewriteCall) IfSourceMetagenerationNotMatch(ifSourceMetagenerati // MaxBytesRewrittenPerCall sets the optional parameter // "maxBytesRewrittenPerCall": The maximum number of bytes that will be -// 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 where the source and destination -// span locations and/or storage classes. Finally, this value must not -// change across rewrite calls else you'll get an error that the -// rewriteToken is invalid. +// 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 where the source and destination span locations and/or +// storage classes. Finally, this value must not change across rewrite calls +// else you'll get an error that the rewriteToken is invalid. func (c *ObjectsRewriteCall) MaxBytesRewrittenPerCall(maxBytesRewrittenPerCall int64) *ObjectsRewriteCall { c.urlParams_.Set("maxBytesRewrittenPerCall", fmt.Sprint(maxBytesRewrittenPerCall)) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl, unless the object resource -// specifies the acl property, when it defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl, unless the object resource specifies the acl +// property, when it defaults to full. // // Possible values: // @@ -15508,50 +10895,47 @@ func (c *ObjectsRewriteCall) Projection(projection string) *ObjectsRewriteCall { return c } -// RewriteToken sets the optional parameter "rewriteToken": Include this -// field (from the previous rewrite response) on each rewrite request -// after the first one, until the rewrite response 'done' flag is true. -// Calls that provide a rewriteToken can omit all other request fields, -// but if included those fields must match the values provided in the -// first rewrite request. +// RewriteToken sets the optional parameter "rewriteToken": Include this field +// (from the previous rewrite response) on each rewrite request after the first +// one, until the rewrite response 'done' flag is true. Calls that provide a +// rewriteToken can omit all other request fields, but if included those fields +// must match the values provided in the first rewrite request. func (c *ObjectsRewriteCall) RewriteToken(rewriteToken string) *ObjectsRewriteCall { c.urlParams_.Set("rewriteToken", rewriteToken) return c } -// SourceGeneration sets the optional parameter "sourceGeneration": If -// present, selects a specific revision of the source object (as opposed -// to the latest version, the default). +// SourceGeneration sets the optional parameter "sourceGeneration": If present, +// selects a specific revision of the source object (as opposed to the latest +// version, the default). func (c *ObjectsRewriteCall) SourceGeneration(sourceGeneration int64) *ObjectsRewriteCall { c.urlParams_.Set("sourceGeneration", fmt.Sprint(sourceGeneration)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsRewriteCall) UserProject(userProject string) *ObjectsRewriteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsRewriteCall) Fields(s ...googleapi.Field) *ObjectsRewriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsRewriteCall) Context(ctx context.Context) *ObjectsRewriteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsRewriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -15560,18 +10944,12 @@ func (c *ObjectsRewriteCall) Header() http.Header { } func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}") @@ -15591,12 +10969,11 @@ func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.rewrite" call. -// Exactly one of *RewriteResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RewriteResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *RewriteResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -15627,168 +11004,7 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse, return nil, err } return ret, nil - // { - // "description": "Rewrites a source object to a destination object. Optionally overrides metadata.", - // "httpMethod": "POST", - // "id": "storage.objects.rewrite", - // "parameterOrder": [ - // "sourceBucket", - // "sourceObject", - // "destinationBucket", - // "destinationObject" - // ], - // "parameters": { - // "destinationBucket": { - // "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationKmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - // "location": "query", - // "type": "string" - // }, - // "destinationObject": { - // "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "destinationPredefinedAcl": { - // "description": "Apply a predefined set of access controls to the destination object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceGenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifSourceMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "maxBytesRewrittenPerCall": { - // "description": "The maximum number of bytes that will be 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 where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "rewriteToken": { - // "description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.", - // "location": "query", - // "type": "string" - // }, - // "sourceBucket": { - // "description": "Name of the bucket in which to find the source object.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "sourceGeneration": { - // "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "sourceObject": { - // "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}", - // "request": { - // "$ref": "Object" - // }, - // "response": { - // "$ref": "RewriteResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.setIamPolicy": +} type ObjectsSetIamPolicyCall struct { s *Service @@ -15803,8 +11019,8 @@ type ObjectsSetIamPolicyCall struct { // SetIamPolicy: Updates an IAM policy for the specified object. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) SetIamPolicy(bucket string, object string, policy *Policy) *ObjectsSetIamPolicyCall { c := &ObjectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15814,39 +11030,37 @@ func (r *ObjectsService) SetIamPolicy(bucket string, object string, policy *Poli return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsSetIamPolicyCall) Generation(generation int64) *ObjectsSetIamPolicyCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsSetIamPolicyCall) UserProject(userProject string) *ObjectsSetIamPolicyCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsSetIamPolicyCall) Fields(s ...googleapi.Field) *ObjectsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsSetIamPolicyCall) Context(ctx context.Context) *ObjectsSetIamPolicyCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -15855,18 +11069,12 @@ func (c *ObjectsSetIamPolicyCall) Header() http.Header { } func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/iam") @@ -15884,12 +11092,10 @@ func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.objects.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -15920,56 +11126,7 @@ func (c *ObjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err return nil, err } return ret, nil - // { - // "description": "Updates an IAM policy for the specified object.", - // "httpMethod": "PUT", - // "id": "storage.objects.setIamPolicy", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/iam", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.testIamPermissions": +} type ObjectsTestIamPermissionsCall struct { s *Service @@ -15981,12 +11138,12 @@ type ObjectsTestIamPermissionsCall struct { header_ http.Header } -// TestIamPermissions: Tests a set of permissions on the given object to -// see which, if any, are held by the caller. +// TestIamPermissions: Tests a set of permissions on the given object to see +// which, if any, are held by the caller. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). // - permissions: Permissions to test. func (r *ObjectsService) TestIamPermissions(bucket string, object string, permissions []string) *ObjectsTestIamPermissionsCall { @@ -15997,49 +11154,45 @@ func (r *ObjectsService) TestIamPermissions(bucket string, object string, permis return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsTestIamPermissionsCall) Generation(generation int64) *ObjectsTestIamPermissionsCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsTestIamPermissionsCall) UserProject(userProject string) *ObjectsTestIamPermissionsCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ObjectsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ObjectsTestIamPermissionsCall) IfNoneMatch(entityTag string) *ObjectsTestIamPermissionsCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsTestIamPermissionsCall) Context(ctx context.Context) *ObjectsTestIamPermissionsCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -16048,12 +11201,7 @@ func (c *ObjectsTestIamPermissionsCall) Header() http.Header { } func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -16075,12 +11223,11 @@ func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, e } // Do executes the "storage.objects.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *ObjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -16111,63 +11258,7 @@ func (c *ObjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI return nil, err } return ret, nil - // { - // "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", - // "httpMethod": "GET", - // "id": "storage.objects.testIamPermissions", - // "parameterOrder": [ - // "bucket", - // "object", - // "permissions" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "permissions": { - // "description": "Permissions to test.", - // "location": "query", - // "repeated": true, - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}/iam/testPermissions", - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.objects.update": +} type ObjectsUpdateCall struct { s *Service @@ -16182,8 +11273,8 @@ type ObjectsUpdateCall struct { // Update: Updates an object's metadata. // // - bucket: Name of the bucket in which the object resides. -// - object: Name of the object. For information about how to URL encode -// object names to be path safe, see Encoding URI Path Parts +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts // (https://cloud.google.com/storage/docs/request-endpoints#encoding). func (r *ObjectsService) Update(bucket string, object string, object2 *Object) *ObjectsUpdateCall { c := &ObjectsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16193,45 +11284,44 @@ func (r *ObjectsService) Update(bucket string, object string, object2 *Object) * return c } -// Generation sets the optional parameter "generation": If present, -// selects a specific revision of this object (as opposed to the latest -// version, the default). +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). func (c *ObjectsUpdateCall) Generation(generation int64) *ObjectsUpdateCall { c.urlParams_.Set("generation", fmt.Sprint(generation)) return c } -// IfGenerationMatch sets the optional parameter "ifGenerationMatch": -// Makes the operation conditional on whether the object's current -// generation matches the given value. Setting to 0 makes the operation -// succeed only if there are no live versions of the object. +// IfGenerationMatch sets the optional parameter "ifGenerationMatch": Makes the +// operation conditional on whether the object's current generation matches the +// given value. Setting to 0 makes the operation succeed only if there are no +// live versions of the object. func (c *ObjectsUpdateCall) IfGenerationMatch(ifGenerationMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifGenerationMatch", fmt.Sprint(ifGenerationMatch)) return c } -// IfGenerationNotMatch sets the optional parameter -// "ifGenerationNotMatch": Makes the operation conditional on whether -// the object's current generation does not match the given value. If no -// live object exists, the precondition fails. Setting to 0 makes the -// operation succeed only if there is a live version of the object. +// IfGenerationNotMatch sets the optional parameter "ifGenerationNotMatch": +// Makes the operation conditional on whether the object's current generation +// does not match the given value. If no live object exists, the precondition +// fails. Setting to 0 makes the operation succeed only if there is a live +// version of the object. func (c *ObjectsUpdateCall) IfGenerationNotMatch(ifGenerationNotMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifGenerationNotMatch", fmt.Sprint(ifGenerationNotMatch)) return c } -// IfMetagenerationMatch sets the optional parameter -// "ifMetagenerationMatch": Makes the operation conditional on whether -// the object's current metageneration matches the given value. +// IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": +// Makes the operation conditional on whether the object's current +// metageneration matches the given value. func (c *ObjectsUpdateCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch)) return c } // IfMetagenerationNotMatch sets the optional parameter -// "ifMetagenerationNotMatch": Makes the operation conditional on -// whether the object's current metageneration does not match the given -// value. +// "ifMetagenerationNotMatch": Makes the operation conditional on whether the +// object's current metageneration does not match the given value. func (c *ObjectsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *ObjectsUpdateCall { c.urlParams_.Set("ifMetagenerationNotMatch", fmt.Sprint(ifMetagenerationNotMatch)) return c @@ -16239,8 +11329,8 @@ func (c *ObjectsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in // OverrideUnlockedRetention sets the optional parameter // "overrideUnlockedRetention": Must be true to remove the retention -// configuration, reduce its unlocked retention period, or change its -// mode from unlocked to locked. +// configuration, reduce its unlocked retention period, or change its mode from +// unlocked to locked. func (c *ObjectsUpdateCall) OverrideUnlockedRetention(overrideUnlockedRetention bool) *ObjectsUpdateCall { c.urlParams_.Set("overrideUnlockedRetention", fmt.Sprint(overrideUnlockedRetention)) return c @@ -16255,29 +11345,29 @@ func (c *ObjectsUpdateCall) OverrideUnlockedRetention(overrideUnlockedRetention // // allAuthenticatedUsers get READER access. // -// "bucketOwnerFullControl" - Object owner gets OWNER access, and +// "bucketOwnerFullControl" - Object owner gets OWNER access, and project // -// project team owners get OWNER access. +// team owners get OWNER access. // -// "bucketOwnerRead" - Object owner gets OWNER access, and project +// "bucketOwnerRead" - Object owner gets OWNER access, and project team // -// team owners get READER access. +// owners get READER access. // // "private" - Object owner gets OWNER access. // "projectPrivate" - Object owner gets OWNER access, and project team // // members get access according to their roles. // -// "publicRead" - Object owner gets OWNER access, and allUsers get +// "publicRead" - Object owner gets OWNER access, and allUsers get READER // -// READER access. +// access. func (c *ObjectsUpdateCall) PredefinedAcl(predefinedAcl string) *ObjectsUpdateCall { c.urlParams_.Set("predefinedAcl", predefinedAcl) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to full. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to full. // // Possible values: // @@ -16288,31 +11378,29 @@ func (c *ObjectsUpdateCall) Projection(projection string) *ObjectsUpdateCall { return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsUpdateCall) UserProject(userProject string) *ObjectsUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsUpdateCall) Fields(s ...googleapi.Field) *ObjectsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -16321,18 +11409,12 @@ func (c *ObjectsUpdateCall) Header() http.Header { } func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}") @@ -16350,12 +11432,10 @@ func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.update" call. -// Exactly one of *Object or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Object.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Object.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -16386,118 +11466,7 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { return nil, err } return ret, nil - // { - // "description": "Updates an object's metadata.", - // "httpMethod": "PUT", - // "id": "storage.objects.update", - // "parameterOrder": [ - // "bucket", - // "object" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which the object resides.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "generation": { - // "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifGenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "ifMetagenerationNotMatch": { - // "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "object": { - // "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "overrideUnlockedRetention": { - // "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", - // "location": "query", - // "type": "boolean" - // }, - // "predefinedAcl": { - // "description": "Apply a predefined set of access controls to this object.", - // "enum": [ - // "authenticatedRead", - // "bucketOwnerFullControl", - // "bucketOwnerRead", - // "private", - // "projectPrivate", - // "publicRead" - // ], - // "enumDescriptions": [ - // "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - // "Object owner gets OWNER access, and project team owners get OWNER access.", - // "Object owner gets OWNER access, and project team owners get READER access.", - // "Object owner gets OWNER access.", - // "Object owner gets OWNER access, and project team members get access according to their roles.", - // "Object owner gets OWNER access, and allUsers get READER access." - // ], - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to full.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/o/{object}", - // "request": { - // "$ref": "Object" - // }, - // "response": { - // "$ref": "Object" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.objects.watchAll": +} type ObjectsWatchAllCall struct { s *Service @@ -16518,21 +11487,20 @@ func (r *ObjectsService) WatchAll(bucket string, channel *Channel) *ObjectsWatch return c } -// Delimiter sets the optional parameter "delimiter": Returns results in -// a directory-like mode. items will contain 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 sets the optional parameter "delimiter": Returns results in a +// directory-like mode. items will contain 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. func (c *ObjectsWatchAllCall) Delimiter(delimiter string) *ObjectsWatchAllCall { c.urlParams_.Set("delimiter", delimiter) return c } -// EndOffset sets the optional parameter "endOffset": Filter results to -// objects whose names are lexicographically before endOffset. If -// startOffset is also set, the objects listed will have names between -// startOffset (inclusive) and endOffset (exclusive). +// EndOffset sets the optional parameter "endOffset": Filter results to objects +// whose names are lexicographically before endOffset. If startOffset is also +// set, the objects listed will have names between startOffset (inclusive) and +// endOffset (exclusive). func (c *ObjectsWatchAllCall) EndOffset(endOffset string) *ObjectsWatchAllCall { c.urlParams_.Set("endOffset", endOffset) return c @@ -16540,40 +11508,38 @@ func (c *ObjectsWatchAllCall) EndOffset(endOffset string) *ObjectsWatchAllCall { // IncludeTrailingDelimiter sets the optional parameter // "includeTrailingDelimiter": If true, objects that end in exactly one -// instance of delimiter will have their metadata included in items in -// addition to prefixes. +// instance of delimiter will have their metadata included in items in addition +// to prefixes. func (c *ObjectsWatchAllCall) IncludeTrailingDelimiter(includeTrailingDelimiter bool) *ObjectsWatchAllCall { c.urlParams_.Set("includeTrailingDelimiter", fmt.Sprint(includeTrailingDelimiter)) return c } -// MaxResults sets the optional parameter "maxResults": 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. +// MaxResults sets the optional parameter "maxResults": 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. func (c *ObjectsWatchAllCall) MaxResults(maxResults int64) *ObjectsWatchAllCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *ObjectsWatchAllCall) PageToken(pageToken string) *ObjectsWatchAllCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Prefix sets the optional parameter "prefix": Filter results to -// objects whose names begin with this prefix. +// Prefix sets the optional parameter "prefix": Filter results to objects whose +// names begin with this prefix. func (c *ObjectsWatchAllCall) Prefix(prefix string) *ObjectsWatchAllCall { c.urlParams_.Set("prefix", prefix) return c } -// Projection sets the optional parameter "projection": Set of -// properties to return. Defaults to noAcl. +// Projection sets the optional parameter "projection": Set of properties to +// return. Defaults to noAcl. // // Possible values: // @@ -16584,48 +11550,46 @@ func (c *ObjectsWatchAllCall) Projection(projection string) *ObjectsWatchAllCall return c } -// StartOffset sets the optional parameter "startOffset": Filter results -// to objects whose names are lexicographically equal to or after -// startOffset. If endOffset is also set, the objects listed will have -// names between startOffset (inclusive) and endOffset (exclusive). +// StartOffset sets the optional parameter "startOffset": Filter results to +// objects whose names are lexicographically equal to or after startOffset. If +// endOffset is also set, the objects listed will have names between +// startOffset (inclusive) and endOffset (exclusive). func (c *ObjectsWatchAllCall) StartOffset(startOffset string) *ObjectsWatchAllCall { c.urlParams_.Set("startOffset", startOffset) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. Required for Requester Pays buckets. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. func (c *ObjectsWatchAllCall) UserProject(userProject string) *ObjectsWatchAllCall { c.urlParams_.Set("userProject", userProject) return c } -// Versions sets the optional parameter "versions": If true, lists all -// versions of an object as distinct results. The default is false. For -// more information, see Object Versioning. +// Versions sets the optional parameter "versions": If true, lists all versions +// of an object as distinct results. The default is false. For more +// information, see Object Versioning. func (c *ObjectsWatchAllCall) Versions(versions bool) *ObjectsWatchAllCall { c.urlParams_.Set("versions", fmt.Sprint(versions)) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ObjectsWatchAllCall) Fields(s ...googleapi.Field) *ObjectsWatchAllCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ObjectsWatchAllCall) Context(ctx context.Context) *ObjectsWatchAllCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ObjectsWatchAllCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -16634,18 +11598,12 @@ func (c *ObjectsWatchAllCall) Header() http.Header { } func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/watch") @@ -16662,12 +11620,10 @@ func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.objects.watchAll" call. -// Exactly one of *Channel or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Channel.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *Channel.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -16698,103 +11654,7 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) return nil, err } return ret, nil - // { - // "description": "Watch for changes on all objects in a bucket.", - // "httpMethod": "POST", - // "id": "storage.objects.watchAll", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which to look for objects.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "delimiter": { - // "description": "Returns results in a directory-like mode. items will contain 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.", - // "location": "query", - // "type": "string" - // }, - // "endOffset": { - // "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // }, - // "includeTrailingDelimiter": { - // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "1000", - // "description": "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.", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "prefix": { - // "description": "Filter results to objects whose names begin with this prefix.", - // "location": "query", - // "type": "string" - // }, - // "projection": { - // "description": "Set of properties to return. Defaults to noAcl.", - // "enum": [ - // "full", - // "noAcl" - // ], - // "enumDescriptions": [ - // "Include all properties.", - // "Omit the owner, acl property." - // ], - // "location": "query", - // "type": "string" - // }, - // "startOffset": { - // "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - // "location": "query", - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request. Required for Requester Pays buckets.", - // "location": "query", - // "type": "string" - // }, - // "versions": { - // "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "b/{bucket}/o/watch", - // "request": { - // "$ref": "Channel", - // "parameterName": "resource" - // }, - // "response": { - // "$ref": "Channel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ], - // "supportsSubscription": true - // } - -} - -// method id "storage.buckets.operations.cancel": +} type OperationsCancelCall struct { s *Service @@ -16805,9 +11665,9 @@ type OperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. // // - bucket: The parent bucket of the operation resource. // - operationId: The ID of the operation resource. @@ -16819,23 +11679,21 @@ func (r *OperationsService) Cancel(bucket string, operationId string) *Operation } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *OperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -16844,12 +11702,7 @@ func (c *OperationsCancelCall) Header() http.Header { } func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -16879,39 +11732,7 @@ func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.", - // "httpMethod": "POST", - // "id": "storage.buckets.operations.cancel", - // "parameterOrder": [ - // "bucket", - // "operationId" - // ], - // "parameters": { - // "bucket": { - // "description": "The parent bucket of the operation resource.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "operationId": { - // "description": "The ID of the operation resource.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/operations/{operationId}/cancel", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.operations.get": +} type OperationsGetCall struct { s *Service @@ -16935,33 +11756,29 @@ func (r *OperationsService) Get(bucket string, operationId string) *OperationsGe } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -16970,12 +11787,7 @@ func (c *OperationsGetCall) Header() http.Header { } func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -16997,12 +11809,11 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -17033,44 +11844,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning return nil, err } return ret, nil - // { - // "description": "Gets the latest state of a long-running operation.", - // "httpMethod": "GET", - // "id": "storage.buckets.operations.get", - // "parameterOrder": [ - // "bucket", - // "operationId" - // ], - // "parameters": { - // "bucket": { - // "description": "The parent bucket of the operation resource.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "operationId": { - // "description": "The ID of the operation resource.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "b/{bucket}/operations/{operationId}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.buckets.operations.list": +} type OperationsListCall struct { s *Service @@ -17081,8 +11855,7 @@ type OperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. +// List: Lists operations that match the specified filter in the request. // // - bucket: Name of the bucket in which to look for operations. func (r *OperationsService) List(bucket string) *OperationsListCall { @@ -17091,59 +11864,54 @@ func (r *OperationsService) List(bucket string) *OperationsListCall { return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language is documented -// in more detail in AIP-160 (https://google.aip.dev/160). +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language is documented in more detail +// in AIP-160 (https://google.aip.dev/160). func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// items to return in a single page of responses. Fewer total results -// may be returned than requested. The service uses this parameter or -// 100 items, whichever is smaller. +// PageSize sets the optional parameter "pageSize": Maximum number of items to +// return in a single page of responses. Fewer total results may be returned +// than requested. The service uses this parameter or 100 items, whichever is +// smaller. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -17152,12 +11920,7 @@ func (c *OperationsListCall) Header() http.Header { } func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -17178,13 +11941,11 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { } // Do executes the "storage.buckets.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -17215,51 +11976,6 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return nil, err } return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request.", - // "httpMethod": "GET", - // "id": "storage.buckets.operations.list", - // "parameterOrder": [ - // "bucket" - // ], - // "parameters": { - // "bucket": { - // "description": "Name of the bucket in which to look for operations.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "b/{bucket}/operations", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } // Pages invokes f for each page of results. @@ -17267,7 +11983,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // The provided context supersedes any context provided to the Context method. func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -17283,8 +11999,6 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "storage.projects.hmacKeys.create": - type ProjectsHmacKeysCreateCall struct { s *Service projectId string @@ -17304,31 +12018,29 @@ func (r *ProjectsHmacKeysService) Create(projectId string, serviceAccountEmail s return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsHmacKeysCreateCall) UserProject(userProject string) *ProjectsHmacKeysCreateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsHmacKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsHmacKeysCreateCall) Context(ctx context.Context) *ProjectsHmacKeysCreateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsHmacKeysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -17337,12 +12049,7 @@ func (c *ProjectsHmacKeysCreateCall) Header() http.Header { } func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -17360,12 +12067,10 @@ func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, erro } // Do executes the "storage.projects.hmacKeys.create" call. -// Exactly one of *HmacKey or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *HmacKey.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. +// Any non-2xx status code is an error. Response headers are in either +// *HmacKey.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ProjectsHmacKeysCreateCall) Do(opts ...googleapi.CallOption) (*HmacKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -17396,46 +12101,7 @@ func (c *ProjectsHmacKeysCreateCall) Do(opts ...googleapi.CallOption) (*HmacKey, return nil, err } return ret, nil - // { - // "description": "Creates a new HMAC key for the specified service account.", - // "httpMethod": "POST", - // "id": "storage.projects.hmacKeys.create", - // "parameterOrder": [ - // "projectId", - // "serviceAccountEmail" - // ], - // "parameters": { - // "projectId": { - // "description": "Project ID owning the service account.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "serviceAccountEmail": { - // "description": "Email address of the service account.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/hmacKeys", - // "response": { - // "$ref": "HmacKey" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.projects.hmacKeys.delete": +} type ProjectsHmacKeysDeleteCall struct { s *Service @@ -17457,31 +12123,29 @@ func (r *ProjectsHmacKeysService) Delete(projectId string, accessId string) *Pro return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsHmacKeysDeleteCall) UserProject(userProject string) *ProjectsHmacKeysDeleteCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsHmacKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsHmacKeysDeleteCall) Context(ctx context.Context) *ProjectsHmacKeysDeleteCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsHmacKeysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -17490,12 +12154,7 @@ func (c *ProjectsHmacKeysDeleteCall) Header() http.Header { } func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") @@ -17525,44 +12184,7 @@ func (c *ProjectsHmacKeysDeleteCall) Do(opts ...googleapi.CallOption) error { return gensupport.WrapError(err) } return nil - // { - // "description": "Deletes an HMAC key.", - // "httpMethod": "DELETE", - // "id": "storage.projects.hmacKeys.delete", - // "parameterOrder": [ - // "projectId", - // "accessId" - // ], - // "parameters": { - // "accessId": { - // "description": "Name of the HMAC key to be deleted.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Project ID owning the requested key", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/hmacKeys/{accessId}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "storage.projects.hmacKeys.get": +} type ProjectsHmacKeysGetCall struct { s *Service @@ -17576,9 +12198,8 @@ type ProjectsHmacKeysGetCall struct { // Get: Retrieves an HMAC key's metadata // -// - accessId: Name of the HMAC key. -// - projectId: Project ID owning the service account of the requested -// key. +// - accessId: Name of the HMAC key. +// - projectId: Project ID owning the service account of the requested key. func (r *ProjectsHmacKeysService) Get(projectId string, accessId string) *ProjectsHmacKeysGetCall { c := &ProjectsHmacKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -17586,41 +12207,37 @@ func (r *ProjectsHmacKeysService) Get(projectId string, accessId string) *Projec return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsHmacKeysGetCall) UserProject(userProject string) *ProjectsHmacKeysGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsHmacKeysGetCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ProjectsHmacKeysGetCall) IfNoneMatch(entityTag string) *ProjectsHmacKeysGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsHmacKeysGetCall) Context(ctx context.Context) *ProjectsHmacKeysGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsHmacKeysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -17629,12 +12246,7 @@ func (c *ProjectsHmacKeysGetCall) Header() http.Header { } func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -17656,12 +12268,11 @@ func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.projects.hmacKeys.get" call. -// Exactly one of *HmacKeyMetadata or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ProjectsHmacKeysGetCall) Do(opts ...googleapi.CallOption) (*HmacKeyMetadata, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -17692,48 +12303,7 @@ func (c *ProjectsHmacKeysGetCall) Do(opts ...googleapi.CallOption) (*HmacKeyMeta return nil, err } return ret, nil - // { - // "description": "Retrieves an HMAC key's metadata", - // "httpMethod": "GET", - // "id": "storage.projects.hmacKeys.get", - // "parameterOrder": [ - // "projectId", - // "accessId" - // ], - // "parameters": { - // "accessId": { - // "description": "Name of the HMAC key.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Project ID owning the service account of the requested key.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/hmacKeys/{accessId}", - // "response": { - // "$ref": "HmacKeyMetadata" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only" - // ] - // } - -} - -// method id "storage.projects.hmacKeys.list": +} type ProjectsHmacKeysListCall struct { s *Service @@ -17753,76 +12323,69 @@ func (r *ProjectsHmacKeysService) List(projectId string) *ProjectsHmacKeysListCa return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of items to return in a single page of responses. The service uses -// this parameter or 250 items, whichever is smaller. The max number of -// items per page will also be limited by the number of distinct service -// accounts in the response. If the number of service accounts in a -// single response is too high, the page will truncated and a next page -// token will be returned. +// MaxResults sets the optional parameter "maxResults": Maximum number of items +// to return in a single page of responses. The service uses this parameter or +// 250 items, whichever is smaller. The max number of items per page will also +// be limited by the number of distinct service accounts in the response. If +// the number of service accounts in a single response is too high, the page +// will truncated and a next page token will be returned. func (c *ProjectsHmacKeysListCall) MaxResults(maxResults int64) *ProjectsHmacKeysListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A -// previously-returned page token representing part of the larger set of -// results to view. +// PageToken sets the optional parameter "pageToken": A previously-returned +// page token representing part of the larger set of results to view. func (c *ProjectsHmacKeysListCall) PageToken(pageToken string) *ProjectsHmacKeysListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ServiceAccountEmail sets the optional parameter -// "serviceAccountEmail": If present, only keys for the given service -// account are returned. +// ServiceAccountEmail sets the optional parameter "serviceAccountEmail": If +// present, only keys for the given service account are returned. func (c *ProjectsHmacKeysListCall) ServiceAccountEmail(serviceAccountEmail string) *ProjectsHmacKeysListCall { c.urlParams_.Set("serviceAccountEmail", serviceAccountEmail) return c } -// ShowDeletedKeys sets the optional parameter "showDeletedKeys": -// Whether or not to show keys in the DELETED state. +// ShowDeletedKeys sets the optional parameter "showDeletedKeys": Whether or +// not to show keys in the DELETED state. func (c *ProjectsHmacKeysListCall) ShowDeletedKeys(showDeletedKeys bool) *ProjectsHmacKeysListCall { c.urlParams_.Set("showDeletedKeys", fmt.Sprint(showDeletedKeys)) return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsHmacKeysListCall) UserProject(userProject string) *ProjectsHmacKeysListCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsHmacKeysListCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ProjectsHmacKeysListCall) IfNoneMatch(entityTag string) *ProjectsHmacKeysListCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsHmacKeysListCall) Context(ctx context.Context) *ProjectsHmacKeysListCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsHmacKeysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -17831,12 +12394,7 @@ func (c *ProjectsHmacKeysListCall) Header() http.Header { } func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -17857,12 +12415,11 @@ func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) } // Do executes the "storage.projects.hmacKeys.list" call. -// Exactly one of *HmacKeysMetadata or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HmacKeysMetadata.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *HmacKeysMetadata.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ProjectsHmacKeysListCall) Do(opts ...googleapi.CallOption) (*HmacKeysMetadata, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -17893,61 +12450,6 @@ func (c *ProjectsHmacKeysListCall) Do(opts ...googleapi.CallOption) (*HmacKeysMe return nil, err } return ret, nil - // { - // "description": "Retrieves a list of HMAC keys matching the criteria.", - // "httpMethod": "GET", - // "id": "storage.projects.hmacKeys.list", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "maxResults": { - // "default": "250", - // "description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A previously-returned page token representing part of the larger set of results to view.", - // "location": "query", - // "type": "string" - // }, - // "projectId": { - // "description": "Name of the project in which to look for HMAC keys.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "serviceAccountEmail": { - // "description": "If present, only keys for the given service account are returned.", - // "location": "query", - // "type": "string" - // }, - // "showDeletedKeys": { - // "description": "Whether or not to show keys in the DELETED state.", - // "location": "query", - // "type": "boolean" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/hmacKeys", - // "response": { - // "$ref": "HmacKeysMetadata" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only" - // ] - // } - } // Pages invokes f for each page of results. @@ -17955,7 +12457,7 @@ func (c *ProjectsHmacKeysListCall) Do(opts ...googleapi.CallOption) (*HmacKeysMe // The provided context supersedes any context provided to the Context method. func (c *ProjectsHmacKeysListCall) Pages(ctx context.Context, f func(*HmacKeysMetadata) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -17971,8 +12473,6 @@ func (c *ProjectsHmacKeysListCall) Pages(ctx context.Context, f func(*HmacKeysMe } } -// method id "storage.projects.hmacKeys.update": - type ProjectsHmacKeysUpdateCall struct { s *Service projectId string @@ -17986,9 +12486,8 @@ type ProjectsHmacKeysUpdateCall struct { // Update: Updates the state of an HMAC key. See the HMAC Key resource // descriptor for valid states. // -// - accessId: Name of the HMAC key being updated. -// - projectId: Project ID owning the service account of the updated -// key. +// - accessId: Name of the HMAC key being updated. +// - projectId: Project ID owning the service account of the updated key. func (r *ProjectsHmacKeysService) Update(projectId string, accessId string, hmackeymetadata *HmacKeyMetadata) *ProjectsHmacKeysUpdateCall { c := &ProjectsHmacKeysUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -17997,31 +12496,29 @@ func (r *ProjectsHmacKeysService) Update(projectId string, accessId string, hmac return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsHmacKeysUpdateCall) UserProject(userProject string) *ProjectsHmacKeysUpdateCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsHmacKeysUpdateCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsHmacKeysUpdateCall) Context(ctx context.Context) *ProjectsHmacKeysUpdateCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsHmacKeysUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -18030,18 +12527,12 @@ func (c *ProjectsHmacKeysUpdateCall) Header() http.Header { } func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.hmackeymetadata) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys/{accessId}") @@ -18059,12 +12550,11 @@ func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, erro } // Do executes the "storage.projects.hmacKeys.update" call. -// Exactly one of *HmacKeyMetadata or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. func (c *ProjectsHmacKeysUpdateCall) Do(opts ...googleapi.CallOption) (*HmacKeyMetadata, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -18095,49 +12585,7 @@ func (c *ProjectsHmacKeysUpdateCall) Do(opts ...googleapi.CallOption) (*HmacKeyM return nil, err } return ret, nil - // { - // "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", - // "httpMethod": "PUT", - // "id": "storage.projects.hmacKeys.update", - // "parameterOrder": [ - // "projectId", - // "accessId" - // ], - // "parameters": { - // "accessId": { - // "description": "Name of the HMAC key being updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "Project ID owning the service account of the updated key.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/hmacKeys/{accessId}", - // "request": { - // "$ref": "HmacKeyMetadata" - // }, - // "response": { - // "$ref": "HmacKeyMetadata" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/devstorage.full_control" - // ] - // } - -} - -// method id "storage.projects.serviceAccount.get": +} type ProjectsServiceAccountGetCall struct { s *Service @@ -18148,8 +12596,8 @@ type ProjectsServiceAccountGetCall struct { header_ http.Header } -// Get: Get the email address of this project's Google Cloud Storage -// service account. +// Get: Get the email address of this project's Google Cloud Storage service +// account. // // - projectId: Project ID. func (r *ProjectsServiceAccountService) Get(projectId string) *ProjectsServiceAccountGetCall { @@ -18158,41 +12606,37 @@ func (r *ProjectsServiceAccountService) Get(projectId string) *ProjectsServiceAc return c } -// UserProject sets the optional parameter "userProject": The project to -// be billed for this request. +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. func (c *ProjectsServiceAccountGetCall) UserProject(userProject string) *ProjectsServiceAccountGetCall { c.urlParams_.Set("userProject", userProject) return c } // Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. func (c *ProjectsServiceAccountGetCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. func (c *ProjectsServiceAccountGetCall) IfNoneMatch(entityTag string) *ProjectsServiceAccountGetCall { c.ifNoneMatch_ = entityTag return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do method. func (c *ProjectsServiceAccountGetCall) Context(ctx context.Context) *ProjectsServiceAccountGetCall { c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. func (c *ProjectsServiceAccountGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) @@ -18201,12 +12645,7 @@ func (c *ProjectsServiceAccountGetCall) Header() http.Header { } func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } @@ -18227,12 +12666,10 @@ func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, e } // Do executes the "storage.projects.serviceAccount.get" call. -// Exactly one of *ServiceAccount or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ServiceAccount.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. +// Any non-2xx status code is an error. Response headers are in either +// *ServiceAccount.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") @@ -18263,37 +12700,4 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi return nil, err } return ret, nil - // { - // "description": "Get the email address of this project's Google Cloud Storage service account.", - // "httpMethod": "GET", - // "id": "storage.projects.serviceAccount.get", - // "parameterOrder": [ - // "projectId" - // ], - // "parameters": { - // "projectId": { - // "description": "Project ID", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "userProject": { - // "description": "The project to be billed for this request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{projectId}/serviceAccount", - // "response": { - // "$ref": "ServiceAccount" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloud-platform.read-only", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - } diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go index 5ec81f8501..2e66d02b37 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial.go +++ b/vendor/google.golang.org/api/transport/grpc/dial.go @@ -213,8 +213,8 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna } // Defaults for older clients that don't set this value yet - var defaultEndpointTemplate string - if ds.DefaultEndpointTemplate == "" { + defaultEndpointTemplate := ds.DefaultEndpointTemplate + if defaultEndpointTemplate == "" { defaultEndpointTemplate = ds.DefaultEndpoint } diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index 64c881025a..d1cd83b62d 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -48,7 +48,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, } if settings.IsNewAuthLibraryEnabled() { - client, err := newClientNewAuth(ctx, settings) + client, err := newClientNewAuth(ctx, nil, settings) if err != nil { return nil, "", err } @@ -62,7 +62,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, } // newClientNewAuth is an adapter to call new auth library. -func newClientNewAuth(ctx context.Context, ds *internal.DialSettings) (*http.Client, error) { +func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.DialSettings) (*http.Client, error) { // honor options if set var creds *auth.Credentials if ds.InternalCredentials != nil { @@ -91,8 +91,8 @@ func newClientNewAuth(ctx context.Context, ds *internal.DialSettings) (*http.Cli } // Defaults for older clients that don't set this value yet - var defaultEndpointTemplate string - if ds.DefaultEndpointTemplate == "" { + defaultEndpointTemplate := ds.DefaultEndpointTemplate + if defaultEndpointTemplate == "" { defaultEndpointTemplate = ds.DefaultEndpoint } @@ -115,6 +115,7 @@ func newClientNewAuth(ctx context.Context, ds *internal.DialSettings) (*http.Cli APIKey: ds.APIKey, Credentials: creds, ClientCertProvider: ds.ClientCertSource, + BaseRoundTripper: base, DetectOpts: &credentials.DetectOptions{ Scopes: ds.Scopes, Audience: aud, @@ -148,8 +149,7 @@ func NewTransport(ctx context.Context, base http.RoundTripper, opts ...option.Cl return nil, errors.New("transport/http: WithHTTPClient passed to NewTransport") } if settings.IsNewAuthLibraryEnabled() { - // TODO, this is not wrapping the base, find a way... - client, err := newClientNewAuth(ctx, settings) + client, err := newClientNewAuth(ctx, base, settings) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go index 3f75098b6f..29846df222 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go @@ -25,15 +25,17 @@ const defaultIndent = " " // Format formats the message as a multiline string. // This function is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func Format(m proto.Message) string { return MarshalOptions{Multiline: true}.Format(m) } // Marshal writes the given [proto.Message] in JSON format using default options. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func Marshal(m proto.Message) ([]byte, error) { return MarshalOptions{}.Marshal(m) } @@ -110,8 +112,9 @@ type MarshalOptions struct { // Format formats the message as a string. // This method is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func (o MarshalOptions) Format(m proto.Message) string { if m == nil || !m.ProtoReflect().IsValid() { return "" // invalid syntax, but okay since this is for debugging @@ -122,8 +125,9 @@ func (o MarshalOptions) Format(m proto.Message) string { } // Marshal marshals the given [proto.Message] in the JSON format using options in -// MarshalOptions. Do not depend on the output being stable. It may change over -// time across different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) { return o.marshal(nil, m) } diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go index 95967e8112..1f57e6610a 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go @@ -27,15 +27,17 @@ const defaultIndent = " " // Format formats the message as a multiline string. // This function is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func Format(m proto.Message) string { return MarshalOptions{Multiline: true}.Format(m) } // Marshal writes the given [proto.Message] in textproto format using default -// options. Do not depend on the output being stable. It may change over time -// across different versions of the program. +// options. Do not depend on the output being stable. Its output will change +// across different builds of your program, even when using the same version of +// the protobuf module. func Marshal(m proto.Message) ([]byte, error) { return MarshalOptions{}.Marshal(m) } @@ -84,8 +86,9 @@ type MarshalOptions struct { // Format formats the message as a string. // This method is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func (o MarshalOptions) Format(m proto.Message) string { if m == nil || !m.ProtoReflect().IsValid() { return "" // invalid syntax, but okay since this is for debugging @@ -98,8 +101,9 @@ func (o MarshalOptions) Format(m proto.Message) string { } // Marshal writes the given [proto.Message] in textproto format using options in -// MarshalOptions object. Do not depend on the output being stable. It may -// change over time across different versions of the program. +// MarshalOptions object. Do not depend on the output being stable. Its output +// will change across different builds of your program, even when using the +// same version of the protobuf module. func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) { return o.marshal(nil, m) } diff --git a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go index a45625c8d1..87e46bd4df 100644 --- a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +++ b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go @@ -252,6 +252,7 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record fu {rv.MethodByName("Values"), "Values"}, {rv.MethodByName("ReservedNames"), "ReservedNames"}, {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, + {rv.MethodByName("IsClosed"), "IsClosed"}, }...) case protoreflect.EnumValueDescriptor: diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index 18f0756874367adcdb790ffde125b6a7388b4eaa..f691305eb4f73440cd48caba949023eab52ef304 100644 GIT binary patch literal 78 zcmd-Q6B6WL6kw8IQef6#G+?@9$Hc)X@r<1dB+ewjD8Z<}1Qcfki8Dw%hln$xi@#u3 Kc*d^rf*k;APzzxI literal 63 zcmd-Q6yo7v6kw8IQef6#G+>f=#?A#2ViI7KU{qiN3NcDNhX^qu3B6!fc*d^rf*k<7 Cln3+x diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go new file mode 100644 index 0000000000..029a6a12d7 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package editionssupport defines constants for editions that are supported. +package editionssupport + +import descriptorpb "google.golang.org/protobuf/types/descriptorpb" + +const ( + Minimum = descriptorpb.Edition_EDITION_PROTO2 + Maximum = descriptorpb.Edition_EDITION_2023 +) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go index 373d208374..7e87c76044 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -32,6 +32,7 @@ var byteType = reflect.TypeOf(byte(0)) func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { f := new(filedesc.Field) f.L0.ParentFile = filedesc.SurrogateProto2 + f.L1.EditionFeatures = f.L0.ParentFile.L1.EditionFeatures for len(tag) > 0 { i := strings.IndexByte(tag, ',') if i < 0 { @@ -107,8 +108,7 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri f.L1.StringName.InitJSON(jsonName) } case s == "packed": - f.L1.HasPacked = true - f.L1.IsPacked = true + f.L1.EditionFeatures.IsPacked = true case strings.HasPrefix(s, "weak="): f.L1.IsWeak = true f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) diff --git a/vendor/google.golang.org/protobuf/internal/errors/errors.go b/vendor/google.golang.org/protobuf/internal/errors/errors.go index 20c17b35e3..d96719829c 100644 --- a/vendor/google.golang.org/protobuf/internal/errors/errors.go +++ b/vendor/google.golang.org/protobuf/internal/errors/errors.go @@ -87,3 +87,18 @@ func InvalidUTF8(name string) error { func RequiredNotSet(name string) error { return New("required field %v not set", name) } + +type SizeMismatchError struct { + Calculated, Measured int +} + +func (e *SizeMismatchError) Error() string { + return fmt.Sprintf("size mismatch (see https://github.com/golang/protobuf/issues/1609): calculated=%d, measured=%d", e.Calculated, e.Measured) +} + +func MismatchedSizeCalculation(calculated, measured int) error { + return &SizeMismatchError{ + Calculated: calculated, + Measured: measured, + } +} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 8826bcf402..ece53bea32 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -7,6 +7,7 @@ package filedesc import ( "bytes" "fmt" + "strings" "sync" "sync/atomic" @@ -108,9 +109,12 @@ func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd } func (fd *File) Parent() protoreflect.Descriptor { return nil } func (fd *File) Index() int { return 0 } func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax } -func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } -func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } -func (fd *File) IsPlaceholder() bool { return false } + +// Not exported and just used to reconstruct the original FileDescriptor proto +func (fd *File) Edition() int32 { return int32(fd.L1.Edition) } +func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } +func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } +func (fd *File) IsPlaceholder() bool { return false } func (fd *File) Options() protoreflect.ProtoMessage { if f := fd.lazyInit().Options; f != nil { return f() @@ -202,6 +206,9 @@ func (ed *Enum) lazyInit() *EnumL2 { ed.L0.ParentFile.lazyInit() // implicitly initializes L2 return ed.L2 } +func (ed *Enum) IsClosed() bool { + return !ed.L1.EditionFeatures.IsOpenEnum +} func (ed *EnumValue) Options() protoreflect.ProtoMessage { if f := ed.L1.Options; f != nil { @@ -251,10 +258,6 @@ type ( StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto IsWeak bool // promoted from google.protobuf.FieldOptions - HasPacked bool // promoted from google.protobuf.FieldOptions - IsPacked bool // promoted from google.protobuf.FieldOptions - HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions - EnforceUTF8 bool // promoted from google.protobuf.FieldOptions Default defaultValue ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields Enum protoreflect.EnumDescriptor @@ -331,8 +334,7 @@ func (fd *Field) HasPresence() bool { if fd.L1.Cardinality == protoreflect.Repeated { return false } - explicitFieldPresence := fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsFieldPresence - return fd.Syntax() == protoreflect.Proto2 || explicitFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil + return fd.IsExtension() || fd.L1.EditionFeatures.IsFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil } func (fd *Field) HasOptionalKeyword() bool { return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional @@ -345,14 +347,7 @@ func (fd *Field) IsPacked() bool { case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: return false } - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.EditionFeatures.IsPacked - } - if fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 { - // proto3 repeated fields are packed by default. - return !fd.L1.HasPacked || fd.L1.IsPacked - } - return fd.L1.IsPacked + return fd.L1.EditionFeatures.IsPacked } func (fd *Field) IsExtension() bool { return false } func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } @@ -399,13 +394,7 @@ func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} // WARNING: This method is exempt from the compatibility promise and may be // removed in the future without warning. func (fd *Field) EnforceUTF8() bool { - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.EditionFeatures.IsUTF8Validated - } - if fd.L1.HasEnforceUTF8 { - return fd.L1.EnforceUTF8 - } - return fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 + return fd.L1.EditionFeatures.IsUTF8Validated } func (od *Oneof) IsSynthetic() bool { @@ -438,7 +427,6 @@ type ( Options func() protoreflect.ProtoMessage StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto - IsPacked bool // promoted from google.protobuf.FieldOptions Default defaultValue Enum protoreflect.EnumDescriptor Message protoreflect.MessageDescriptor @@ -461,7 +449,16 @@ func (xd *Extension) HasPresence() bool { return xd.L1.Cardi func (xd *Extension) HasOptionalKeyword() bool { return (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional } -func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked } +func (xd *Extension) IsPacked() bool { + if xd.L1.Cardinality != protoreflect.Repeated { + return false + } + switch xd.L1.Kind { + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: + return false + } + return xd.L1.EditionFeatures.IsPacked +} func (xd *Extension) IsExtension() bool { return true } func (xd *Extension) IsWeak() bool { return false } func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } @@ -542,8 +539,9 @@ func (md *Method) ProtoInternal(pragma.DoNotImplement) {} // Surrogate files are can be used to create standalone descriptors // where the syntax is only information derived from the parent file. var ( - SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} - SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} + SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} + SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} + SurrogateEdition2023 = &File{L1: FileL1{Syntax: protoreflect.Editions, Edition: Edition2023}, L2: &FileL2{}} ) type ( @@ -585,6 +583,34 @@ func (s *stringName) InitJSON(name string) { s.nameJSON = name } +// Returns true if this field is structured like the synthetic field of a proto2 +// group. This allows us to expand our treatment of delimited fields without +// breaking proto2 files that have been upgraded to editions. +func isGroupLike(fd protoreflect.FieldDescriptor) bool { + // Groups are always group types. + if fd.Kind() != protoreflect.GroupKind { + return false + } + + // Group fields are always the lowercase type name. + if strings.ToLower(string(fd.Message().Name())) != string(fd.Name()) { + return false + } + + // Groups could only be defined in the same file they're used. + if fd.Message().ParentFile() != fd.ParentFile() { + return false + } + + // Group messages are always defined in the same scope as the field. File + // level extensions will compare NULL == NULL here, which is why the file + // comparison above is necessary to ensure both come from the same file. + if fd.IsExtension() { + return fd.Parent() == fd.Message().Parent() + } + return fd.ContainingMessage() == fd.Message().Parent() +} + func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { s.once.Do(func() { if fd.IsExtension() { @@ -605,7 +631,7 @@ func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { // Format the text name. s.nameText = string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { + if isGroupLike(fd) { s.nameText = string(fd.Message().Name()) } } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 237e64fd23..3bc3b1cdf8 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -113,8 +113,10 @@ func (fd *File) unmarshalSeed(b []byte) { switch string(v) { case "proto2": fd.L1.Syntax = protoreflect.Proto2 + fd.L1.Edition = EditionProto2 case "proto3": fd.L1.Syntax = protoreflect.Proto3 + fd.L1.Edition = EditionProto3 case "editions": fd.L1.Syntax = protoreflect.Editions default: @@ -177,11 +179,10 @@ func (fd *File) unmarshalSeed(b []byte) { // If syntax is missing, it is assumed to be proto2. if fd.L1.Syntax == 0 { fd.L1.Syntax = protoreflect.Proto2 + fd.L1.Edition = EditionProto2 } - if fd.L1.Syntax == protoreflect.Editions { - fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition) - } + fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition) // Parse editions features from options if any if options != nil { @@ -267,6 +268,7 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protorefl ed.L0.ParentFile = pf ed.L0.Parent = pd ed.L0.Index = i + ed.L1.EditionFeatures = featuresFromParentDesc(ed.Parent()) var numValues int for b := b; len(b) > 0; { @@ -443,6 +445,7 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd prot xd.L0.ParentFile = pf xd.L0.Parent = pd xd.L0.Index = i + xd.L1.EditionFeatures = featuresFromParentDesc(pd) for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -467,6 +470,38 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd prot xd.L0.FullName = appendFullName(sb, pd.FullName(), v) case genid.FieldDescriptorProto_Extendee_field_number: xd.L1.Extendee = PlaceholderMessage(makeFullName(sb, v)) + case genid.FieldDescriptorProto_Options_field_number: + xd.unmarshalOptions(v) + } + default: + m := protowire.ConsumeFieldValue(num, typ, b) + b = b[m:] + } + } + + if xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded { + xd.L1.Kind = protoreflect.GroupKind + } +} + +func (xd *Extension) unmarshalOptions(b []byte) { + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + b = b[n:] + switch typ { + case protowire.VarintType: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + switch num { + case genid.FieldOptions_Packed_field_number: + xd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) + } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FieldOptions_Features_field_number: + xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures) } default: m := protowire.ConsumeFieldValue(num, typ, b) diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 482a61cc10..570181eb48 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -466,10 +466,10 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref b = b[m:] } } - if fd.Syntax() == protoreflect.Editions && fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded { + if fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded { fd.L1.Kind = protoreflect.GroupKind } - if fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsLegacyRequired { + if fd.L1.EditionFeatures.IsLegacyRequired { fd.L1.Cardinality = protoreflect.Required } if rawTypeName != nil { @@ -496,13 +496,11 @@ func (fd *Field) unmarshalOptions(b []byte) { b = b[m:] switch num { case genid.FieldOptions_Packed_field_number: - fd.L1.HasPacked = true - fd.L1.IsPacked = protowire.DecodeBool(v) + fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) case genid.FieldOptions_Weak_field_number: fd.L1.IsWeak = protowire.DecodeBool(v) case FieldOptions_EnforceUTF8: - fd.L1.HasEnforceUTF8 = true - fd.L1.EnforceUTF8 = protowire.DecodeBool(v) + fd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -548,7 +546,6 @@ func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { var rawTypeName []byte var rawOptions []byte - xd.L1.EditionFeatures = featuresFromParentDesc(xd.L1.Extendee) xd.L2 = new(ExtensionL2) for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -572,7 +569,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { case genid.FieldDescriptorProto_TypeName_field_number: rawTypeName = v case genid.FieldDescriptorProto_Options_field_number: - xd.unmarshalOptions(v) rawOptions = appendOptions(rawOptions, v) } default: @@ -580,12 +576,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { b = b[m:] } } - if xd.Syntax() == protoreflect.Editions && xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded { - xd.L1.Kind = protoreflect.GroupKind - } - if xd.Syntax() == protoreflect.Editions && xd.L1.EditionFeatures.IsLegacyRequired { - xd.L1.Cardinality = protoreflect.Required - } if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch xd.L1.Kind { @@ -598,32 +588,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { xd.L2.Options = xd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Field, rawOptions) } -func (xd *Extension) unmarshalOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldOptions_Packed_field_number: - xd.L2.IsPacked = protowire.DecodeBool(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FieldOptions_Features_field_number: - xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) { var rawMethods [][]byte var rawOptions []byte diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index 0375a49d40..d1e16a26d5 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -14,9 +14,13 @@ import ( ) var defaultsCache = make(map[Edition]EditionFeatures) +var defaultsKeys = []Edition{} func init() { unmarshalEditionDefaults(editiondefaults.Defaults) + SurrogateProto2.L1.EditionFeatures = getFeaturesFor(EditionProto2) + SurrogateProto3.L1.EditionFeatures = getFeaturesFor(EditionProto3) + SurrogateEdition2023.L1.EditionFeatures = getFeaturesFor(Edition2023) } func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { @@ -110,6 +114,7 @@ func unmarshalEditionDefault(b []byte) { } } defaultsCache[ed] = fs + defaultsKeys = append(defaultsKeys, ed) } func unmarshalEditionDefaults(b []byte) { @@ -135,8 +140,15 @@ func unmarshalEditionDefaults(b []byte) { } func getFeaturesFor(ed Edition) EditionFeatures { - if def, ok := defaultsCache[ed]; ok { - return def + match := EditionUnknown + for _, key := range defaultsKeys { + if key > ed { + break + } + match = key + } + if match == EditionUnknown { + panic(fmt.Sprintf("unsupported edition: %v", ed)) } - panic(fmt.Sprintf("unsupported edition: %v", ed)) + return defaultsCache[match] } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go index 28240ebc5c..bfb3b84170 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go @@ -63,6 +63,7 @@ func (e PlaceholderEnum) Options() protoreflect.ProtoMessage { return des func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues } func (e PlaceholderEnum) ReservedNames() protoreflect.Names { return emptyNames } func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges { return emptyEnumRanges } +func (e PlaceholderEnum) IsClosed() bool { return false } func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor) { return } func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index fd9015e8ee..9a652a2b42 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -10,7 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" ) -const File_reflect_protodesc_proto_go_features_proto = "reflect/protodesc/proto/go_features.proto" +const File_google_protobuf_go_features_proto = "google/protobuf/go_features.proto" // Names for google.protobuf.GoFeatures. const ( diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index 3fadd241e1..78ee47e44b 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -233,9 +233,15 @@ func sizeMessageInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int { } func appendMessageInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + calculatedSize := f.mi.sizePointer(p.Elem(), opts) b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(f.mi.sizePointer(p.Elem(), opts))) - return f.mi.marshalAppendPointer(b, p.Elem(), opts) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := f.mi.marshalAppendPointer(b, p.Elem(), opts) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err } func consumeMessageInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { @@ -262,14 +268,21 @@ func isInitMessageInfo(p pointer, f *coderFieldInfo) error { return f.mi.checkInitializedPointer(p.Elem()) } -func sizeMessage(m proto.Message, tagsize int, _ marshalOptions) int { - return protowire.SizeBytes(proto.Size(m)) + tagsize +func sizeMessage(m proto.Message, tagsize int, opts marshalOptions) int { + return protowire.SizeBytes(opts.Options().Size(m)) + tagsize } func appendMessage(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { + mopts := opts.Options() + calculatedSize := mopts.Size(m) b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(proto.Size(m))) - return opts.Options().MarshalAppend(b, m) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := mopts.MarshalAppend(b, m) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err } func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { @@ -405,8 +418,8 @@ func consumeGroupType(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInf return f.mi.unmarshalPointer(b, p.Elem(), f.num, opts) } -func sizeGroup(m proto.Message, tagsize int, _ marshalOptions) int { - return 2*tagsize + proto.Size(m) +func sizeGroup(m proto.Message, tagsize int, opts marshalOptions) int { + return 2*tagsize + opts.Options().Size(m) } func appendGroup(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { @@ -482,10 +495,14 @@ func appendMessageSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshal b = protowire.AppendVarint(b, f.wiretag) siz := f.mi.sizePointer(v, opts) b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) b, err = f.mi.marshalAppendPointer(b, v, opts) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -520,28 +537,34 @@ func isInitMessageSliceInfo(p pointer, f *coderFieldInfo) error { return nil } -func sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, _ marshalOptions) int { +func sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, opts marshalOptions) int { + mopts := opts.Options() s := p.PointerSlice() n := 0 for _, v := range s { m := asMessage(v.AsValueOf(goType.Elem())) - n += protowire.SizeBytes(proto.Size(m)) + tagsize + n += protowire.SizeBytes(mopts.Size(m)) + tagsize } return n } func appendMessageSlice(b []byte, p pointer, wiretag uint64, goType reflect.Type, opts marshalOptions) ([]byte, error) { + mopts := opts.Options() s := p.PointerSlice() var err error for _, v := range s { m := asMessage(v.AsValueOf(goType.Elem())) b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) + siz := mopts.Size(m) b = protowire.AppendVarint(b, uint64(siz)) - b, err = opts.Options().MarshalAppend(b, m) + before := len(b) + b, err = mopts.MarshalAppend(b, m) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -582,11 +605,12 @@ func isInitMessageSlice(p pointer, goType reflect.Type) error { // Slices of messages func sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { + mopts := opts.Options() list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() - n += protowire.SizeBytes(proto.Size(m)) + tagsize + n += protowire.SizeBytes(mopts.Size(m)) + tagsize } return n } @@ -597,13 +621,17 @@ func appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) + siz := mopts.Size(m) b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) var err error b, err = mopts.MarshalAppend(b, m) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -651,11 +679,12 @@ var coderMessageSliceValue = valueCoderFuncs{ } func sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { + mopts := opts.Options() list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() - n += 2*tagsize + proto.Size(m) + n += 2*tagsize + mopts.Size(m) } return n } @@ -738,12 +767,13 @@ func makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) } } -func sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, _ marshalOptions) int { +func sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, opts marshalOptions) int { + mopts := opts.Options() s := p.PointerSlice() n := 0 for _, v := range s { m := asMessage(v.AsValueOf(messageType.Elem())) - n += 2*tagsize + proto.Size(m) + n += 2*tagsize + mopts.Size(m) } return n } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index 111b9d16f9..fb35f0bae9 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -9,6 +9,7 @@ import ( "sort" "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" ) @@ -240,11 +241,16 @@ func appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coder size += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) size += mapi.valFuncs.size(val, mapValTagSize, opts) b = protowire.AppendVarint(b, uint64(size)) + before := len(b) b, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts) if err != nil { return nil, err } - return mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts) + b, err = mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts) + if measuredSize := len(b) - before; size != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(size, measuredSize) + } + return b, err } else { key := mapi.conv.keyConv.PBValueOf(keyrv).MapKey() val := pointerOfValue(valrv) @@ -259,7 +265,12 @@ func appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coder } b = protowire.AppendVarint(b, mapi.valWiretag) b = protowire.AppendVarint(b, uint64(valSize)) - return f.mi.marshalAppendPointer(b, val, opts) + before := len(b) + b, err = f.mi.marshalAppendPointer(b, val, opts) + if measuredSize := len(b) - before; valSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(valSize, measuredSize) + } + return b, err } } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go index c2a803bb2f..c1c33d0057 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go @@ -167,6 +167,7 @@ func aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { ed := &filedesc.Enum{L2: new(filedesc.EnumL2)} ed.L0.FullName = AberrantDeriveFullName(t) // e.g., github_com.user.repo.MyEnum ed.L0.ParentFile = filedesc.SurrogateProto3 + ed.L1.EditionFeatures = ed.L0.ParentFile.L1.EditionFeatures ed.L2.Values.List = append(ed.L2.Values.List, filedesc.EnumValue{}) // TODO: Use the presence of a UnmarshalJSON method to determine proto2? diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go index 87b30d0504..6e8677ee63 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go @@ -118,7 +118,7 @@ func (xi *ExtensionInfo) initFromLegacy() { xd.L1.Number = protoreflect.FieldNumber(xi.Field) xd.L1.Cardinality = fd.L1.Cardinality xd.L1.Kind = fd.L1.Kind - xd.L2.IsPacked = fd.L1.IsPacked + xd.L1.EditionFeatures = fd.L1.EditionFeatures xd.L2.Default = fd.L1.Default xd.L1.Extendee = Export{}.MessageDescriptorOf(xi.ExtendedType) xd.L2.Enum = ed diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go index 9ab091086c..b649f1124b 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go @@ -7,7 +7,7 @@ package impl import ( "bytes" "compress/gzip" - "io/ioutil" + "io" "sync" "google.golang.org/protobuf/internal/filedesc" @@ -51,7 +51,7 @@ func legacyLoadFileDesc(b []byte) protoreflect.FileDescriptor { if err != nil { panic(err) } - b2, err := ioutil.ReadAll(zr) + b2, err := io.ReadAll(zr) if err != nil { panic(err) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 2ab2c62978..950e9a1fe7 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -204,6 +204,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } } + md.L1.EditionFeatures = md.L0.ParentFile.L1.EditionFeatures // Obtain a list of oneof wrapper types. var oneofWrappers []reflect.Type methods := make([]reflect.Method, 0, 2) @@ -250,6 +251,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName od := &md.L2.Oneofs.List[n] od.L0.FullName = md.FullName().Append(protoreflect.Name(tag)) od.L0.ParentFile = md.L0.ParentFile + od.L1.EditionFeatures = md.L1.EditionFeatures od.L0.Parent = md od.L0.Index = n @@ -260,6 +262,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName aberrantAppendField(md, f.Type, tag, "", "") fd := &md.L2.Fields.List[len(md.L2.Fields.List)-1] fd.L1.ContainingOneof = od + fd.L1.EditionFeatures = od.L1.EditionFeatures od.L1.Fields.List = append(od.L1.Fields.List, fd) } } @@ -307,14 +310,14 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, fd.L0.Parent = md fd.L0.Index = n - if fd.L1.IsWeak || fd.L1.HasPacked { + if fd.L1.IsWeak || fd.L1.EditionFeatures.IsPacked { fd.L1.Options = func() protoreflect.ProtoMessage { opts := descopts.Field.ProtoReflect().New() if fd.L1.IsWeak { opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) } - if fd.L1.HasPacked { - opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.IsPacked)) + if fd.L1.EditionFeatures.IsPacked { + opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked)) } return opts.Interface() } @@ -344,6 +347,7 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, md2.L0.ParentFile = md.L0.ParentFile md2.L0.Parent = md md2.L0.Index = n + md2.L1.EditionFeatures = md.L1.EditionFeatures md2.L1.IsMapEntry = true md2.L2.Options = func() protoreflect.ProtoMessage { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index d9ea010bef..a6f0dbdade 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -247,11 +247,10 @@ func (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.V } } } -func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) { +func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) { if m == nil { return false } - xd := xt.TypeDescriptor() x, ok := (*m)[int32(xd.Number())] if !ok { return false @@ -261,25 +260,22 @@ func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) { return x.Value().List().Len() > 0 case xd.IsMap(): return x.Value().Map().Len() > 0 - case xd.Message() != nil: - return x.Value().Message().IsValid() } return true } -func (m *extensionMap) Clear(xt protoreflect.ExtensionType) { - delete(*m, int32(xt.TypeDescriptor().Number())) +func (m *extensionMap) Clear(xd protoreflect.ExtensionTypeDescriptor) { + delete(*m, int32(xd.Number())) } -func (m *extensionMap) Get(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() +func (m *extensionMap) Get(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value { if m != nil { if x, ok := (*m)[int32(xd.Number())]; ok { return x.Value() } } - return xt.Zero() + return xd.Type().Zero() } -func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) { - xd := xt.TypeDescriptor() +func (m *extensionMap) Set(xd protoreflect.ExtensionTypeDescriptor, v protoreflect.Value) { + xt := xd.Type() isValid := true switch { case !xt.IsValidValue(v): @@ -292,7 +288,7 @@ func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) isValid = v.Message().IsValid() } if !isValid { - panic(fmt.Sprintf("%v: assigning invalid value", xt.TypeDescriptor().FullName())) + panic(fmt.Sprintf("%v: assigning invalid value", xd.FullName())) } if *m == nil { @@ -302,16 +298,15 @@ func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) x.Set(xt, v) (*m)[int32(xd.Number())] = x } -func (m *extensionMap) Mutable(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() +func (m *extensionMap) Mutable(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value { if xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() { panic("invalid Mutable on field with non-composite type") } if x, ok := (*m)[int32(xd.Number())]; ok { return x.Value() } - v := xt.New() - m.Set(xt, v) + v := xd.Type().New() + m.Set(xd, v) return v } @@ -428,7 +423,7 @@ func (m *messageIfaceWrapper) protoUnwrap() interface{} { // checkField verifies that the provided field descriptor is valid. // Exactly one of the returned values is populated. -func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionType) { +func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionTypeDescriptor) { var fi *fieldInfo if n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) { fi = mi.denseFields[n] @@ -457,7 +452,7 @@ func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, if !ok { panic(fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", fd.FullName())) } - return nil, xtd.Type() + return nil, xtd } panic(fmt.Sprintf("field %v is invalid", fd.FullName())) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go index 741d6e5b6b..29ba6bd355 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go @@ -27,8 +27,9 @@ func (m *messageState) protoUnwrap() interface{} { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageState) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods + mi := m.messageInfo() + mi.init() + return &mi.methods } // ProtoMessageInfo is a pseudo-internal API for allowing the v1 code @@ -41,8 +42,9 @@ func (m *messageState) ProtoMessageInfo() *MessageInfo { } func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { + mi := m.messageInfo() + mi.init() + for _, ri := range mi.rangeInfos { switch ri := ri.(type) { case *fieldInfo: if ri.has(m.pointer()) { @@ -52,77 +54,86 @@ func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.V } case *oneofInfo: if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] + fi := mi.fields[n] if !f(fi.fieldDesc, fi.get(m.pointer())) { return } } } } - m.messageInfo().extensionMap(m.pointer()).Range(f) + mi.extensionMap(m.pointer()).Range(f) } func (m *messageState) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.has(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) + return mi.extensionMap(m.pointer()).Has(xd) } } func (m *messageState) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.clear(m.pointer()) } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) + mi.extensionMap(m.pointer()).Clear(xd) } } func (m *messageState) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.get(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) + return mi.extensionMap(m.pointer()).Get(xd) } } func (m *messageState) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.set(m.pointer(), v) } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) + mi.extensionMap(m.pointer()).Set(xd, v) } } func (m *messageState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.mutable(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) + return mi.extensionMap(m.pointer()).Mutable(xd) } } func (m *messageState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.newField() } else { - return xt.New() + return xd.Type().New() } } func (m *messageState) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { + mi := m.messageInfo() + mi.init() + if oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { return od.Fields().ByNumber(oi.which(m.pointer())) } panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) } func (m *messageState) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) + mi := m.messageInfo() + mi.init() + return mi.getUnknown(m.pointer()) } func (m *messageState) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) + mi := m.messageInfo() + mi.init() + mi.setUnknown(m.pointer(), b) } func (m *messageState) IsValid() bool { return !m.pointer().IsNil() @@ -147,8 +158,9 @@ func (m *messageReflectWrapper) protoUnwrap() interface{} { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods + mi := m.messageInfo() + mi.init() + return &mi.methods } // ProtoMessageInfo is a pseudo-internal API for allowing the v1 code @@ -161,8 +173,9 @@ func (m *messageReflectWrapper) ProtoMessageInfo() *MessageInfo { } func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { + mi := m.messageInfo() + mi.init() + for _, ri := range mi.rangeInfos { switch ri := ri.(type) { case *fieldInfo: if ri.has(m.pointer()) { @@ -172,77 +185,86 @@ func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, proto } case *oneofInfo: if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] + fi := mi.fields[n] if !f(fi.fieldDesc, fi.get(m.pointer())) { return } } } } - m.messageInfo().extensionMap(m.pointer()).Range(f) + mi.extensionMap(m.pointer()).Range(f) } func (m *messageReflectWrapper) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.has(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) + return mi.extensionMap(m.pointer()).Has(xd) } } func (m *messageReflectWrapper) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.clear(m.pointer()) } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) + mi.extensionMap(m.pointer()).Clear(xd) } } func (m *messageReflectWrapper) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.get(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) + return mi.extensionMap(m.pointer()).Get(xd) } } func (m *messageReflectWrapper) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.set(m.pointer(), v) } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) + mi.extensionMap(m.pointer()).Set(xd, v) } } func (m *messageReflectWrapper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.mutable(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) + return mi.extensionMap(m.pointer()).Mutable(xd) } } func (m *messageReflectWrapper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.newField() } else { - return xt.New() + return xd.Type().New() } } func (m *messageReflectWrapper) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { + mi := m.messageInfo() + mi.init() + if oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { return od.Fields().ByNumber(oi.which(m.pointer())) } panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) } func (m *messageReflectWrapper) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) + mi := m.messageInfo() + mi.init() + return mi.getUnknown(m.pointer()) } func (m *messageReflectWrapper) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) + mi := m.messageInfo() + mi.init() + mi.setUnknown(m.pointer(), b) } func (m *messageReflectWrapper) IsValid() bool { return !m.pointer().IsNil() diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index a50fcfb49b..fc6bfc3960 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,7 +51,7 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 33 + Minor = 34 Patch = 0 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index e5b03b5677..d75a6534c1 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -51,6 +51,8 @@ type UnmarshalOptions struct { // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). +// +// See the [UnmarshalOptions] type if you need more control. func Unmarshal(b []byte, m Message) error { _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect()) return err diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go index 4fed202f9f..1f847bcc35 100644 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ b/vendor/google.golang.org/protobuf/proto/encode.go @@ -5,12 +5,17 @@ package proto import ( + "errors" + "fmt" + "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/order" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" + + protoerrors "google.golang.org/protobuf/internal/errors" ) // MarshalOptions configures the marshaler. @@ -70,7 +75,32 @@ type MarshalOptions struct { UseCachedSize bool } +// flags turns the specified MarshalOptions (user-facing) into +// protoiface.MarshalInputFlags (used internally by the marshaler). +// +// See impl.marshalOptions.Options for the inverse operation. +func (o MarshalOptions) flags() protoiface.MarshalInputFlags { + var flags protoiface.MarshalInputFlags + + // Note: o.AllowPartial is always forced to true by MarshalOptions.marshal, + // which is why it is not a part of MarshalInputFlags. + + if o.Deterministic { + flags |= protoiface.MarshalDeterministic + } + + if o.UseCachedSize { + flags |= protoiface.MarshalUseCachedSize + } + + return flags +} + // Marshal returns the wire-format encoding of m. +// +// This is the most common entry point for encoding a Protobuf message. +// +// See the [MarshalOptions] type if you need more control. func Marshal(m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to output. if m == nil { @@ -116,6 +146,9 @@ func emptyBytesForMessage(m Message) []byte { // MarshalAppend appends the wire-format encoding of m to b, // returning the result. +// +// This is a less common entry point than [Marshal], which is only needed if you +// need to supply your own buffers for performance reasons. func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to append. if m == nil { @@ -145,12 +178,7 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac in := protoiface.MarshalInput{ Message: m, Buf: b, - } - if o.Deterministic { - in.Flags |= protoiface.MarshalDeterministic - } - if o.UseCachedSize { - in.Flags |= protoiface.MarshalUseCachedSize + Flags: o.flags(), } if methods.Size != nil { sout := methods.Size(protoiface.SizeInput{ @@ -168,6 +196,10 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac out.Buf, err = o.marshalMessageSlow(b, m) } if err != nil { + var mismatch *protoerrors.SizeMismatchError + if errors.As(err, &mismatch) { + return out, fmt.Errorf("marshaling %s: %v", string(m.Descriptor().FullName()), err) + } return out, err } if allowPartial { diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go index 17899a3a76..c9c8721a69 100644 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ b/vendor/google.golang.org/protobuf/proto/extension.go @@ -11,18 +11,21 @@ import ( // HasExtension reports whether an extension field is populated. // It returns false if m is invalid or if xt does not extend m. func HasExtension(m Message, xt protoreflect.ExtensionType) bool { - // Treat nil message interface as an empty message; no populated fields. - if m == nil { + // Treat nil message interface or descriptor as an empty message; no populated + // fields. + if m == nil || xt == nil { return false } // As a special-case, we reports invalid or mismatching descriptors // as always not being populated (since they aren't). - if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() { + mr := m.ProtoReflect() + xd := xt.TypeDescriptor() + if mr.Descriptor() != xd.ContainingMessage() { return false } - return m.ProtoReflect().Has(xt.TypeDescriptor()) + return mr.Has(xd) } // ClearExtension clears an extension field such that subsequent diff --git a/vendor/google.golang.org/protobuf/proto/messageset.go b/vendor/google.golang.org/protobuf/proto/messageset.go index 312d5d45c6..575d14831f 100644 --- a/vendor/google.golang.org/protobuf/proto/messageset.go +++ b/vendor/google.golang.org/protobuf/proto/messageset.go @@ -47,11 +47,16 @@ func (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]b func (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { b = messageset.AppendFieldStart(b, fd.Number()) b = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType) - b = protowire.AppendVarint(b, uint64(o.Size(value.Message().Interface()))) + calculatedSize := o.Size(value.Message().Interface()) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) b, err := o.marshalMessage(b, value.Message()) if err != nil { return b, err } + if measuredSize := len(b) - before; calculatedSize != measuredSize { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } b = messageset.AppendFieldEnd(b) return b, nil } diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go index f1692b49b6..052fb5ae31 100644 --- a/vendor/google.golang.org/protobuf/proto/size.go +++ b/vendor/google.golang.org/protobuf/proto/size.go @@ -34,6 +34,7 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) { if methods != nil && methods.Size != nil { out := methods.Size(protoiface.SizeInput{ Message: m, + Flags: o.flags(), }) return out.Size } @@ -42,6 +43,7 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) { // This case is mainly used for legacy types with a Marshal method. out, _ := methods.Marshal(protoiface.MarshalInput{ Message: m, + Flags: o.flags(), }) return len(out.Buf) } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index baa0cc6218..8fbecb4f58 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -13,6 +13,7 @@ package protodesc import ( + "google.golang.org/protobuf/internal/editionssupport" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/pragma" @@ -91,15 +92,17 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot switch fd.GetSyntax() { case "proto2", "": f.L1.Syntax = protoreflect.Proto2 + f.L1.Edition = filedesc.EditionProto2 case "proto3": f.L1.Syntax = protoreflect.Proto3 + f.L1.Edition = filedesc.EditionProto3 case "editions": f.L1.Syntax = protoreflect.Editions f.L1.Edition = fromEditionProto(fd.GetEdition()) default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) { + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) } f.L1.Path = fd.GetName() @@ -114,9 +117,7 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot opts = proto.Clone(opts).(*descriptorpb.FileOptions) f.L2.Options = func() protoreflect.ProtoMessage { return opts } } - if f.L1.Syntax == protoreflect.Editions { - initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) - } + initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) for _, i := range fd.GetPublicDependency() { @@ -219,10 +220,10 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil { return nil, err } - if err := validateMessageDeclarations(f.L1.Messages.List, fd.GetMessageType()); err != nil { + if err := validateMessageDeclarations(f, f.L1.Messages.List, fd.GetMessageType()); err != nil { return nil, err } - if err := validateExtensionDeclarations(f.L1.Extensions.List, fd.GetExtension()); err != nil { + if err := validateExtensionDeclarations(f, f.L1.Extensions.List, fd.GetExtension()); err != nil { return nil, err } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index b3278163c5..8561755427 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -69,9 +69,7 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { return nil, err } - if m.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) - } + m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) if opts := md.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.MessageOptions) m.L2.Options = func() protoreflect.ProtoMessage { return opts } @@ -146,13 +144,15 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc if f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil { return nil, err } + f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) f.L1.IsProto3Optional = fd.GetProto3Optional() if opts := fd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) f.L1.Options = func() protoreflect.ProtoMessage { return opts } f.L1.IsWeak = opts.GetWeak() - f.L1.HasPacked = opts.Packed != nil - f.L1.IsPacked = opts.GetPacked() + if opts.Packed != nil { + f.L1.EditionFeatures.IsPacked = opts.GetPacked() + } } f.L1.Number = protoreflect.FieldNumber(fd.GetNumber()) f.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel()) @@ -163,32 +163,12 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc f.L1.StringName.InitJSON(fd.GetJsonName()) } - if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) - - if f.L1.EditionFeatures.IsLegacyRequired { - f.L1.Cardinality = protoreflect.Required - } - // We reuse the existing field because the old option `[packed = - // true]` is mutually exclusive with the editions feature. - if canBePacked(fd) { - f.L1.HasPacked = true - f.L1.IsPacked = f.L1.EditionFeatures.IsPacked - } - - // We pretend this option is always explicitly set because the only - // use of HasEnforceUTF8 is to determine whether to use EnforceUTF8 - // or to return the appropriate default. - // When using editions we either parse the option or resolve the - // appropriate default here (instead of later when this option is - // requested from the descriptor). - // In proto2/proto3 syntax HasEnforceUTF8 might be false. - f.L1.HasEnforceUTF8 = true - f.L1.EnforceUTF8 = f.L1.EditionFeatures.IsUTF8Validated + if f.L1.EditionFeatures.IsLegacyRequired { + f.L1.Cardinality = protoreflect.Required + } - if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { - f.L1.Kind = protoreflect.GroupKind - } + if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { + f.L1.Kind = protoreflect.GroupKind } } return fs, nil @@ -201,12 +181,10 @@ func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDesc if o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil { return nil, err } + o.L1.EditionFeatures = mergeEditionFeatures(parent, od.GetOptions().GetFeatures()) if opts := od.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.OneofOptions) o.L1.Options = func() protoreflect.ProtoMessage { return opts } - if parent.Syntax() == protoreflect.Editions { - o.L1.EditionFeatures = mergeEditionFeatures(parent, opts.GetFeatures()) - } } } return os, nil @@ -220,10 +198,13 @@ func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescript if x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil { return nil, err } + x.L1.EditionFeatures = mergeEditionFeatures(parent, xd.GetOptions().GetFeatures()) if opts := xd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) x.L2.Options = func() protoreflect.ProtoMessage { return opts } - x.L2.IsPacked = opts.GetPacked() + if opts.Packed != nil { + x.L1.EditionFeatures.IsPacked = opts.GetPacked() + } } x.L1.Number = protoreflect.FieldNumber(xd.GetNumber()) x.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel()) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index e4dcaf876c..c629308675 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -45,11 +45,11 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri if allowAlias && !foundAlias { return errors.New("enum %q allows aliases, but none were found", e.FullName()) } - if e.Syntax() == protoreflect.Proto3 { + if !e.IsClosed() { if v := e.Values().Get(0); v.Number() != 0 { - return errors.New("enum %q using proto3 semantics must have zero number for the first value", v.FullName()) + return errors.New("enum %q using open semantics must have zero number for the first value", v.FullName()) } - // Verify that value names in proto3 do not conflict if the + // Verify that value names in open enums do not conflict if the // case-insensitive prefix is removed. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055 names := map[string]protoreflect.EnumValueDescriptor{} @@ -58,7 +58,7 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri v1 := e.Values().Get(i) s := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix)) if v2, ok := names[s]; ok && v1.Number() != v2.Number() { - return errors.New("enum %q using proto3 semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) + return errors.New("enum %q using open semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) } names[s] = v1 } @@ -80,7 +80,9 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri return nil } -func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { +func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { + // There are a few limited exceptions only for proto3 + isProto3 := file.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) for i, md := range mds { m := &ms[i] @@ -107,10 +109,10 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if isMessageSet && !flags.ProtoLegacy { return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) } - if isMessageSet && (m.Syntax() == protoreflect.Proto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { + if isMessageSet && (isProto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) } - if m.Syntax() == protoreflect.Proto3 { + if isProto3 { if m.ExtensionRanges().Len() > 0 { return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) } @@ -149,7 +151,7 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc return errors.New("message field %q may not have extendee: %q", f.FullName(), fd.GetExtendee()) } if f.L1.IsProto3Optional { - if f.Syntax() != protoreflect.Proto3 { + if !isProto3 { return errors.New("message field %q under proto3 optional semantics must be specified in the proto3 syntax", f.FullName()) } if f.Cardinality() != protoreflect.Optional { @@ -162,26 +164,29 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if f.IsWeak() && !flags.ProtoLegacy { return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) } - if f.IsWeak() && (f.Syntax() != protoreflect.Proto2 || !isOptionalMessage(f) || f.ContainingOneof() != nil) { + if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) { return errors.New("message field %q may only be weak for an optional message", f.FullName()) } if f.IsPacked() && !isPackable(f) { return errors.New("message field %q is not packable", f.FullName()) } - if err := checkValidGroup(f); err != nil { + if err := checkValidGroup(file, f); err != nil { return errors.New("message field %q is an invalid group: %v", f.FullName(), err) } if err := checkValidMap(f); err != nil { return errors.New("message field %q is an invalid map: %v", f.FullName(), err) } - if f.Syntax() == protoreflect.Proto3 { + if isProto3 { if f.Cardinality() == protoreflect.Required { return errors.New("message field %q using proto3 semantics cannot be required", f.FullName()) } - if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().Syntax() != protoreflect.Proto3 { - return errors.New("message field %q using proto3 semantics may only depend on a proto3 enum", f.FullName()) + if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q using proto3 semantics may only depend on open enums", f.FullName()) } } + if f.Cardinality() == protoreflect.Optional && !f.HasPresence() && f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q with implicit presence may only use open enums", f.FullName()) + } } seenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs for j := range md.GetOneofDecl() { @@ -215,17 +220,17 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil { return err } - if err := validateMessageDeclarations(m.L1.Messages.List, md.GetNestedType()); err != nil { + if err := validateMessageDeclarations(file, m.L1.Messages.List, md.GetNestedType()); err != nil { return err } - if err := validateExtensionDeclarations(m.L1.Extensions.List, md.GetExtension()); err != nil { + if err := validateExtensionDeclarations(file, m.L1.Extensions.List, md.GetExtension()); err != nil { return err } } return nil } -func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { +func validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { for i, xd := range xds { x := &xs[i] // NOTE: Avoid using the IsValid method since extensions to MessageSet @@ -267,13 +272,13 @@ func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb. if x.IsPacked() && !isPackable(x) { return errors.New("extension field %q is not packable", x.FullName()) } - if err := checkValidGroup(x); err != nil { + if err := checkValidGroup(f, x); err != nil { return errors.New("extension field %q is an invalid group: %v", x.FullName(), err) } if md := x.Message(); md != nil && md.IsMapEntry() { return errors.New("extension field %q cannot be a map entry", x.FullName()) } - if x.Syntax() == protoreflect.Proto3 { + if f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) { switch x.ContainingMessage().FullName() { case (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName(): @@ -309,21 +314,25 @@ func isPackable(fd protoreflect.FieldDescriptor) bool { // checkValidGroup reports whether fd is a valid group according to the same // rules that protoc imposes. -func checkValidGroup(fd protoreflect.FieldDescriptor) error { +func checkValidGroup(f *filedesc.File, fd protoreflect.FieldDescriptor) error { md := fd.Message() switch { case fd.Kind() != protoreflect.GroupKind: return nil - case fd.Syntax() == protoreflect.Proto3: + case f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3): return errors.New("invalid under proto3 semantics") case md == nil || md.IsPlaceholder(): return errors.New("message must be resolvable") - case fd.FullName().Parent() != md.FullName().Parent(): - return errors.New("message and field must be declared in the same scope") - case !unicode.IsUpper(rune(md.Name()[0])): - return errors.New("message name must start with an uppercase") - case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): - return errors.New("field name must be lowercased form of the message name") + } + if f.L1.Edition < fromEditionProto(descriptorpb.Edition_EDITION_2023) { + switch { + case fd.FullName().Parent() != md.FullName().Parent(): + return errors.New("message and field must be declared in the same scope") + case !unicode.IsUpper(rune(md.Name()[0])): + return errors.New("message name must start with an uppercase") + case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): + return errors.New("field name must be lowercased form of the message name") + } } return nil } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 2a6b29d179..f6a1fec6e4 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -17,11 +17,6 @@ import ( gofeaturespb "google.golang.org/protobuf/types/gofeaturespb" ) -const ( - SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2 - SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 -) - var defaults = &descriptorpb.FeatureSetDefaults{} var defaultsCacheMu sync.Mutex var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go index 9d6e05420f..a5de8d4001 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go @@ -73,6 +73,16 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() { p.Syntax = proto.String(file.Syntax().String()) } + if file.Syntax() == protoreflect.Editions { + desc := file + if fileImportDesc, ok := file.(protoreflect.FileImport); ok { + desc = fileImportDesc.FileDescriptor + } + + if editionsInterface, ok := desc.(interface{ Edition() int32 }); ok { + p.Edition = descriptorpb.Edition(editionsInterface.Edition()).Enum() + } + } return p } @@ -153,6 +163,18 @@ func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.Fi if field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() { p.Proto3Optional = proto.Bool(true) } + if field.Syntax() == protoreflect.Editions { + // Editions have no group keyword, this type is only set so that downstream users continue + // treating this as delimited encoding. + if p.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP { + p.Type = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum() + } + // Editions have no required keyword, this label is only set so that downstream users continue + // treating it as required. + if p.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED { + p.Label = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum() + } + } if field.HasDefault() { def, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor) if err != nil && field.DefaultEnumValue() != nil { diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go index 00b01fbd8c..c85bfaa5bb 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go @@ -161,7 +161,7 @@ const ( // IsValid reports whether the syntax is valid. func (s Syntax) IsValid() bool { switch s { - case Proto2, Proto3: + case Proto2, Proto3, Editions: return true default: return false diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 60ff62b4c8..5b80afe520 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -544,6 +544,12 @@ type EnumDescriptor interface { // ReservedRanges is a list of reserved ranges of enum numbers. ReservedRanges() EnumRanges + // IsClosed reports whether this enum uses closed semantics. + // See https://protobuf.dev/programming-guides/enum/#definitions. + // Note: the Go protobuf implementation is not spec compliant and treats + // all enums as open enums. + IsClosed() bool + isEnumDescriptor } type isEnumDescriptor interface{ ProtoType(EnumDescriptor) } diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index 25de5ae008..9f046f9790 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -6,9 +6,9 @@ // https://developers.google.com/open-source/licenses/bsd // Code generated by protoc-gen-go. DO NOT EDIT. -// source: reflect/protodesc/proto/go_features.proto +// source: google/protobuf/go_features.proto -package proto +package gofeaturespb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -30,7 +30,7 @@ type GoFeatures struct { func (x *GoFeatures) Reset() { *x = GoFeatures{} if protoimpl.UnsafeEnabled { - mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + mi := &file_google_protobuf_go_features_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +43,7 @@ func (x *GoFeatures) String() string { func (*GoFeatures) ProtoMessage() {} func (x *GoFeatures) ProtoReflect() protoreflect.Message { - mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + mi := &file_google_protobuf_go_features_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +56,7 @@ func (x *GoFeatures) ProtoReflect() protoreflect.Message { // Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead. func (*GoFeatures) Descriptor() ([]byte, []int) { - return file_reflect_protodesc_proto_go_features_proto_rawDescGZIP(), []int{0} + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0} } func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { @@ -66,69 +66,67 @@ func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { return false } -var file_reflect_protodesc_proto_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ +var file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FeatureSet)(nil), ExtensionType: (*GoFeatures)(nil), Field: 1002, - Name: "google.protobuf.go", + Name: "pb.go", Tag: "bytes,1002,opt,name=go", - Filename: "reflect/protodesc/proto/go_features.proto", + Filename: "google/protobuf/go_features.proto", }, } // Extension fields to descriptorpb.FeatureSet. var ( - // optional google.protobuf.GoFeatures go = 1002; - E_Go = &file_reflect_protodesc_proto_go_features_proto_extTypes[0] + // optional pb.GoFeatures go = 1002; + E_Go = &file_google_protobuf_go_features_proto_extTypes[0] ) -var File_reflect_protodesc_proto_go_features_proto protoreflect.FileDescriptor - -var file_reflect_protodesc_proto_go_features_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x64, - 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 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, 0x22, 0x6a, - 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a, - 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x1f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, - 0x65, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, - 0x07, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, - 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x49, 0x0a, 0x02, 0x67, 0x6f, - 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x64, 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, +var File_google_protobuf_go_features_proto protoreflect.FileDescriptor + +var file_google_protobuf_go_features_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 0x22, 0x6a, 0x0a, 0x0a, 0x47, 0x6f, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1f, 0x88, 0x01, 0x01, + 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0xe6, 0x07, 0xa2, + 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0x52, 0x17, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f, + 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, + 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x70, 0x62, } var ( - file_reflect_protodesc_proto_go_features_proto_rawDescOnce sync.Once - file_reflect_protodesc_proto_go_features_proto_rawDescData = file_reflect_protodesc_proto_go_features_proto_rawDesc + file_google_protobuf_go_features_proto_rawDescOnce sync.Once + file_google_protobuf_go_features_proto_rawDescData = file_google_protobuf_go_features_proto_rawDesc ) -func file_reflect_protodesc_proto_go_features_proto_rawDescGZIP() []byte { - file_reflect_protodesc_proto_go_features_proto_rawDescOnce.Do(func() { - file_reflect_protodesc_proto_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflect_protodesc_proto_go_features_proto_rawDescData) +func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { + file_google_protobuf_go_features_proto_rawDescOnce.Do(func() { + file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_go_features_proto_rawDescData) }) - return file_reflect_protodesc_proto_go_features_proto_rawDescData + return file_google_protobuf_go_features_proto_rawDescData } -var file_reflect_protodesc_proto_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_reflect_protodesc_proto_go_features_proto_goTypes = []interface{}{ - (*GoFeatures)(nil), // 0: google.protobuf.GoFeatures +var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_go_features_proto_goTypes = []interface{}{ + (*GoFeatures)(nil), // 0: pb.GoFeatures (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet } -var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{ - 1, // 0: google.protobuf.go:extendee -> google.protobuf.FeatureSet - 0, // 1: google.protobuf.go:type_name -> google.protobuf.GoFeatures +var file_google_protobuf_go_features_proto_depIdxs = []int32{ + 1, // 0: pb.go:extendee -> google.protobuf.FeatureSet + 0, // 1: pb.go:type_name -> pb.GoFeatures 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 1, // [1:2] is the sub-list for extension type_name @@ -136,13 +134,13 @@ var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_reflect_protodesc_proto_go_features_proto_init() } -func file_reflect_protodesc_proto_go_features_proto_init() { - if File_reflect_protodesc_proto_go_features_proto != nil { +func init() { file_google_protobuf_go_features_proto_init() } +func file_google_protobuf_go_features_proto_init() { + if File_google_protobuf_go_features_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_reflect_protodesc_proto_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GoFeatures); i { case 0: return &v.state @@ -159,19 +157,19 @@ func file_reflect_protodesc_proto_go_features_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_reflect_protodesc_proto_go_features_proto_rawDesc, + RawDescriptor: file_google_protobuf_go_features_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 1, NumServices: 0, }, - GoTypes: file_reflect_protodesc_proto_go_features_proto_goTypes, - DependencyIndexes: file_reflect_protodesc_proto_go_features_proto_depIdxs, - MessageInfos: file_reflect_protodesc_proto_go_features_proto_msgTypes, - ExtensionInfos: file_reflect_protodesc_proto_go_features_proto_extTypes, + GoTypes: file_google_protobuf_go_features_proto_goTypes, + DependencyIndexes: file_google_protobuf_go_features_proto_depIdxs, + MessageInfos: file_google_protobuf_go_features_proto_msgTypes, + ExtensionInfos: file_google_protobuf_go_features_proto_extTypes, }.Build() - File_reflect_protodesc_proto_go_features_proto = out.File - file_reflect_protodesc_proto_go_features_proto_rawDesc = nil - file_reflect_protodesc_proto_go_features_proto_goTypes = nil - file_reflect_protodesc_proto_go_features_proto_depIdxs = nil + File_google_protobuf_go_features_proto = out.File + file_google_protobuf_go_features_proto_rawDesc = nil + file_google_protobuf_go_features_proto_goTypes = nil + file_google_protobuf_go_features_proto_depIdxs = nil } diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto deleted file mode 100644 index d246571296..0000000000 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -syntax = "proto2"; - -package google.protobuf; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/protobuf/types/gofeaturespb"; - -extend google.protobuf.FeatureSet { - optional GoFeatures go = 1002; -} - -message GoFeatures { - // Whether or not to generate the deprecated UnmarshalJSON method for enums. - optional bool legacy_unmarshal_json_enum = 1 [ - retention = RETENTION_RUNTIME, - targets = TARGET_TYPE_ENUM, - edition_defaults = { edition: EDITION_PROTO2, value: "true" }, - edition_defaults = { edition: EDITION_PROTO3, value: "false" } - ]; -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4cdd840371..998546b7b7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,10 +1,10 @@ -# cloud.google.com/go v0.112.1 +# cloud.google.com/go v0.112.2 ## explicit; go 1.19 cloud.google.com/go/internal cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace cloud.google.com/go/internal/version -# cloud.google.com/go/auth v0.2.2 +# cloud.google.com/go/auth v0.3.0 ## explicit; go 1.19 cloud.google.com/go/auth cloud.google.com/go/auth/credentials @@ -20,7 +20,7 @@ cloud.google.com/go/auth/internal/credsfile cloud.google.com/go/auth/internal/jwt cloud.google.com/go/auth/internal/transport cloud.google.com/go/auth/internal/transport/cert -# cloud.google.com/go/auth/oauth2adapt v0.2.1 +# cloud.google.com/go/auth/oauth2adapt v0.2.2 ## explicit; go 1.19 cloud.google.com/go/auth/oauth2adapt # cloud.google.com/go/compute/metadata v0.3.0 @@ -1204,7 +1204,7 @@ golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/tokeninternal golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/api v0.175.0 +# google.golang.org/api v0.177.0 ## explicit; go 1.19 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport @@ -1231,7 +1231,7 @@ google.golang.org/genproto/protobuf/field_mask ## explicit; go 1.19 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/errdetails @@ -1304,7 +1304,7 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.33.0 +# google.golang.org/protobuf v1.34.0 ## explicit; go 1.17 google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext @@ -1313,6 +1313,7 @@ google.golang.org/protobuf/internal/descfmt google.golang.org/protobuf/internal/descopts google.golang.org/protobuf/internal/detrand google.golang.org/protobuf/internal/editiondefaults +google.golang.org/protobuf/internal/editionssupport google.golang.org/protobuf/internal/encoding/defval google.golang.org/protobuf/internal/encoding/json google.golang.org/protobuf/internal/encoding/messageset