aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/api
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2018-06-20 22:39:07 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-06-20 22:39:07 +0100
commitde6d2c524430287c699aaa898c1325da6afea539 (patch)
treef78eb841208d667668a7bc92a9290d693cc7103b /vendor/google.golang.org/api
parenteb99016e1629e690e55633de6fc63a14c53e7ea2 (diff)
Update dependencies
Diffstat (limited to 'vendor/google.golang.org/api')
-rw-r--r--vendor/google.golang.org/api/gensupport/go18.go17
-rw-r--r--vendor/google.golang.org/api/gensupport/media.go49
-rw-r--r--vendor/google.golang.org/api/gensupport/not_go18.go14
-rw-r--r--vendor/google.golang.org/api/gensupport/send.go10
-rw-r--r--vendor/google.golang.org/api/googleapi/googleapi.go9
-rw-r--r--vendor/google.golang.org/api/internal/creds.go78
-rw-r--r--vendor/google.golang.org/api/internal/settings.go25
-rw-r--r--vendor/google.golang.org/api/iterator/iterator.go2
-rw-r--r--vendor/google.golang.org/api/oauth2/v2/oauth2-api.json546
-rw-r--r--vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go24
-rw-r--r--vendor/google.golang.org/api/option/credentials_go19.go32
-rw-r--r--vendor/google.golang.org/api/option/credentials_notgo19.go32
-rw-r--r--vendor/google.golang.org/api/option/option.go13
-rw-r--r--vendor/google.golang.org/api/storage/v1/storage-api.json7367
-rw-r--r--vendor/google.golang.org/api/storage/v1/storage-gen.go635
-rw-r--r--vendor/google.golang.org/api/transport/dial.go12
-rw-r--r--vendor/google.golang.org/api/transport/go19.go34
-rw-r--r--vendor/google.golang.org/api/transport/grpc/dial.go57
-rw-r--r--vendor/google.golang.org/api/transport/grpc/dial_appengine.go41
-rw-r--r--vendor/google.golang.org/api/transport/grpc/go18.go26
-rw-r--r--vendor/google.golang.org/api/transport/grpc/not_go18.go21
-rw-r--r--vendor/google.golang.org/api/transport/http/dial.go93
-rw-r--r--vendor/google.golang.org/api/transport/http/dial_appengine.go30
-rw-r--r--vendor/google.golang.org/api/transport/http/go18.go31
-rw-r--r--vendor/google.golang.org/api/transport/http/not_go18.go21
-rw-r--r--vendor/google.golang.org/api/transport/not_go19.go34
26 files changed, 4975 insertions, 4278 deletions
diff --git a/vendor/google.golang.org/api/gensupport/go18.go b/vendor/google.golang.org/api/gensupport/go18.go
new file mode 100644
index 0000000..c76cb8f
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/go18.go
@@ -0,0 +1,17 @@
+// Copyright 2018 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.
+
+// +build go1.8
+
+package gensupport
+
+import (
+ "io"
+ "net/http"
+)
+
+// SetGetBody sets the GetBody field of req to f.
+func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {
+ req.GetBody = f
+}
diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go
index f3e77fc..5895fef 100644
--- a/vendor/google.golang.org/api/gensupport/media.go
+++ b/vendor/google.golang.org/api/gensupport/media.go
@@ -5,12 +5,15 @@
package gensupport
import (
+ "bytes"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/textproto"
+ "strings"
+ "sync"
"google.golang.org/api/googleapi"
)
@@ -103,12 +106,13 @@ type typeReader struct {
typ string
}
-// multipartReader combines the contents of multiple readers to creat a multipart/related HTTP body.
+// multipartReader combines the contents of multiple readers to create a multipart/related HTTP body.
// Close must be called if reads from the multipartReader are abandoned before reaching EOF.
type multipartReader struct {
pr *io.PipeReader
- pipeOpen bool
ctype string
+ mu sync.Mutex
+ pipeOpen bool
}
func newMultipartReader(parts []typeReader) *multipartReader {
@@ -144,10 +148,13 @@ func (mp *multipartReader) Read(data []byte) (n int, err error) {
}
func (mp *multipartReader) Close() error {
+ mp.mu.Lock()
if !mp.pipeOpen {
+ mp.mu.Unlock()
return nil
}
mp.pipeOpen = false
+ mp.mu.Unlock()
return mp.pr.Close()
}
@@ -251,11 +258,11 @@ func (mi *MediaInfo) UploadType() string {
}
// UploadRequest sets up an HTTP request for media upload. It adds headers
-// as necessary, and returns a replacement for the body.
-func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, cleanup func()) {
+// as necessary, and returns a replacement for the body and a function for http.Request.GetBody.
+func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, getBody func() (io.ReadCloser, error), cleanup func()) {
cleanup = func() {}
if mi == nil {
- return body, cleanup
+ return body, nil, cleanup
}
var media io.Reader
if mi.media != nil {
@@ -269,7 +276,17 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
media, _, _, _ = mi.buffer.Chunk()
}
if media != nil {
+ fb := readerFunc(body)
+ fm := readerFunc(media)
combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType)
+ if fb != nil && fm != nil {
+ getBody = func() (io.ReadCloser, error) {
+ rb := ioutil.NopCloser(fb())
+ rm := ioutil.NopCloser(fm())
+ r, _ := CombineBodyMedia(rb, "application/json", rm, mi.mType)
+ return r, nil
+ }
+ }
cleanup = func() { combined.Close() }
reqHeaders.Set("Content-Type", ctype)
body = combined
@@ -277,7 +294,27 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
if mi.buffer != nil && mi.mType != "" && !mi.singleChunk {
reqHeaders.Set("X-Upload-Content-Type", mi.mType)
}
- return body, cleanup
+ return body, getBody, cleanup
+}
+
+// readerFunc returns a function that always returns an io.Reader that has the same
+// contents as r, provided that can be done without consuming r. Otherwise, it
+// returns nil.
+// See http.NewRequest (in net/http/request.go).
+func readerFunc(r io.Reader) func() io.Reader {
+ switch r := r.(type) {
+ case *bytes.Buffer:
+ buf := r.Bytes()
+ return func() io.Reader { return bytes.NewReader(buf) }
+ case *bytes.Reader:
+ snapshot := *r
+ return func() io.Reader { r := snapshot; return &r }
+ case *strings.Reader:
+ snapshot := *r
+ return func() io.Reader { r := snapshot; return &r }
+ default:
+ return nil
+ }
}
// ResumableUpload returns an appropriately configured ResumableUpload value if the
diff --git a/vendor/google.golang.org/api/gensupport/not_go18.go b/vendor/google.golang.org/api/gensupport/not_go18.go
new file mode 100644
index 0000000..2536501
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/not_go18.go
@@ -0,0 +1,14 @@
+// Copyright 2018 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.
+
+// +build !go1.8
+
+package gensupport
+
+import (
+ "io"
+ "net/http"
+)
+
+func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {}
diff --git a/vendor/google.golang.org/api/gensupport/send.go b/vendor/google.golang.org/api/gensupport/send.go
index 092044f..0f75aa8 100644
--- a/vendor/google.golang.org/api/gensupport/send.go
+++ b/vendor/google.golang.org/api/gensupport/send.go
@@ -5,6 +5,7 @@
package gensupport
import (
+ "encoding/json"
"errors"
"net/http"
@@ -59,3 +60,12 @@ func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*
}
return resp, err
}
+
+// DecodeResponse decodes the body of res into target. If there is no body,
+// target is unchanged.
+func DecodeResponse(target interface{}, res *http.Response) error {
+ if res.StatusCode == http.StatusNoContent {
+ return nil
+ }
+ return json.NewDecoder(res.Body).Decode(target)
+}
diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go
index f6e15be..c998445 100644
--- a/vendor/google.golang.org/api/googleapi/googleapi.go
+++ b/vendor/google.golang.org/api/googleapi/googleapi.go
@@ -270,11 +270,20 @@ func ProcessMediaOptions(opts []MediaOption) *MediaOptions {
func ResolveRelative(basestr, relstr string) string {
u, _ := url.Parse(basestr)
+ afterColonPath := ""
+ if i := strings.IndexRune(relstr, ':'); i > 0 {
+ afterColonPath = relstr[i+1:]
+ relstr = relstr[:i]
+ }
rel, _ := url.Parse(relstr)
u = u.ResolveReference(rel)
us := u.String()
+ if afterColonPath != "" {
+ us = fmt.Sprintf("%s:%s", us, afterColonPath)
+ }
us = strings.Replace(us, "%7B", "{", -1)
us = strings.Replace(us, "%7D", "}", -1)
+ us = strings.Replace(us, "%2A", "*", -1)
return us
}
diff --git a/vendor/google.golang.org/api/internal/creds.go b/vendor/google.golang.org/api/internal/creds.go
index b546b63..c16b7b6 100644
--- a/vendor/google.golang.org/api/internal/creds.go
+++ b/vendor/google.golang.org/api/internal/creds.go
@@ -15,90 +15,28 @@
package internal
import (
- "encoding/json"
"fmt"
"io/ioutil"
- "time"
"golang.org/x/net/context"
- "golang.org/x/oauth2"
"golang.org/x/oauth2/google"
)
// Creds returns credential information obtained from DialSettings, or if none, then
// it returns default credential information.
func Creds(ctx context.Context, ds *DialSettings) (*google.DefaultCredentials, error) {
+ if ds.Credentials != nil {
+ return ds.Credentials, nil
+ }
if ds.CredentialsFile != "" {
- return credFileTokenSource(ctx, ds.CredentialsFile, ds.Scopes...)
+ data, err := ioutil.ReadFile(ds.CredentialsFile)
+ if err != nil {
+ return nil, fmt.Errorf("cannot read credentials file: %v", err)
+ }
+ return google.CredentialsFromJSON(ctx, data, ds.Scopes...)
}
if ds.TokenSource != nil {
return &google.DefaultCredentials{TokenSource: ds.TokenSource}, nil
}
return google.FindDefaultCredentials(ctx, ds.Scopes...)
}
-
-// credFileTokenSource reads a refresh token file or a service account and returns
-// a TokenSource constructed from the config.
-func credFileTokenSource(ctx context.Context, filename string, scope ...string) (*google.DefaultCredentials, error) {
- data, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("cannot read credentials file: %v", err)
- }
- // See if it is a refresh token credentials file first.
- ts, ok, err := refreshTokenTokenSource(ctx, data, scope...)
- if err != nil {
- return nil, err
- }
- if ok {
- return &google.DefaultCredentials{
- TokenSource: ts,
- JSON: data,
- }, nil
- }
-
- // If not, it should be a service account.
- cfg, err := google.JWTConfigFromJSON(data, scope...)
- if err != nil {
- return nil, fmt.Errorf("google.JWTConfigFromJSON: %v", err)
- }
- // jwt.Config does not expose the project ID, so re-unmarshal to get it.
- var pid struct {
- ProjectID string `json:"project_id"`
- }
- if err := json.Unmarshal(data, &pid); err != nil {
- return nil, err
- }
- return &google.DefaultCredentials{
- ProjectID: pid.ProjectID,
- TokenSource: cfg.TokenSource(ctx),
- JSON: data,
- }, nil
-}
-
-func refreshTokenTokenSource(ctx context.Context, data []byte, scope ...string) (oauth2.TokenSource, bool, error) {
- var c cred
- if err := json.Unmarshal(data, &c); err != nil {
- return nil, false, fmt.Errorf("cannot unmarshal credentials file: %v", err)
- }
- if c.ClientID == "" || c.ClientSecret == "" || c.RefreshToken == "" || c.Type != "authorized_user" {
- return nil, false, nil
- }
- cfg := &oauth2.Config{
- ClientID: c.ClientID,
- ClientSecret: c.ClientSecret,
- Endpoint: google.Endpoint,
- RedirectURL: "urn:ietf:wg:oauth:2.0:oob",
- Scopes: scope,
- }
- return cfg.TokenSource(ctx, &oauth2.Token{
- RefreshToken: c.RefreshToken,
- Expiry: time.Now(),
- }), true, nil
-}
-
-type cred struct {
- ClientID string `json:"client_id"`
- ClientSecret string `json:"client_secret"`
- RefreshToken string `json:"refresh_token"`
- Type string `json:"type"`
-}
diff --git a/vendor/google.golang.org/api/internal/settings.go b/vendor/google.golang.org/api/internal/settings.go
index 5147191..34dfa5a 100644
--- a/vendor/google.golang.org/api/internal/settings.go
+++ b/vendor/google.golang.org/api/internal/settings.go
@@ -16,9 +16,11 @@
package internal
import (
+ "errors"
"net/http"
"golang.org/x/oauth2"
+ "golang.org/x/oauth2/google"
"google.golang.org/grpc"
)
@@ -28,10 +30,33 @@ type DialSettings struct {
Endpoint string
Scopes []string
TokenSource oauth2.TokenSource
+ Credentials *google.DefaultCredentials
CredentialsFile string // if set, Token Source is ignored.
UserAgent string
APIKey string
HTTPClient *http.Client
GRPCDialOpts []grpc.DialOption
GRPCConn *grpc.ClientConn
+ NoAuth bool
+}
+
+// Validate reports an error if ds is invalid.
+func (ds *DialSettings) Validate() error {
+ hasCreds := ds.APIKey != "" || ds.TokenSource != nil || ds.CredentialsFile != "" || ds.Credentials != nil
+ if ds.NoAuth && hasCreds {
+ return errors.New("options.WithoutAuthentication is incompatible with any option that provides credentials")
+ }
+ // Credentials should not appear with other options.
+ // We currently allow TokenSource and CredentialsFile to coexist.
+ // TODO(jba): make TokenSource & CredentialsFile an error (breaking change).
+ if ds.Credentials != nil && (ds.APIKey != "" || ds.TokenSource != nil || ds.CredentialsFile != "") {
+ return errors.New("multiple credential options provided")
+ }
+ if ds.HTTPClient != nil && ds.GRPCConn != nil {
+ return errors.New("WithHTTPClient is incompatible with WithGRPCConn")
+ }
+ if ds.HTTPClient != nil && ds.GRPCDialOpts != nil {
+ return errors.New("WithHTTPClient is incompatible with gRPC dial options")
+ }
+ return nil
}
diff --git a/vendor/google.golang.org/api/iterator/iterator.go b/vendor/google.golang.org/api/iterator/iterator.go
index 0640c82..e34e520 100644
--- a/vendor/google.golang.org/api/iterator/iterator.go
+++ b/vendor/google.golang.org/api/iterator/iterator.go
@@ -67,7 +67,7 @@ type PageInfo struct {
// be silently truncated.
fetch func(pageSize int, pageToken string) (nextPageToken string, err error)
- // Function that clears the iterator's buffer, returning any currently buffered items.
+ // Function that returns the number of currently buffered items.
bufLen func() int
// Function that returns the buffer, after setting the buffer variable to nil.
diff --git a/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json b/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json
index 67a0378..18204dc 100644
--- a/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json
+++ b/vendor/google.golang.org/api/oauth2/v2/oauth2-api.json
@@ -1,294 +1,294 @@
{
- "kind": "discovery#restDescription",
- "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UI_PjeJG3puXfKEXm-20UHWIhYQ\"",
- "discoveryVersion": "v1",
- "id": "oauth2:v2",
- "name": "oauth2",
- "version": "v2",
- "revision": "20170807",
- "title": "Google OAuth2 API",
- "description": "Obtains end-user authorization grants for use with other Google APIs.",
- "ownerDomain": "google.com",
- "ownerName": "Google",
- "icons": {
- "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
- "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
- },
- "documentationLink": "https://developers.google.com/accounts/docs/OAuth2",
- "protocol": "rest",
- "baseUrl": "https://www.googleapis.com/",
- "basePath": "/",
- "rootUrl": "https://www.googleapis.com/",
- "servicePath": "",
- "batchPath": "batch/oauth2/v2",
- "parameters": {
- "alt": {
- "type": "string",
- "description": "Data format for the response.",
- "default": "json",
- "enum": [
- "json"
- ],
- "enumDescriptions": [
- "Responses with Content-Type of application/json"
- ],
- "location": "query"
- },
- "fields": {
- "type": "string",
- "description": "Selector specifying which fields to include in a partial response.",
- "location": "query"
- },
- "key": {
- "type": "string",
- "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
- "location": "query"
- },
- "oauth_token": {
- "type": "string",
- "description": "OAuth 2.0 token for the current user.",
- "location": "query"
- },
- "prettyPrint": {
- "type": "boolean",
- "description": "Returns response with indentations and line breaks.",
- "default": "true",
- "location": "query"
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/plus.login": {
+ "description": "Know the list of people in your circles, your age range, and language"
+ },
+ "https://www.googleapis.com/auth/plus.me": {
+ "description": "Know who you are on Google"
+ },
+ "https://www.googleapis.com/auth/userinfo.email": {
+ "description": "View your email address"
+ },
+ "https://www.googleapis.com/auth/userinfo.profile": {
+ "description": "View your basic profile info"
+ }
+ }
+ }
},
- "quotaUser": {
- "type": "string",
- "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
- "location": "query"
+ "basePath": "/",
+ "baseUrl": "https://www.googleapis.com/",
+ "batchPath": "batch/oauth2/v2",
+ "description": "Obtains end-user authorization grants for use with other Google APIs.",
+ "discoveryVersion": "v1",
+ "documentationLink": "https://developers.google.com/accounts/docs/OAuth2",
+ "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/aQYw8bQfY3xIJbtzdw5QvIFJYtI\"",
+ "icons": {
+ "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
+ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
},
- "userIp": {
- "type": "string",
- "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
- "location": "query"
- }
- },
- "auth": {
- "oauth2": {
- "scopes": {
- "https://www.googleapis.com/auth/plus.login": {
- "description": "Know the list of people in your circles, your age range, and language"
- },
- "https://www.googleapis.com/auth/plus.me": {
- "description": "Know who you are on Google"
- },
- "https://www.googleapis.com/auth/userinfo.email": {
- "description": "View your email address"
+ "id": "oauth2:v2",
+ "kind": "discovery#restDescription",
+ "methods": {
+ "getCertForOpenIdConnect": {
+ "httpMethod": "GET",
+ "id": "oauth2.getCertForOpenIdConnect",
+ "path": "oauth2/v2/certs",
+ "response": {
+ "$ref": "Jwk"
+ }
},
- "https://www.googleapis.com/auth/userinfo.profile": {
- "description": "View your basic profile info"
- }
- }
- }
- },
- "schemas": {
- "Jwk": {
- "id": "Jwk",
- "type": "object",
- "properties": {
- "keys": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "alg": {
- "type": "string",
- "default": "RS256"
- },
- "e": {
- "type": "string"
- },
- "kid": {
- "type": "string"
- },
- "kty": {
- "type": "string",
- "default": "RSA"
- },
- "n": {
- "type": "string"
- },
- "use": {
- "type": "string",
- "default": "sig"
- }
+ "tokeninfo": {
+ "httpMethod": "POST",
+ "id": "oauth2.tokeninfo",
+ "parameters": {
+ "access_token": {
+ "location": "query",
+ "type": "string"
+ },
+ "id_token": {
+ "location": "query",
+ "type": "string"
+ },
+ "token_handle": {
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "oauth2/v2/tokeninfo",
+ "response": {
+ "$ref": "Tokeninfo"
}
- }
}
- }
},
- "Tokeninfo": {
- "id": "Tokeninfo",
- "type": "object",
- "properties": {
- "access_type": {
- "type": "string",
- "description": "The access type granted with this token. It can be offline or online."
- },
- "audience": {
- "type": "string",
- "description": "Who is the intended audience for this token. In general the same as issued_to."
- },
- "email": {
- "type": "string",
- "description": "The email address of the user. Present only if the email scope is present in the request."
+ "name": "oauth2",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "parameters": {
+ "alt": {
+ "default": "json",
+ "description": "Data format for the response.",
+ "enum": [
+ "json"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json"
+ ],
+ "location": "query",
+ "type": "string"
},
- "expires_in": {
- "type": "integer",
- "description": "The expiry time of the token, as number of seconds left until expiry.",
- "format": "int32"
+ "fields": {
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query",
+ "type": "string"
},
- "issued_to": {
- "type": "string",
- "description": "To whom was the token issued to. In general the same as audience."
+ "key": {
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query",
+ "type": "string"
},
- "scope": {
- "type": "string",
- "description": "The space separated list of scopes granted to this token."
+ "oauth_token": {
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query",
+ "type": "string"
},
- "token_handle": {
- "type": "string",
- "description": "The token handle associated with this token."
+ "prettyPrint": {
+ "default": "true",
+ "description": "Returns response with indentations and line breaks.",
+ "location": "query",
+ "type": "boolean"
},
- "user_id": {
- "type": "string",
- "description": "The obfuscated user id."
+ "quotaUser": {
+ "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
+ "location": "query",
+ "type": "string"
},
- "verified_email": {
- "type": "boolean",
- "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request."
+ "userIp": {
+ "description": "Deprecated. Please use quotaUser instead.",
+ "location": "query",
+ "type": "string"
}
- }
},
- "Userinfoplus": {
- "id": "Userinfoplus",
- "type": "object",
- "properties": {
- "email": {
- "type": "string",
- "description": "The user's email address."
- },
- "family_name": {
- "type": "string",
- "description": "The user's last name."
- },
- "gender": {
- "type": "string",
- "description": "The user's gender."
- },
- "given_name": {
- "type": "string",
- "description": "The user's first name."
- },
- "hd": {
- "type": "string",
- "description": "The hosted domain e.g. example.com if the user is Google apps user."
- },
- "id": {
- "type": "string",
- "description": "The obfuscated ID of the user."
- },
- "link": {
- "type": "string",
- "description": "URL of the profile page."
- },
- "locale": {
- "type": "string",
- "description": "The user's preferred locale."
- },
- "name": {
- "type": "string",
- "description": "The user's full name."
- },
- "picture": {
- "type": "string",
- "description": "URL of the user's picture image."
- },
- "verified_email": {
- "type": "boolean",
- "description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.",
- "default": "true"
+ "protocol": "rest",
+ "resources": {
+ "userinfo": {
+ "methods": {
+ "get": {
+ "httpMethod": "GET",
+ "id": "oauth2.userinfo.get",
+ "path": "oauth2/v2/userinfo",
+ "response": {
+ "$ref": "Userinfoplus"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/plus.login",
+ "https://www.googleapis.com/auth/plus.me",
+ "https://www.googleapis.com/auth/userinfo.email",
+ "https://www.googleapis.com/auth/userinfo.profile"
+ ]
+ }
+ },
+ "resources": {
+ "v2": {
+ "resources": {
+ "me": {
+ "methods": {
+ "get": {
+ "httpMethod": "GET",
+ "id": "oauth2.userinfo.v2.me.get",
+ "path": "userinfo/v2/me",
+ "response": {
+ "$ref": "Userinfoplus"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/plus.login",
+ "https://www.googleapis.com/auth/plus.me",
+ "https://www.googleapis.com/auth/userinfo.email",
+ "https://www.googleapis.com/auth/userinfo.profile"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
}
- }
- }
- },
- "methods": {
- "getCertForOpenIdConnect": {
- "id": "oauth2.getCertForOpenIdConnect",
- "path": "oauth2/v2/certs",
- "httpMethod": "GET",
- "response": {
- "$ref": "Jwk"
- }
},
- "tokeninfo": {
- "id": "oauth2.tokeninfo",
- "path": "oauth2/v2/tokeninfo",
- "httpMethod": "POST",
- "parameters": {
- "access_token": {
- "type": "string",
- "location": "query"
+ "revision": "20180208",
+ "rootUrl": "https://www.googleapis.com/",
+ "schemas": {
+ "Jwk": {
+ "id": "Jwk",
+ "properties": {
+ "keys": {
+ "items": {
+ "properties": {
+ "alg": {
+ "default": "RS256",
+ "type": "string"
+ },
+ "e": {
+ "type": "string"
+ },
+ "kid": {
+ "type": "string"
+ },
+ "kty": {
+ "default": "RSA",
+ "type": "string"
+ },
+ "n": {
+ "type": "string"
+ },
+ "use": {
+ "default": "sig",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
},
- "id_token": {
- "type": "string",
- "location": "query"
+ "Tokeninfo": {
+ "id": "Tokeninfo",
+ "properties": {
+ "access_type": {
+ "description": "The access type granted with this token. It can be offline or online.",
+ "type": "string"
+ },
+ "audience": {
+ "description": "Who is the intended audience for this token. In general the same as issued_to.",
+ "type": "string"
+ },
+ "email": {
+ "description": "The email address of the user. Present only if the email scope is present in the request.",
+ "type": "string"
+ },
+ "expires_in": {
+ "description": "The expiry time of the token, as number of seconds left until expiry.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "issued_to": {
+ "description": "To whom was the token issued to. In general the same as audience.",
+ "type": "string"
+ },
+ "scope": {
+ "description": "The space separated list of scopes granted to this token.",
+ "type": "string"
+ },
+ "token_handle": {
+ "description": "The token handle associated with this token.",
+ "type": "string"
+ },
+ "user_id": {
+ "description": "The obfuscated user id.",
+ "type": "string"
+ },
+ "verified_email": {
+ "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
},
- "token_handle": {
- "type": "string",
- "location": "query"
- }
- },
- "response": {
- "$ref": "Tokeninfo"
- }
- }
- },
- "resources": {
- "userinfo": {
- "methods": {
- "get": {
- "id": "oauth2.userinfo.get",
- "path": "oauth2/v2/userinfo",
- "httpMethod": "GET",
- "response": {
- "$ref": "Userinfoplus"
- },
- "scopes": [
- "https://www.googleapis.com/auth/plus.login",
- "https://www.googleapis.com/auth/plus.me",
- "https://www.googleapis.com/auth/userinfo.email",
- "https://www.googleapis.com/auth/userinfo.profile"
- ]
- }
- },
- "resources": {
- "v2": {
- "resources": {
- "me": {
- "methods": {
- "get": {
- "id": "oauth2.userinfo.v2.me.get",
- "path": "userinfo/v2/me",
- "httpMethod": "GET",
- "response": {
- "$ref": "Userinfoplus"
- },
- "scopes": [
- "https://www.googleapis.com/auth/plus.login",
- "https://www.googleapis.com/auth/plus.me",
- "https://www.googleapis.com/auth/userinfo.email",
- "https://www.googleapis.com/auth/userinfo.profile"
- ]
+ "Userinfoplus": {
+ "id": "Userinfoplus",
+ "properties": {
+ "email": {
+ "description": "The user's email address.",
+ "type": "string"
+ },
+ "family_name": {
+ "description": "The user's last name.",
+ "type": "string"
+ },
+ "gender": {
+ "description": "The user's gender.",
+ "type": "string"
+ },
+ "given_name": {
+ "description": "The user's first name.",
+ "type": "string"
+ },
+ "hd": {
+ "description": "The hosted domain e.g. example.com if the user is Google apps user.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The obfuscated ID of the user.",
+ "type": "string"
+ },
+ "link": {
+ "description": "URL of the profile page.",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The user's preferred locale.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The user's full name.",
+ "type": "string"
+ },
+ "picture": {
+ "description": "URL of the user's picture image.",
+ "type": "string"
+ },
+ "verified_email": {
+ "default": "true",
+ "description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.",
+ "type": "boolean"
}
- }
- }
- }
+ },
+ "type": "object"
}
- }
- }
- }
-}
+ },
+ "servicePath": "",
+ "title": "Google OAuth2 API",
+ "version": "v2"
+} \ No newline at end of file
diff --git a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
index 7440468..68c54ee 100644
--- a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
+++ b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
@@ -142,8 +142,8 @@ type Jwk struct {
}
func (s *Jwk) MarshalJSON() ([]byte, error) {
- type noMethod Jwk
- raw := noMethod(*s)
+ type NoMethod Jwk
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -178,8 +178,8 @@ type JwkKeys struct {
}
func (s *JwkKeys) MarshalJSON() ([]byte, error) {
- type noMethod JwkKeys
- raw := noMethod(*s)
+ type NoMethod JwkKeys
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -239,8 +239,8 @@ type Tokeninfo struct {
}
func (s *Tokeninfo) MarshalJSON() ([]byte, error) {
- type noMethod Tokeninfo
- raw := noMethod(*s)
+ type NoMethod Tokeninfo
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -305,8 +305,8 @@ type Userinfoplus struct {
}
func (s *Userinfoplus) MarshalJSON() ([]byte, error) {
- type noMethod Userinfoplus
- raw := noMethod(*s)
+ type NoMethod Userinfoplus
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -412,7 +412,7 @@ func (c *GetCertForOpenIdConnectCall) Do(opts ...googleapi.CallOption) (*Jwk, er
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -533,7 +533,7 @@ func (c *TokeninfoCall) Do(opts ...googleapi.CallOption) (*Tokeninfo, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -664,7 +664,7 @@ func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -787,7 +787,7 @@ func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, e
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
diff --git a/vendor/google.golang.org/api/option/credentials_go19.go b/vendor/google.golang.org/api/option/credentials_go19.go
new file mode 100644
index 0000000..c08c114
--- /dev/null
+++ b/vendor/google.golang.org/api/option/credentials_go19.go
@@ -0,0 +1,32 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.9
+
+package option
+
+import (
+ "golang.org/x/oauth2/google"
+ "google.golang.org/api/internal"
+)
+
+type withCreds google.Credentials
+
+func (w *withCreds) Apply(o *internal.DialSettings) {
+ o.Credentials = (*google.Credentials)(w)
+}
+
+func WithCredentials(creds *google.Credentials) ClientOption {
+ return (*withCreds)(creds)
+}
diff --git a/vendor/google.golang.org/api/option/credentials_notgo19.go b/vendor/google.golang.org/api/option/credentials_notgo19.go
new file mode 100644
index 0000000..90d2290
--- /dev/null
+++ b/vendor/google.golang.org/api/option/credentials_notgo19.go
@@ -0,0 +1,32 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.9
+
+package option
+
+import (
+ "golang.org/x/oauth2/google"
+ "google.golang.org/api/internal"
+)
+
+type withCreds google.DefaultCredentials
+
+func (w *withCreds) Apply(o *internal.DialSettings) {
+ o.Credentials = (*google.DefaultCredentials)(w)
+}
+
+func WithCredentials(creds *google.DefaultCredentials) ClientOption {
+ return (*withCreds)(creds)
+}
diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go
index e3080e3..ffbee32 100644
--- a/vendor/google.golang.org/api/option/option.go
+++ b/vendor/google.golang.org/api/option/option.go
@@ -160,3 +160,16 @@ func WithAPIKey(apiKey string) ClientOption {
type withAPIKey string
func (w withAPIKey) Apply(o *internal.DialSettings) { o.APIKey = string(w) }
+
+// WithoutAuthentication returns a ClientOption that specifies that no
+// authentication should be used. It is suitable only for testing and for
+// accessing public resources, like public Google Cloud Storage buckets.
+// It is an error to provide both WithoutAuthentication and any of WithAPIKey,
+// WithTokenSource, WithCredentialsFile or WithServiceAccountFile.
+func WithoutAuthentication() ClientOption {
+ return withoutAuthentication{}
+}
+
+type withoutAuthentication struct{}
+
+func (w withoutAuthentication) Apply(o *internal.DialSettings) { o.NoAuth = true }
diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json
index e30379b..7837a66 100644
--- a/vendor/google.golang.org/api/storage/v1/storage-api.json
+++ b/vendor/google.golang.org/api/storage/v1/storage-api.json
@@ -1,3711 +1,3794 @@
{
- "kind": "discovery#restDescription",
- "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/wG6rmEvDnTlddzJg86OD2al2nik\"",
- "discoveryVersion": "v1",
- "id": "storage:v1",
- "name": "storage",
- "version": "v1",
- "revision": "20171004",
- "title": "Cloud Storage JSON API",
- "description": "Stores and retrieves potentially large, immutable data objects.",
- "ownerDomain": "google.com",
- "ownerName": "Google",
- "icons": {
- "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
- "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
- },
- "documentationLink": "https://developers.google.com/storage/docs/json_api/",
- "labels": [
- "labs"
- ],
- "protocol": "rest",
- "baseUrl": "https://www.googleapis.com/storage/v1/",
- "basePath": "/storage/v1/",
- "rootUrl": "https://www.googleapis.com/",
- "servicePath": "storage/v1/",
- "batchPath": "batch",
- "parameters": {
- "alt": {
- "type": "string",
- "description": "Data format for the response.",
- "default": "json",
- "enum": [
- "json"
- ],
- "enumDescriptions": [
- "Responses with Content-Type of application/json"
- ],
- "location": "query"
- },
- "fields": {
- "type": "string",
- "description": "Selector specifying which fields to include in a partial response.",
- "location": "query"
- },
- "key": {
- "type": "string",
- "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
- "location": "query"
- },
- "oauth_token": {
- "type": "string",
- "description": "OAuth 2.0 token for the current user.",
- "location": "query"
- },
- "prettyPrint": {
- "type": "boolean",
- "description": "Returns response with indentations and line breaks.",
- "default": "true",
- "location": "query"
- },
- "quotaUser": {
- "type": "string",
- "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
- "location": "query"
- },
- "userIp": {
- "type": "string",
- "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
- "location": "query"
- }
- },
- "auth": {
- "oauth2": {
- "scopes": {
- "https://www.googleapis.com/auth/cloud-platform": {
- "description": "View and manage your data across Google Cloud Platform services"
- },
- "https://www.googleapis.com/auth/cloud-platform.read-only": {
- "description": "View your data across Google Cloud Platform services"
- },
- "https://www.googleapis.com/auth/devstorage.full_control": {
- "description": "Manage your data and permissions in Google Cloud Storage"
- },
- "https://www.googleapis.com/auth/devstorage.read_only": {
- "description": "View your data in Google Cloud Storage"
- },
- "https://www.googleapis.com/auth/devstorage.read_write": {
- "description": "Manage your data in Google Cloud Storage"
- }
- }
- }
- },
- "schemas": {
- "Bucket": {
- "id": "Bucket",
- "type": "object",
- "description": "A bucket.",
- "properties": {
- "acl": {
- "type": "array",
- "description": "Access controls on the bucket.",
- "items": {
- "$ref": "BucketAccessControl"
- },
- "annotations": {
- "required": [
- "storage.buckets.update"
- ]
- }
- },
- "billing": {
- "type": "object",
- "description": "The bucket's billing configuration.",
- "properties": {
- "requesterPays": {
- "type": "boolean",
- "description": "When set to true, bucket is requester pays."
- }
- }
- },
- "cors": {
- "type": "array",
- "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.",
- "items": {
- "type": "object",
- "properties": {
- "maxAgeSeconds": {
- "type": "integer",
- "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.",
- "format": "int32"
- },
- "method": {
- "type": "array",
- "description": "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\".",
- "items": {
- "type": "string"
- }
- },
- "origin": {
- "type": "array",
- "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".",
- "items": {
- "type": "string"
- }
- },
- "responseHeader": {
- "type": "array",
- "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "defaultObjectAcl": {
- "type": "array",
- "description": "Default access controls to apply to new objects when no ACL is provided.",
- "items": {
- "$ref": "ObjectAccessControl"
- }
- },
- "encryption": {
- "type": "object",
- "description": "Encryption configuration used by default for newly inserted objects, when no encryption config is specified.",
- "properties": {
- "defaultKmsKeyName": {
- "type": "string"
- }
- }
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the bucket."
- },
- "id": {
- "type": "string",
- "description": "The ID of the bucket. For buckets, the id and name properities are the same."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For buckets, this is always storage#bucket.",
- "default": "storage#bucket"
- },
- "labels": {
- "type": "object",
- "description": "User-provided labels, in key/value pairs.",
- "additionalProperties": {
- "type": "string",
- "description": "An individual label entry."
- }
- },
- "lifecycle": {
- "type": "object",
- "description": "The bucket's lifecycle configuration. See lifecycle management for more information.",
- "properties": {
- "rule": {
- "type": "array",
- "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.",
- "items": {
- "type": "object",
- "properties": {
- "action": {
- "type": "object",
- "description": "The action to take.",
- "properties": {
- "storageClass": {
- "type": "string",
- "description": "Target storage class. Required iff the type of the action is SetStorageClass."
- },
- "type": {
- "type": "string",
- "description": "Type of the action. Currently, only Delete and SetStorageClass are supported."
- }
- }
- },
- "condition": {
- "type": "object",
- "description": "The condition(s) under which the action will be taken.",
- "properties": {
- "age": {
- "type": "integer",
- "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.",
- "format": "int32"
- },
- "createdBefore": {
- "type": "string",
- "description": "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.",
- "format": "date"
- },
- "isLive": {
- "type": "boolean",
- "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects."
- },
- "matchesStorageClass": {
- "type": "array",
- "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.",
- "items": {
- "type": "string"
- }
- },
- "numNewerVersions": {
- "type": "integer",
- "description": "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.",
- "format": "int32"
- }
- }
- }
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/cloud-platform": {
+ "description": "View and manage your data across Google Cloud Platform services"
+ },
+ "https://www.googleapis.com/auth/cloud-platform.read-only": {
+ "description": "View your data across Google Cloud Platform services"
+ },
+ "https://www.googleapis.com/auth/devstorage.full_control": {
+ "description": "Manage your data and permissions in Google Cloud Storage"
+ },
+ "https://www.googleapis.com/auth/devstorage.read_only": {
+ "description": "View your data in Google Cloud Storage"
+ },
+ "https://www.googleapis.com/auth/devstorage.read_write": {
+ "description": "Manage your data in Google Cloud Storage"
}
- }
}
- }
- },
- "location": {
- "type": "string",
- "description": "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."
- },
- "logging": {
- "type": "object",
- "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.",
- "properties": {
- "logBucket": {
- "type": "string",
- "description": "The destination bucket where the current bucket's logs should be placed."
- },
- "logObjectPrefix": {
- "type": "string",
- "description": "A prefix for log object names."
- }
- }
- },
- "metageneration": {
- "type": "string",
- "description": "The metadata generation of this bucket.",
- "format": "int64"
- },
- "name": {
- "type": "string",
- "description": "The name of the bucket.",
- "annotations": {
- "required": [
- "storage.buckets.insert"
- ]
- }
- },
- "owner": {
- "type": "object",
- "description": "The owner of the bucket. This is always the project team's owner group.",
- "properties": {
- "entity": {
- "type": "string",
- "description": "The entity, in the form project-owner-projectId."
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity."
- }
- }
- },
- "projectNumber": {
- "type": "string",
- "description": "The project number of the project the bucket belongs to.",
- "format": "uint64"
- },
- "selfLink": {
- "type": "string",
- "description": "The URI of this bucket."
- },
- "storageClass": {
- "type": "string",
- "description": "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, 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."
- },
- "timeCreated": {
- "type": "string",
- "description": "The creation time of the bucket in RFC 3339 format.",
- "format": "date-time"
- },
- "updated": {
- "type": "string",
- "description": "The modification time of the bucket in RFC 3339 format.",
- "format": "date-time"
- },
- "versioning": {
- "type": "object",
- "description": "The bucket's versioning configuration.",
- "properties": {
- "enabled": {
- "type": "boolean",
- "description": "While set to true, versioning is fully enabled for this bucket."
- }
- }
- },
- "website": {
- "type": "object",
- "description": "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.",
- "properties": {
- "mainPageSuffix": {
- "type": "string",
- "description": "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."
- },
- "notFoundPage": {
- "type": "string",
- "description": "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."
- }
- }
}
- }
},
- "BucketAccessControl": {
- "id": "BucketAccessControl",
- "type": "object",
- "description": "An access-control entry.",
- "properties": {
- "bucket": {
- "type": "string",
- "description": "The name of the bucket."
- },
- "domain": {
- "type": "string",
- "description": "The domain associated with the entity, if any."
- },
- "email": {
- "type": "string",
- "description": "The email address associated with the entity, if any."
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
- "annotations": {
- "required": [
- "storage.bucketAccessControls.insert"
- ]
- }
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity, if any."
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the access-control entry."
- },
- "id": {
- "type": "string",
- "description": "The ID of the access-control entry."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.",
- "default": "storage#bucketAccessControl"
- },
- "projectTeam": {
- "type": "object",
- "description": "The project team associated with the entity, if any.",
- "properties": {
- "projectNumber": {
- "type": "string",
- "description": "The project number."
- },
- "team": {
- "type": "string",
- "description": "The team."
- }
- }
- },
- "role": {
- "type": "string",
- "description": "The access permission for the entity.",
- "annotations": {
- "required": [
- "storage.bucketAccessControls.insert"
- ]
- }
- },
- "selfLink": {
- "type": "string",
- "description": "The link to this access-control entry."
- }
- }
+ "basePath": "/storage/v1/",
+ "baseUrl": "https://www.googleapis.com/storage/v1/",
+ "batchPath": "batch/storage/v1",
+ "description": "Stores and retrieves potentially large, immutable data objects.",
+ "discoveryVersion": "v1",
+ "documentationLink": "https://developers.google.com/storage/docs/json_api/",
+ "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/naWmFZqBR_Eg7icNmYvZKp3Vbjs\"",
+ "icons": {
+ "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
+ "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
},
- "BucketAccessControls": {
- "id": "BucketAccessControls",
- "type": "object",
- "description": "An access-control list.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "BucketAccessControl"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.",
- "default": "storage#bucketAccessControls"
- }
- }
- },
- "Buckets": {
- "id": "Buckets",
- "type": "object",
- "description": "A list of buckets.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Bucket"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.",
- "default": "storage#buckets"
- },
- "nextPageToken": {
- "type": "string",
- "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
- }
- }
- },
- "Channel": {
- "id": "Channel",
- "type": "object",
- "description": "An notification channel used to watch for resource changes.",
- "properties": {
- "address": {
- "type": "string",
- "description": "The address where notifications are delivered for this channel."
- },
- "expiration": {
- "type": "string",
- "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
- "format": "int64"
- },
- "id": {
- "type": "string",
- "description": "A UUID or similar unique string that identifies this channel."
- },
- "kind": {
- "type": "string",
- "description": "Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string \"api#channel\".",
- "default": "api#channel"
- },
- "params": {
- "type": "object",
- "description": "Additional parameters controlling delivery channel behavior. Optional.",
- "additionalProperties": {
- "type": "string",
- "description": "Declares a new parameter by name."
- }
- },
- "payload": {
- "type": "boolean",
- "description": "A Boolean value to indicate whether payload is wanted. Optional."
- },
- "resourceId": {
- "type": "string",
- "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions."
- },
- "resourceUri": {
- "type": "string",
- "description": "A version-specific identifier for the watched resource."
- },
- "token": {
- "type": "string",
- "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
- },
- "type": {
- "type": "string",
- "description": "The type of delivery mechanism used for this channel."
- }
- }
- },
- "ComposeRequest": {
- "id": "ComposeRequest",
- "type": "object",
- "description": "A Compose request.",
- "properties": {
- "destination": {
- "$ref": "Object",
- "description": "Properties of the resulting object."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#composeRequest"
- },
- "sourceObjects": {
- "type": "array",
- "description": "The list of source objects that will be concatenated into a single object.",
- "items": {
- "type": "object",
- "properties": {
- "generation": {
- "type": "string",
- "description": "The generation of this object to use as the source.",
- "format": "int64"
- },
- "name": {
- "type": "string",
- "description": "The source object's name. The source object's bucket is implicitly the destination bucket.",
- "annotations": {
- "required": [
- "storage.objects.compose"
- ]
- }
- },
- "objectPreconditions": {
- "type": "object",
- "description": "Conditions that must be met for this operation to execute.",
- "properties": {
- "ifGenerationMatch": {
- "type": "string",
- "description": "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.",
- "format": "int64"
- }
- }
- }
- }
- },
- "annotations": {
- "required": [
- "storage.objects.compose"
- ]
- }
- }
- }
- },
- "Notification": {
- "id": "Notification",
- "type": "object",
- "description": "A subscription to receive Google PubSub notifications.",
- "properties": {
- "custom_attributes": {
- "type": "object",
- "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.",
- "additionalProperties": {
+ "id": "storage:v1",
+ "kind": "discovery#restDescription",
+ "labels": [
+ "labs"
+ ],
+ "name": "storage",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "parameters": {
+ "alt": {
+ "default": "json",
+ "description": "Data format for the response.",
+ "enum": [
+ "json"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json"
+ ],
+ "location": "query",
"type": "string"
- }
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for this subscription notification."
},
- "event_types": {
- "type": "array",
- "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.",
- "items": {
+ "fields": {
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query",
"type": "string"
- }
- },
- "id": {
- "type": "string",
- "description": "The ID of the notification."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For notifications, this is always storage#notification.",
- "default": "storage#notification"
- },
- "object_name_prefix": {
- "type": "string",
- "description": "If present, only apply this notification configuration to object names that begin with this prefix."
- },
- "payload_format": {
- "type": "string",
- "description": "The desired content of the Payload.",
- "default": "JSON_API_V1"
- },
- "selfLink": {
- "type": "string",
- "description": "The canonical URL of this notification."
- },
- "topic": {
- "type": "string",
- "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'",
- "annotations": {
- "required": [
- "storage.notifications.insert"
- ]
- }
- }
- }
- },
- "Notifications": {
- "id": "Notifications",
- "type": "object",
- "description": "A list of notification subscriptions.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Notification"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.",
- "default": "storage#notifications"
- }
- }
- },
- "Object": {
- "id": "Object",
- "type": "object",
- "description": "An object.",
- "properties": {
- "acl": {
- "type": "array",
- "description": "Access controls on the object.",
- "items": {
- "$ref": "ObjectAccessControl"
- },
- "annotations": {
- "required": [
- "storage.objects.update"
- ]
- }
- },
- "bucket": {
- "type": "string",
- "description": "The name of the bucket containing this object."
- },
- "cacheControl": {
- "type": "string",
- "description": "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."
- },
- "componentCount": {
- "type": "integer",
- "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.",
- "format": "int32"
- },
- "contentDisposition": {
- "type": "string",
- "description": "Content-Disposition of the object data."
- },
- "contentEncoding": {
- "type": "string",
- "description": "Content-Encoding of the object data."
- },
- "contentLanguage": {
- "type": "string",
- "description": "Content-Language of the object data."
- },
- "contentType": {
- "type": "string",
- "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream."
- },
- "crc32c": {
- "type": "string",
- "description": "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."
- },
- "customerEncryption": {
- "type": "object",
- "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.",
- "properties": {
- "encryptionAlgorithm": {
- "type": "string",
- "description": "The encryption algorithm."
- },
- "keySha256": {
- "type": "string",
- "description": "SHA256 hash value of the encryption key."
- }
- }
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the object."
- },
- "generation": {
- "type": "string",
- "description": "The content generation of this object. Used for object versioning.",
- "format": "int64"
- },
- "id": {
- "type": "string",
- "description": "The ID of the object, including the bucket name, object name, and generation number."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For objects, this is always storage#object.",
- "default": "storage#object"
- },
- "kmsKeyName": {
- "type": "string",
- "description": "Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key."
- },
- "md5Hash": {
- "type": "string",
- "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices."
- },
- "mediaLink": {
- "type": "string",
- "description": "Media download link."
- },
- "metadata": {
- "type": "object",
- "description": "User-provided metadata, in key/value pairs.",
- "additionalProperties": {
- "type": "string",
- "description": "An individual metadata entry."
- }
},
- "metageneration": {
- "type": "string",
- "description": "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.",
- "format": "int64"
- },
- "name": {
- "type": "string",
- "description": "The name of the object. Required if not specified by URL parameter."
- },
- "owner": {
- "type": "object",
- "description": "The owner of the object. This will always be the uploader of the object.",
- "properties": {
- "entity": {
- "type": "string",
- "description": "The entity, in the form user-userId."
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity."
- }
- }
- },
- "selfLink": {
- "type": "string",
- "description": "The link to this object."
- },
- "size": {
- "type": "string",
- "description": "Content-Length of the data in bytes.",
- "format": "uint64"
- },
- "storageClass": {
- "type": "string",
- "description": "Storage class of the object."
- },
- "timeCreated": {
- "type": "string",
- "description": "The creation time of the object in RFC 3339 format.",
- "format": "date-time"
- },
- "timeDeleted": {
- "type": "string",
- "description": "The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.",
- "format": "date-time"
- },
- "timeStorageClassUpdated": {
- "type": "string",
- "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.",
- "format": "date-time"
- },
- "updated": {
- "type": "string",
- "description": "The modification time of the object metadata in RFC 3339 format.",
- "format": "date-time"
- }
- }
- },
- "ObjectAccessControl": {
- "id": "ObjectAccessControl",
- "type": "object",
- "description": "An access-control entry.",
- "properties": {
- "bucket": {
- "type": "string",
- "description": "The name of the bucket."
- },
- "domain": {
- "type": "string",
- "description": "The domain associated with the entity, if any."
- },
- "email": {
- "type": "string",
- "description": "The email address associated with the entity, if any."
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
- "annotations": {
- "required": [
- "storage.defaultObjectAccessControls.insert",
- "storage.objectAccessControls.insert"
- ]
- }
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity, if any."
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the access-control entry."
- },
- "generation": {
- "type": "string",
- "description": "The content generation of the object, if applied to an object.",
- "format": "int64"
- },
- "id": {
- "type": "string",
- "description": "The ID of the access-control entry."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.",
- "default": "storage#objectAccessControl"
- },
- "object": {
- "type": "string",
- "description": "The name of the object, if applied to an object."
- },
- "projectTeam": {
- "type": "object",
- "description": "The project team associated with the entity, if any.",
- "properties": {
- "projectNumber": {
- "type": "string",
- "description": "The project number."
- },
- "team": {
- "type": "string",
- "description": "The team."
- }
- }
- },
- "role": {
- "type": "string",
- "description": "The access permission for the entity.",
- "annotations": {
- "required": [
- "storage.defaultObjectAccessControls.insert",
- "storage.objectAccessControls.insert"
- ]
- }
- },
- "selfLink": {
- "type": "string",
- "description": "The link to this access-control entry."
- }
- }
- },
- "ObjectAccessControls": {
- "id": "ObjectAccessControls",
- "type": "object",
- "description": "An access-control list.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "ObjectAccessControl"
- }
+ "key": {
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query",
+ "type": "string"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.",
- "default": "storage#objectAccessControls"
- }
- }
- },
- "Objects": {
- "id": "Objects",
- "type": "object",
- "description": "A list of objects.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Object"
- }
+ "oauth_token": {
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query",
+ "type": "string"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of objects, this is always storage#objects.",
- "default": "storage#objects"
+ "prettyPrint": {
+ "default": "true",
+ "description": "Returns response with indentations and line breaks.",
+ "location": "query",
+ "type": "boolean"
},
- "nextPageToken": {
- "type": "string",
- "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
+ "quotaUser": {
+ "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
+ "location": "query",
+ "type": "string"
},
- "prefixes": {
- "type": "array",
- "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.",
- "items": {
+ "userIp": {
+ "description": "Deprecated. Please use quotaUser instead.",
+ "location": "query",
"type": "string"
- }
}
- }
},
- "Policy": {
- "id": "Policy",
- "type": "object",
- "description": "A bucket/object IAM policy.",
- "properties": {
- "bindings": {
- "type": "array",
- "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.",
- "items": {
- "type": "object",
- "properties": {
- "condition": {
- "type": "any"
- },
- "members": {
- "type": "array",
- "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project",
- "items": {
- "type": "string"
+ "protocol": "rest",
+ "resources": {
+ "bucketAccessControls": {
+ "methods": {
+ "delete": {
+ "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"
+ ]
},
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
- }
- },
- "role": {
- "type": "string",
- "description": "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.\nThe new IAM roles are: \n- roles/storage.admin — Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator — Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- 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.",
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
+ "get": {
+ "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"
+ ]
+ },
+ "insert": {
+ "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"
+ ]
+ },
+ "list": {
+ "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"
+ ]
+ },
+ "patch": {
+ "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"
+ ]
+ },
+ "update": {
+ "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"
+ ]
}
- }
- }
- },
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
- }
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the policy.",
- "format": "byte"
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.",
- "default": "storage#policy"
- },
- "resourceId": {
- "type": "string",
- "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. 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."
- }
- }
- },
- "RewriteResponse": {
- "id": "RewriteResponse",
- "type": "object",
- "description": "A rewrite response.",
- "properties": {
- "done": {
- "type": "boolean",
- "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#rewriteResponse"
- },
- "objectSize": {
- "type": "string",
- "description": "The total size of the object being copied in bytes. This property is always present in the response.",
- "format": "int64"
- },
- "resource": {
- "$ref": "Object",
- "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes."
- },
- "rewriteToken": {
- "type": "string",
- "description": "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."
- },
- "totalBytesRewritten": {
- "type": "string",
- "description": "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.",
- "format": "int64"
- }
- }
- },
- "ServiceAccount": {
- "id": "ServiceAccount",
- "type": "object",
- "description": "A subscription to receive Google PubSub notifications.",
- "properties": {
- "email_address": {
- "type": "string",
- "description": "The ID of the notification."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For notifications, this is always storage#notification.",
- "default": "storage#serviceAccount"
- }
- }
- },
- "TestIamPermissionsResponse": {
- "id": "TestIamPermissionsResponse",
- "type": "object",
- "description": "A storage.(buckets|objects).testIamPermissions response.",
- "properties": {
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#testIamPermissionsResponse"
- },
- "permissions": {
- "type": "array",
- "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "resources": {
- "bucketAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.bucketAccessControls.delete",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "get": {
- "id": "storage.bucketAccessControls.get",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "response": {
- "$ref": "BucketAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "insert": {
- "id": "storage.bucketAccessControls.insert",
- "path": "b/{bucket}/acl",
- "httpMethod": "POST",
- "description": "Creates a new ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "BucketAccessControl"
- },
- "response": {
- "$ref": "BucketAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "list": {
- "id": "storage.bucketAccessControls.list",
- "path": "b/{bucket}/acl",
- "httpMethod": "GET",
- "description": "Retrieves ACL entries on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "BucketAccessControls"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "patch": {
- "id": "storage.bucketAccessControls.patch",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "PATCH",
- "description": "Updates an ACL entry on the specified bucket. This method supports patch semantics.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
}
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "BucketAccessControl"
- },
- "response": {
- "$ref": "BucketAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
},
- "update": {
- "id": "storage.bucketAccessControls.update",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates an ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "BucketAccessControl"
- },
- "response": {
- "$ref": "BucketAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "buckets": {
- "methods": {
- "delete": {
- "id": "storage.buckets.delete",
- "path": "b/{bucket}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes an empty bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "If set, only deletes the bucket if its metageneration matches this value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "If set, only deletes the bucket if its metageneration does not match this value.",
- "format": "int64",
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "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"
- ]
- },
- "get": {
- "id": "storage.buckets.get",
- "path": "b/{bucket}",
- "httpMethod": "GET",
- "description": "Returns metadata for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "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"
- ]
- },
- "getIamPolicy": {
- "id": "storage.buckets.getIamPolicy",
- "path": "b/{bucket}/iam",
- "httpMethod": "GET",
- "description": "Returns an IAM policy for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "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"
- ]
- },
- "insert": {
- "id": "storage.buckets.insert",
- "path": "b",
- "httpMethod": "POST",
- "description": "Creates a new bucket.",
- "parameters": {
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "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"
- },
- "project": {
- "type": "string",
- "description": "A valid API project identifier.",
- "required": true,
- "location": "query"
- },
- "projection": {
- "type": "string",
- "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"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request",
- "location": "query"
- }
- },
- "parameterOrder": [
- "project"
- ],
- "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"
- ]
- },
- "list": {
- "id": "storage.buckets.list",
- "path": "b",
- "httpMethod": "GET",
- "description": "Retrieves a list of buckets for a given project.",
- "parameters": {
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to buckets whose names begin with this prefix.",
- "location": "query"
- },
- "project": {
- "type": "string",
- "description": "A valid API project identifier.",
- "required": true,
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "project"
- ],
- "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"
- ]
- },
- "patch": {
- "id": "storage.buckets.patch",
- "path": "b/{bucket}",
- "httpMethod": "PATCH",
- "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "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"
- },
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Bucket"
- },
- "response": {
- "$ref": "Bucket"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "setIamPolicy": {
- "id": "storage.buckets.setIamPolicy",
- "path": "b/{bucket}/iam",
- "httpMethod": "PUT",
- "description": "Updates an IAM policy for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "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"
- ]
- },
- "testIamPermissions": {
- "id": "storage.buckets.testIamPermissions",
- "path": "b/{bucket}/iam/testPermissions",
- "httpMethod": "GET",
- "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "permissions": {
- "type": "string",
- "description": "Permissions to test.",
- "required": true,
- "repeated": true,
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "permissions"
- ],
- "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"
- ]
- },
- "update": {
- "id": "storage.buckets.update",
- "path": "b/{bucket}",
- "httpMethod": "PUT",
- "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "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"
- },
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Bucket"
- },
- "response": {
- "$ref": "Bucket"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "channels": {
- "methods": {
- "stop": {
- "id": "storage.channels.stop",
- "path": "channels/stop",
- "httpMethod": "POST",
- "description": "Stop watching resources through this channel",
- "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"
- ]
- }
- }
- },
- "defaultObjectAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.defaultObjectAccessControls.delete",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "get": {
- "id": "storage.defaultObjectAccessControls.get",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the default object ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "insert": {
- "id": "storage.defaultObjectAccessControls.insert",
- "path": "b/{bucket}/defaultObjectAcl",
- "httpMethod": "POST",
- "description": "Creates a new default object ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "buckets": {
+ "methods": {
+ "delete": {
+ "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"
+ ]
+ },
+ "get": {
+ "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"
+ ]
+ },
+ "getIamPolicy": {
+ "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"
+ },
+ "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/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"
+ ]
+ },
+ "insert": {
+ "description": "Creates a new bucket.",
+ "httpMethod": "POST",
+ "id": "storage.buckets.insert",
+ "parameterOrder": [
+ "project"
+ ],
+ "parameters": {
+ "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"
+ ]
+ },
+ "list": {
+ "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"
+ ]
+ },
+ "lockRetentionPolicy": {
+ "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"
+ ]
+ },
+ "patch": {
+ "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.",
+ "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"
+ ]
+ },
+ "setIamPolicy": {
+ "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",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "testIamPermissions": {
+ "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"
+ ]
+ },
+ "update": {
+ "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"
+ ]
+ }
}
- },
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
},
- "list": {
- "id": "storage.defaultObjectAccessControls.list",
- "path": "b/{bucket}/defaultObjectAcl",
- "httpMethod": "GET",
- "description": "Retrieves default object ACL entries on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "channels": {
+ "methods": {
+ "stop": {
+ "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"
+ ]
+ }
}
- },
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "ObjectAccessControls"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
},
- "patch": {
- "id": "storage.defaultObjectAccessControls.patch",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "PATCH",
- "description": "Updates a default object ACL entry on the specified bucket. This method supports patch semantics.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "defaultObjectAccessControls": {
+ "methods": {
+ "delete": {
+ "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"
+ ]
+ },
+ "get": {
+ "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"
+ ]
+ },
+ "insert": {
+ "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"
+ ]
+ },
+ "list": {
+ "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"
+ ]
+ },
+ "patch": {
+ "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"
+ ]
+ },
+ "update": {
+ "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"
+ ]
+ }
}
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
},
- "update": {
- "id": "storage.defaultObjectAccessControls.update",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates a default object ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "notifications": {
- "methods": {
- "delete": {
- "id": "storage.notifications.delete",
- "path": "b/{bucket}/notificationConfigs/{notification}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes a notification subscription.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
- },
- "notification": {
- "type": "string",
- "description": "ID of the notification to delete.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "notifications": {
+ "methods": {
+ "delete": {
+ "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"
+ ]
+ },
+ "get": {
+ "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"
+ ]
+ },
+ "insert": {
+ "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"
+ ]
+ },
+ "list": {
+ "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"
+ ]
+ }
}
- },
- "parameterOrder": [
- "bucket",
- "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"
- ]
},
- "get": {
- "id": "storage.notifications.get",
- "path": "b/{bucket}/notificationConfigs/{notification}",
- "httpMethod": "GET",
- "description": "View a notification configuration.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
- },
- "notification": {
- "type": "string",
- "description": "Notification ID",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "objectAccessControls": {
+ "methods": {
+ "delete": {
+ "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.",
+ "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"
+ ]
+ },
+ "get": {
+ "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.",
+ "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"
+ ]
+ },
+ "insert": {
+ "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.",
+ "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"
+ ]
+ },
+ "list": {
+ "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.",
+ "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"
+ ]
+ },
+ "patch": {
+ "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.",
+ "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"
+ ]
+ },
+ "update": {
+ "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.",
+ "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"
+ ]
+ }
}
- },
- "parameterOrder": [
- "bucket",
- "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"
- ]
},
- "insert": {
- "id": "storage.notifications.insert",
- "path": "b/{bucket}/notificationConfigs",
- "httpMethod": "POST",
- "description": "Creates a notification subscription for a given bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "objects": {
+ "methods": {
+ "compose": {
+ "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 in which to store the new object.",
+ "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.",
+ "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"
+ ]
+ },
+ "copy": {
+ "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.",
+ "location": "path",
+ "required": true,
+ "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.",
+ "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"
+ ]
+ },
+ "delete": {
+ "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.",
+ "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"
+ ]
+ },
+ "get": {
+ "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.",
+ "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"
+ },
+ "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
+ },
+ "getIamPolicy": {
+ "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.",
+ "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"
+ ]
+ },
+ "insert": {
+ "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. Limited availability; usable only by enabled projects.",
+ "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.",
+ "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
+ },
+ "list": {
+ "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"
+ },
+ "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"
+ },
+ "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
+ },
+ "patch": {
+ "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.",
+ "location": "path",
+ "required": true,
+ "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 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"
+ ]
+ },
+ "rewrite": {
+ "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.",
+ "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.",
+ "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"
+ ]
+ },
+ "setIamPolicy": {
+ "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.",
+ "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"
+ ]
+ },
+ "testIamPermissions": {
+ "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.",
+ "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"
+ ]
+ },
+ "update": {
+ "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.",
+ "location": "path",
+ "required": true,
+ "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 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"
+ ]
+ },
+ "watchAll": {
+ "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"
+ },
+ "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"
+ },
+ "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
+ }
}
- },
- "parameterOrder": [
- "bucket"
- ],
- "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"
- ]
},
- "list": {
- "id": "storage.notifications.list",
- "path": "b/{bucket}/notificationConfigs",
- "httpMethod": "GET",
- "description": "Retrieves a list of notification subscriptions for a given bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a Google Cloud Storage bucket.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "projects": {
+ "resources": {
+ "serviceAccount": {
+ "methods": {
+ "get": {
+ "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"
+ ]
+ }
+ }
+ }
}
- },
- "parameterOrder": [
- "bucket"
- ],
- "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"
- ]
}
- }
},
- "objectAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.objectAccessControls.delete",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the ACL entry for the specified entity on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "get": {
- "id": "storage.objectAccessControls.get",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the ACL entry for the specified entity on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "revision": "20180518",
+ "rootUrl": "https://www.googleapis.com/",
+ "schemas": {
+ "Bucket": {
+ "description": "A bucket.",
+ "id": "Bucket",
+ "properties": {
+ "acl": {
+ "annotations": {
+ "required": [
+ "storage.buckets.update"
+ ]
+ },
+ "description": "Access controls on the bucket.",
+ "items": {
+ "$ref": "BucketAccessControl"
+ },
+ "type": "array"
+ },
+ "billing": {
+ "description": "The bucket's billing configuration.",
+ "properties": {
+ "requesterPays": {
+ "description": "When set to true, Requester Pays is enabled for this bucket.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "cors": {
+ "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.",
+ "items": {
+ "properties": {
+ "maxAgeSeconds": {
+ "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "method": {
+ "description": "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\".",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "origin": {
+ "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "responseHeader": {
+ "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "defaultEventBasedHold": {
+ "description": "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.",
+ "type": "boolean"
+ },
+ "defaultObjectAcl": {
+ "description": "Default access controls to apply to new objects when no ACL is provided.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ },
+ "type": "array"
+ },
+ "encryption": {
+ "description": "Encryption configuration for a bucket.",
+ "properties": {
+ "defaultKmsKeyName": {
+ "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for the bucket.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The ID of the bucket. For buckets, the id and name properties are the same.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#bucket",
+ "description": "The kind of item this is. For buckets, this is always storage#bucket.",
+ "type": "string"
+ },
+ "labels": {
+ "additionalProperties": {
+ "description": "An individual label entry.",
+ "type": "string"
+ },
+ "description": "User-provided labels, in key/value pairs.",
+ "type": "object"
+ },
+ "lifecycle": {
+ "description": "The bucket's lifecycle configuration. See lifecycle management for more information.",
+ "properties": {
+ "rule": {
+ "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.",
+ "items": {
+ "properties": {
+ "action": {
+ "description": "The action to take.",
+ "properties": {
+ "storageClass": {
+ "description": "Target storage class. Required iff the type of the action is SetStorageClass.",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of the action. Currently, only Delete and SetStorageClass are supported.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "condition": {
+ "description": "The condition(s) under which the action will be taken.",
+ "properties": {
+ "age": {
+ "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "createdBefore": {
+ "description": "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.",
+ "format": "date",
+ "type": "string"
+ },
+ "isLive": {
+ "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.",
+ "type": "boolean"
+ },
+ "matchesStorageClass": {
+ "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "numNewerVersions": {
+ "description": "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.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "location": {
+ "description": "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.",
+ "type": "string"
+ },
+ "logging": {
+ "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.",
+ "properties": {
+ "logBucket": {
+ "description": "The destination bucket where the current bucket's logs should be placed.",
+ "type": "string"
+ },
+ "logObjectPrefix": {
+ "description": "A prefix for log object names.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "metageneration": {
+ "description": "The metadata generation of this bucket.",
+ "format": "int64",
+ "type": "string"
+ },
+ "name": {
+ "annotations": {
+ "required": [
+ "storage.buckets.insert"
+ ]
+ },
+ "description": "The name of the bucket.",
+ "type": "string"
+ },
+ "owner": {
+ "description": "The owner of the bucket. This is always the project team's owner group.",
+ "properties": {
+ "entity": {
+ "description": "The entity, in the form project-owner-projectId.",
+ "type": "string"
+ },
+ "entityId": {
+ "description": "The ID for the entity.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "projectNumber": {
+ "description": "The project number of the project the bucket belongs to.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "retentionPolicy": {
+ "description": "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.",
+ "properties": {
+ "effectiveTime": {
+ "description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "isLocked": {
+ "description": "Once locked, an object retention policy cannot be modified.",
+ "type": "boolean"
+ },
+ "retentionPeriod": {
+ "description": "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.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "selfLink": {
+ "description": "The URI of this bucket.",
+ "type": "string"
+ },
+ "storageClass": {
+ "description": "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, 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.",
+ "type": "string"
+ },
+ "timeCreated": {
+ "description": "The creation time of the bucket in RFC 3339 format.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The modification time of the bucket in RFC 3339 format.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "versioning": {
+ "description": "The bucket's versioning configuration.",
+ "properties": {
+ "enabled": {
+ "description": "While set to true, versioning is fully enabled for this bucket.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "website": {
+ "description": "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.",
+ "properties": {
+ "mainPageSuffix": {
+ "description": "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.",
+ "type": "string"
+ },
+ "notFoundPage": {
+ "description": "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.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "type": "object"
},
- "insert": {
- "id": "storage.objectAccessControls.insert",
- "path": "b/{bucket}/o/{object}/acl",
- "httpMethod": "POST",
- "description": "Creates a new ACL entry on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "list": {
- "id": "storage.objectAccessControls.list",
- "path": "b/{bucket}/o/{object}/acl",
- "httpMethod": "GET",
- "description": "Retrieves ACL entries on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "BucketAccessControl": {
+ "description": "An access-control entry.",
+ "id": "BucketAccessControl",
+ "properties": {
+ "bucket": {
+ "description": "The name of the bucket.",
+ "type": "string"
+ },
+ "domain": {
+ "description": "The domain associated with the entity, if any.",
+ "type": "string"
+ },
+ "email": {
+ "description": "The email address associated with the entity, if any.",
+ "type": "string"
+ },
+ "entity": {
+ "annotations": {
+ "required": [
+ "storage.bucketAccessControls.insert"
+ ]
+ },
+ "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
+ "type": "string"
+ },
+ "entityId": {
+ "description": "The ID for the entity, if any.",
+ "type": "string"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for the access-control entry.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The ID of the access-control entry.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#bucketAccessControl",
+ "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.",
+ "type": "string"
+ },
+ "projectTeam": {
+ "description": "The project team associated with the entity, if any.",
+ "properties": {
+ "projectNumber": {
+ "description": "The project number.",
+ "type": "string"
+ },
+ "team": {
+ "description": "The team.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "role": {
+ "annotations": {
+ "required": [
+ "storage.bucketAccessControls.insert"
+ ]
+ },
+ "description": "The access permission for the entity.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "The link to this access-control entry.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "response": {
- "$ref": "ObjectAccessControls"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "type": "object"
},
- "patch": {
- "id": "storage.objectAccessControls.patch",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "PATCH",
- "description": "Updates an ACL entry on the specified object. This method supports patch semantics.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "BucketAccessControls": {
+ "description": "An access-control list.",
+ "id": "BucketAccessControls",
+ "properties": {
+ "items": {
+ "description": "The list of items.",
+ "items": {
+ "$ref": "BucketAccessControl"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "storage#bucketAccessControls",
+ "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "type": "object"
},
- "update": {
- "id": "storage.objectAccessControls.update",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates an ACL entry on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
- },
- "response": {
- "$ref": "ObjectAccessControl"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "objects": {
- "methods": {
- "compose": {
- "id": "storage.objects.compose",
- "path": "b/{destinationBucket}/o/{destinationObject}/compose",
- "httpMethod": "POST",
- "description": "Concatenates a list of existing objects into a new object in the same bucket.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object.",
- "required": true,
- "location": "path"
- },
- "destinationObject": {
- "type": "string",
- "description": "Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "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"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "kmsKeyName": {
- "type": "string",
- "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"
+ "Buckets": {
+ "description": "A list of buckets.",
+ "id": "Buckets",
+ "properties": {
+ "items": {
+ "description": "The list of items.",
+ "items": {
+ "$ref": "Bucket"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "storage#buckets",
+ "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "destinationBucket",
- "destinationObject"
- ],
- "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"
- ],
- "supportsMediaDownload": true,
- "useMediaDownloadService": true
+ "type": "object"
},
- "copy": {
- "id": "storage.objects.copy",
- "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}",
- "httpMethod": "POST",
- "description": "Copies a source object to a destination object. Optionally overrides metadata.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "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.",
- "required": true,
- "location": "path"
- },
- "destinationObject": {
- "type": "string",
- "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "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"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "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"
- },
- "sourceBucket": {
- "type": "string",
- "description": "Name of the bucket in which to find the source object.",
- "required": true,
- "location": "path"
- },
- "sourceGeneration": {
- "type": "string",
- "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "sourceObject": {
- "type": "string",
- "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "Channel": {
+ "description": "An notification channel used to watch for resource changes.",
+ "id": "Channel",
+ "properties": {
+ "address": {
+ "description": "The address where notifications are delivered for this channel.",
+ "type": "string"
+ },
+ "expiration": {
+ "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
+ "format": "int64",
+ "type": "string"
+ },
+ "id": {
+ "description": "A UUID or similar unique string that identifies this channel.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "api#channel",
+ "description": "Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string \"api#channel\".",
+ "type": "string"
+ },
+ "params": {
+ "additionalProperties": {
+ "description": "Declares a new parameter by name.",
+ "type": "string"
+ },
+ "description": "Additional parameters controlling delivery channel behavior. Optional.",
+ "type": "object"
+ },
+ "payload": {
+ "description": "A Boolean value to indicate whether payload is wanted. Optional.",
+ "type": "boolean"
+ },
+ "resourceId": {
+ "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.",
+ "type": "string"
+ },
+ "resourceUri": {
+ "description": "A version-specific identifier for the watched resource.",
+ "type": "string"
+ },
+ "token": {
+ "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of delivery mechanism used for this channel.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "sourceBucket",
- "sourceObject",
- "destinationBucket",
- "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"
- ],
- "supportsMediaDownload": true,
- "useMediaDownloadService": true
+ "type": "object"
},
- "delete": {
- "id": "storage.objects.delete",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "DELETE",
- "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.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "ComposeRequest": {
+ "description": "A Compose request.",
+ "id": "ComposeRequest",
+ "properties": {
+ "destination": {
+ "$ref": "Object",
+ "description": "Properties of the resulting object."
+ },
+ "kind": {
+ "default": "storage#composeRequest",
+ "description": "The kind of item this is.",
+ "type": "string"
+ },
+ "sourceObjects": {
+ "annotations": {
+ "required": [
+ "storage.objects.compose"
+ ]
+ },
+ "description": "The list of source objects that will be concatenated into a single object.",
+ "items": {
+ "properties": {
+ "generation": {
+ "description": "The generation of this object to use as the source.",
+ "format": "int64",
+ "type": "string"
+ },
+ "name": {
+ "annotations": {
+ "required": [
+ "storage.objects.compose"
+ ]
+ },
+ "description": "The source object's name. The source object's bucket is implicitly the destination bucket.",
+ "type": "string"
+ },
+ "objectPreconditions": {
+ "description": "Conditions that must be met for this operation to execute.",
+ "properties": {
+ "ifGenerationMatch": {
+ "description": "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.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "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"
- ]
+ "type": "object"
},
- "get": {
- "id": "storage.objects.get",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "GET",
- "description": "Retrieves an object or its metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
+ "Notification": {
+ "description": "A subscription to receive Google PubSub notifications.",
+ "id": "Notification",
+ "properties": {
+ "custom_attributes": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.",
+ "type": "object"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for this subscription notification.",
+ "type": "string"
+ },
+ "event_types": {
+ "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "id": {
+ "description": "The ID of the notification.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#notification",
+ "description": "The kind of item this is. For notifications, this is always storage#notification.",
+ "type": "string"
+ },
+ "object_name_prefix": {
+ "description": "If present, only apply this notification configuration to object names that begin with this prefix.",
+ "type": "string"
+ },
+ "payload_format": {
+ "annotations": {
+ "required": [
+ "storage.notifications.insert"
+ ]
+ },
+ "default": "JSON_API_V1",
+ "description": "The desired content of the Payload.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "The canonical URL of this notification.",
+ "type": "string"
+ },
+ "topic": {
+ "annotations": {
+ "required": [
+ "storage.notifications.insert"
+ ]
+ },
+ "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "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
+ "type": "object"
},
- "getIamPolicy": {
- "id": "storage.objects.getIamPolicy",
- "path": "b/{bucket}/o/{object}/iam",
- "httpMethod": "GET",
- "description": "Returns an IAM policy for the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "Notifications": {
+ "description": "A list of notification subscriptions.",
+ "id": "Notifications",
+ "properties": {
+ "items": {
+ "description": "The list of items.",
+ "items": {
+ "$ref": "Notification"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "storage#notifications",
+ "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "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"
- ]
+ "type": "object"
},
- "insert": {
- "id": "storage.objects.insert",
- "path": "b/{bucket}/o",
- "httpMethod": "POST",
- "description": "Stores a new object and metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
- "required": true,
- "location": "path"
- },
- "contentEncoding": {
- "type": "string",
- "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"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "kmsKeyName": {
- "type": "string",
- "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"
- },
- "name": {
- "type": "string",
- "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.",
- "location": "query"
- },
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "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"
+ "Object": {
+ "description": "An object.",
+ "id": "Object",
+ "properties": {
+ "acl": {
+ "annotations": {
+ "required": [
+ "storage.objects.update"
+ ]
+ },
+ "description": "Access controls on the object.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ },
+ "type": "array"
+ },
+ "bucket": {
+ "description": "The name of the bucket containing this object.",
+ "type": "string"
+ },
+ "cacheControl": {
+ "description": "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.",
+ "type": "string"
+ },
+ "componentCount": {
+ "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "contentDisposition": {
+ "description": "Content-Disposition of the object data.",
+ "type": "string"
+ },
+ "contentEncoding": {
+ "description": "Content-Encoding of the object data.",
+ "type": "string"
+ },
+ "contentLanguage": {
+ "description": "Content-Language of the object data.",
+ "type": "string"
+ },
+ "contentType": {
+ "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.",
+ "type": "string"
+ },
+ "crc32c": {
+ "description": "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.",
+ "type": "string"
+ },
+ "customerEncryption": {
+ "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.",
+ "properties": {
+ "encryptionAlgorithm": {
+ "description": "The encryption algorithm.",
+ "type": "string"
+ },
+ "keySha256": {
+ "description": "SHA256 hash value of the encryption key.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for the object.",
+ "type": "string"
+ },
+ "eventBasedHold": {
+ "description": "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.",
+ "type": "boolean"
+ },
+ "generation": {
+ "description": "The content generation of this object. Used for object versioning.",
+ "format": "int64",
+ "type": "string"
+ },
+ "id": {
+ "description": "The ID of the object, including the bucket name, object name, and generation number.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#object",
+ "description": "The kind of item this is. For objects, this is always storage#object.",
+ "type": "string"
+ },
+ "kmsKeyName": {
+ "description": "Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. Limited availability; usable only by enabled projects.",
+ "type": "string"
+ },
+ "md5Hash": {
+ "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.",
+ "type": "string"
+ },
+ "mediaLink": {
+ "description": "Media download link.",
+ "type": "string"
+ },
+ "metadata": {
+ "additionalProperties": {
+ "description": "An individual metadata entry.",
+ "type": "string"
+ },
+ "description": "User-provided metadata, in key/value pairs.",
+ "type": "object"
+ },
+ "metageneration": {
+ "description": "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.",
+ "format": "int64",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the object. Required if not specified by URL parameter.",
+ "type": "string"
+ },
+ "owner": {
+ "description": "The owner of the object. This will always be the uploader of the object.",
+ "properties": {
+ "entity": {
+ "description": "The entity, in the form user-userId.",
+ "type": "string"
+ },
+ "entityId": {
+ "description": "The ID for the entity.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "retentionExpirationTime": {
+ "description": "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).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "The link to this object.",
+ "type": "string"
+ },
+ "size": {
+ "description": "Content-Length of the data in bytes.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "storageClass": {
+ "description": "Storage class of the object.",
+ "type": "string"
+ },
+ "temporaryHold": {
+ "description": "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.",
+ "type": "boolean"
+ },
+ "timeCreated": {
+ "description": "The creation time of the object in RFC 3339 format.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "timeDeleted": {
+ "description": "The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "timeStorageClassUpdated": {
+ "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The modification time of the object metadata in RFC 3339 format.",
+ "format": "date-time",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "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"
- ],
- "supportsMediaDownload": true,
- "useMediaDownloadService": true,
- "supportsMediaUpload": true,
- "mediaUpload": {
- "accept": [
- "*/*"
- ],
- "protocols": {
- "simple": {
- "multipart": true,
- "path": "/upload/storage/v1/b/{bucket}/o"
- },
- "resumable": {
- "multipart": true,
- "path": "/resumable/upload/storage/v1/b/{bucket}/o"
- }
- }
- }
+ "type": "object"
},
- "list": {
- "id": "storage.objects.list",
- "path": "b/{bucket}/o",
- "httpMethod": "GET",
- "description": "Retrieves a list of objects matching the criteria.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to look for objects.",
- "required": true,
- "location": "path"
- },
- "delimiter": {
- "type": "string",
- "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"
- },
- "maxResults": {
- "type": "integer",
- "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.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to objects whose names begin with this prefix.",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "ObjectAccessControl": {
+ "description": "An access-control entry.",
+ "id": "ObjectAccessControl",
+ "properties": {
+ "bucket": {
+ "description": "The name of the bucket.",
+ "type": "string"
+ },
+ "domain": {
+ "description": "The domain associated with the entity, if any.",
+ "type": "string"
+ },
+ "email": {
+ "description": "The email address associated with the entity, if any.",
+ "type": "string"
+ },
+ "entity": {
+ "annotations": {
+ "required": [
+ "storage.defaultObjectAccessControls.insert",
+ "storage.objectAccessControls.insert"
+ ]
+ },
+ "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
+ "type": "string"
+ },
+ "entityId": {
+ "description": "The ID for the entity, if any.",
+ "type": "string"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for the access-control entry.",
+ "type": "string"
+ },
+ "generation": {
+ "description": "The content generation of the object, if applied to an object.",
+ "format": "int64",
+ "type": "string"
+ },
+ "id": {
+ "description": "The ID of the access-control entry.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#objectAccessControl",
+ "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.",
+ "type": "string"
+ },
+ "object": {
+ "description": "The name of the object, if applied to an object.",
+ "type": "string"
+ },
+ "projectTeam": {
+ "description": "The project team associated with the entity, if any.",
+ "properties": {
+ "projectNumber": {
+ "description": "The project number.",
+ "type": "string"
+ },
+ "team": {
+ "description": "The team.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "role": {
+ "annotations": {
+ "required": [
+ "storage.defaultObjectAccessControls.insert",
+ "storage.objectAccessControls.insert"
+ ]
+ },
+ "description": "The access permission for the entity.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "The link to this access-control entry.",
+ "type": "string"
+ }
},
- "versions": {
- "type": "boolean",
- "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "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
+ "type": "object"
},
- "patch": {
- "id": "storage.objects.patch",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "PATCH",
- "description": "Updates an object's metadata. This method supports patch semantics.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
+ "ObjectAccessControls": {
+ "description": "An access-control list.",
+ "id": "ObjectAccessControls",
+ "properties": {
+ "items": {
+ "description": "The list of items.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "storage#objectAccessControls",
+ "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "Object"
- },
- "response": {
- "$ref": "Object"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "type": "object"
},
- "rewrite": {
- "id": "storage.objects.rewrite",
- "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}",
- "httpMethod": "POST",
- "description": "Rewrites a source object to a destination object. Optionally overrides metadata.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
- "required": true,
- "location": "path"
- },
- "destinationKmsKeyName": {
- "type": "string",
- "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"
- },
- "destinationObject": {
- "type": "string",
- "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.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "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"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "maxBytesRewrittenPerCall": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "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"
- },
- "rewriteToken": {
- "type": "string",
- "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"
- },
- "sourceBucket": {
- "type": "string",
- "description": "Name of the bucket in which to find the source object.",
- "required": true,
- "location": "path"
- },
- "sourceGeneration": {
- "type": "string",
- "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "sourceObject": {
- "type": "string",
- "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "Objects": {
+ "description": "A list of objects.",
+ "id": "Objects",
+ "properties": {
+ "items": {
+ "description": "The list of items.",
+ "items": {
+ "$ref": "Object"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "storage#objects",
+ "description": "The kind of item this is. For lists of objects, this is always storage#objects.",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.",
+ "type": "string"
+ },
+ "prefixes": {
+ "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "sourceBucket",
- "sourceObject",
- "destinationBucket",
- "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"
- ]
+ "type": "object"
},
- "setIamPolicy": {
- "id": "storage.objects.setIamPolicy",
- "path": "b/{bucket}/o/{object}/iam",
- "httpMethod": "PUT",
- "description": "Updates an IAM policy for the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "Policy": {
+ "description": "A bucket/object IAM policy.",
+ "id": "Policy",
+ "properties": {
+ "bindings": {
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy"
+ ]
+ },
+ "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.",
+ "items": {
+ "properties": {
+ "condition": {
+ "type": "any"
+ },
+ "members": {
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy"
+ ]
+ },
+ "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "role": {
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy"
+ ]
+ },
+ "description": "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.\nThe new IAM roles are: \n- roles/storage.admin — Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator — Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- 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.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "HTTP 1.1 Entity tag for the policy.",
+ "format": "byte",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#policy",
+ "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. 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.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "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"
- ]
+ "type": "object"
},
- "testIamPermissions": {
- "id": "storage.objects.testIamPermissions",
- "path": "b/{bucket}/o/{object}/iam/testPermissions",
- "httpMethod": "GET",
- "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "permissions": {
- "type": "string",
- "description": "Permissions to test.",
- "required": true,
- "repeated": true,
- "location": "query"
+ "RewriteResponse": {
+ "description": "A rewrite response.",
+ "id": "RewriteResponse",
+ "properties": {
+ "done": {
+ "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.",
+ "type": "boolean"
+ },
+ "kind": {
+ "default": "storage#rewriteResponse",
+ "description": "The kind of item this is.",
+ "type": "string"
+ },
+ "objectSize": {
+ "description": "The total size of the object being copied in bytes. This property is always present in the response.",
+ "format": "int64",
+ "type": "string"
+ },
+ "resource": {
+ "$ref": "Object",
+ "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes."
+ },
+ "rewriteToken": {
+ "description": "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.",
+ "type": "string"
+ },
+ "totalBytesRewritten": {
+ "description": "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.",
+ "format": "int64",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object",
- "permissions"
- ],
- "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"
- ]
+ "type": "object"
},
- "update": {
- "id": "storage.objects.update",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "PUT",
- "description": "Updates an object's metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "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"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "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"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "predefinedAcl": {
- "type": "string",
- "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"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
+ "ServiceAccount": {
+ "description": "A subscription to receive Google PubSub notifications.",
+ "id": "ServiceAccount",
+ "properties": {
+ "email_address": {
+ "description": "The ID of the notification.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "storage#serviceAccount",
+ "description": "The kind of item this is. For notifications, this is always storage#notification.",
+ "type": "string"
+ }
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "Object"
- },
- "response": {
- "$ref": "Object"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ],
- "supportsMediaDownload": true,
- "useMediaDownloadService": true
+ "type": "object"
},
- "watchAll": {
- "id": "storage.objects.watchAll",
- "path": "b/{bucket}/o/watch",
- "httpMethod": "POST",
- "description": "Watch for changes on all objects in a bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to look for objects.",
- "required": true,
- "location": "path"
- },
- "delimiter": {
- "type": "string",
- "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"
- },
- "maxResults": {
- "type": "integer",
- "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.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to objects whose names begin with this prefix.",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "TestIamPermissionsResponse": {
+ "description": "A storage.(buckets|objects).testIamPermissions response.",
+ "id": "TestIamPermissionsResponse",
+ "properties": {
+ "kind": {
+ "default": "storage#testIamPermissionsResponse",
+ "description": "The kind of item this is.",
+ "type": "string"
+ },
+ "permissions": {
+ "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
},
- "versions": {
- "type": "boolean",
- "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "bucket"
- ],
- "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
+ "type": "object"
}
- }
},
- "projects": {
- "resources": {
- "serviceAccount": {
- "methods": {
- "get": {
- "id": "storage.projects.serviceAccount.get",
- "path": "projects/{projectId}/serviceAccount",
- "httpMethod": "GET",
- "description": "Get the email address of this project's Google Cloud Storage service account.",
- "parameters": {
- "projectId": {
- "type": "string",
- "description": "Project ID",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "projectId"
- ],
- "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"
- ]
- }
- }
- }
- }
- }
- }
-}
+ "servicePath": "storage/v1/",
+ "title": "Cloud Storage JSON API",
+ "version": "v1"
+} \ No newline at end of file
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 e311c29..e7405c7 100644
--- a/vendor/google.golang.org/api/storage/v1/storage-gen.go
+++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go
@@ -204,19 +204,34 @@ type Bucket struct {
// configuration.
Cors []*BucketCors `json:"cors,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 bool `json:"defaultEventBasedHold,omitempty"`
+
// DefaultObjectAcl: Default access controls to apply to new objects
// when no ACL is provided.
DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"`
- // Encryption: Encryption configuration used by default for newly
- // inserted objects, when no encryption config is specified.
+ // 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"`
- // Id: The ID of the bucket. For buckets, the id and name properities
- // 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
@@ -254,6 +269,18 @@ type Bucket struct {
// 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
+ // PERMISSION_DENIED error.
+ RetentionPolicy *BucketRetentionPolicy `json:"retentionPolicy,omitempty"`
+
// SelfLink: The URI of this bucket.
SelfLink string `json:"selfLink,omitempty"`
@@ -302,14 +329,15 @@ type Bucket struct {
}
func (s *Bucket) MarshalJSON() ([]byte, error) {
- type noMethod Bucket
- raw := noMethod(*s)
+ type NoMethod Bucket
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BucketBilling: The bucket's billing configuration.
type BucketBilling struct {
- // RequesterPays: When set to true, bucket is requester pays.
+ // 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
@@ -330,8 +358,8 @@ type BucketBilling struct {
}
func (s *BucketBilling) MarshalJSON() ([]byte, error) {
- type noMethod BucketBilling
- raw := noMethod(*s)
+ type NoMethod BucketBilling
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -373,14 +401,16 @@ type BucketCors struct {
}
func (s *BucketCors) MarshalJSON() ([]byte, error) {
- type noMethod BucketCors
- raw := noMethod(*s)
+ type NoMethod BucketCors
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// BucketEncryption: Encryption configuration used by default for newly
-// inserted objects, when no encryption config is specified.
+// 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 string `json:"defaultKmsKeyName,omitempty"`
// ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName")
@@ -402,8 +432,8 @@ type BucketEncryption struct {
}
func (s *BucketEncryption) MarshalJSON() ([]byte, error) {
- type noMethod BucketEncryption
- raw := noMethod(*s)
+ type NoMethod BucketEncryption
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -432,8 +462,8 @@ type BucketLifecycle struct {
}
func (s *BucketLifecycle) MarshalJSON() ([]byte, error) {
- type noMethod BucketLifecycle
- raw := noMethod(*s)
+ type NoMethod BucketLifecycle
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -462,8 +492,8 @@ type BucketLifecycleRule struct {
}
func (s *BucketLifecycleRule) MarshalJSON() ([]byte, error) {
- type noMethod BucketLifecycleRule
- raw := noMethod(*s)
+ type NoMethod BucketLifecycleRule
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -495,8 +525,8 @@ type BucketLifecycleRuleAction struct {
}
func (s *BucketLifecycleRuleAction) MarshalJSON() ([]byte, error) {
- type noMethod BucketLifecycleRuleAction
- raw := noMethod(*s)
+ type NoMethod BucketLifecycleRuleAction
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -546,8 +576,8 @@ type BucketLifecycleRuleCondition struct {
}
func (s *BucketLifecycleRuleCondition) MarshalJSON() ([]byte, error) {
- type noMethod BucketLifecycleRuleCondition
- raw := noMethod(*s)
+ type NoMethod BucketLifecycleRuleCondition
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -580,8 +610,8 @@ type BucketLogging struct {
}
func (s *BucketLogging) MarshalJSON() ([]byte, error) {
- type noMethod BucketLogging
- raw := noMethod(*s)
+ type NoMethod BucketLogging
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -612,8 +642,57 @@ type BucketOwner struct {
}
func (s *BucketOwner) MarshalJSON() ([]byte, error) {
- type noMethod BucketOwner
- raw := noMethod(*s)
+ 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
+// 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 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 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 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 []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 []string `json:"-"`
+}
+
+func (s *BucketRetentionPolicy) MarshalJSON() ([]byte, error) {
+ type NoMethod BucketRetentionPolicy
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -641,8 +720,8 @@ type BucketVersioning struct {
}
func (s *BucketVersioning) MarshalJSON() ([]byte, error) {
- type noMethod BucketVersioning
- raw := noMethod(*s)
+ type NoMethod BucketVersioning
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -681,8 +760,8 @@ type BucketWebsite struct {
}
func (s *BucketWebsite) MarshalJSON() ([]byte, error) {
- type noMethod BucketWebsite
- raw := noMethod(*s)
+ type NoMethod BucketWebsite
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -758,8 +837,8 @@ type BucketAccessControl struct {
}
func (s *BucketAccessControl) MarshalJSON() ([]byte, error) {
- type noMethod BucketAccessControl
- raw := noMethod(*s)
+ type NoMethod BucketAccessControl
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -790,8 +869,8 @@ type BucketAccessControlProjectTeam struct {
}
func (s *BucketAccessControlProjectTeam) MarshalJSON() ([]byte, error) {
- type noMethod BucketAccessControlProjectTeam
- raw := noMethod(*s)
+ type NoMethod BucketAccessControlProjectTeam
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -826,8 +905,8 @@ type BucketAccessControls struct {
}
func (s *BucketAccessControls) MarshalJSON() ([]byte, error) {
- type noMethod BucketAccessControls
- raw := noMethod(*s)
+ type NoMethod BucketAccessControls
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -867,8 +946,8 @@ type Buckets struct {
}
func (s *Buckets) MarshalJSON() ([]byte, error) {
- type noMethod Buckets
- raw := noMethod(*s)
+ type NoMethod Buckets
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -933,8 +1012,8 @@ type Channel struct {
}
func (s *Channel) MarshalJSON() ([]byte, error) {
- type noMethod Channel
- raw := noMethod(*s)
+ type NoMethod Channel
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -968,8 +1047,8 @@ type ComposeRequest struct {
}
func (s *ComposeRequest) MarshalJSON() ([]byte, error) {
- type noMethod ComposeRequest
- raw := noMethod(*s)
+ type NoMethod ComposeRequest
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1003,8 +1082,8 @@ type ComposeRequestSourceObjects struct {
}
func (s *ComposeRequestSourceObjects) MarshalJSON() ([]byte, error) {
- type noMethod ComposeRequestSourceObjects
- raw := noMethod(*s)
+ type NoMethod ComposeRequestSourceObjects
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1036,8 +1115,8 @@ type ComposeRequestSourceObjectsObjectPreconditions struct {
}
func (s *ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON() ([]byte, error) {
- type noMethod ComposeRequestSourceObjectsObjectPreconditions
- raw := noMethod(*s)
+ type NoMethod ComposeRequestSourceObjectsObjectPreconditions
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1101,8 +1180,8 @@ type Notification struct {
}
func (s *Notification) MarshalJSON() ([]byte, error) {
- type noMethod Notification
- raw := noMethod(*s)
+ type NoMethod Notification
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1137,8 +1216,8 @@ type Notifications struct {
}
func (s *Notifications) MarshalJSON() ([]byte, error) {
- type noMethod Notifications
- raw := noMethod(*s)
+ type NoMethod Notifications
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1185,6 +1264,21 @@ type Object struct {
// 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 bool `json:"eventBasedHold,omitempty"`
+
// Generation: The content generation of this object. Used for object
// versioning.
Generation int64 `json:"generation,omitempty,string"`
@@ -1198,7 +1292,8 @@ type Object struct {
Kind string `json:"kind,omitempty"`
// KmsKeyName: Cloud KMS Key used to encrypt this object, if the object
- // is encrypted by such a key.
+ // is encrypted by such a key. Limited availability; usable only by
+ // enabled projects.
KmsKeyName string `json:"kmsKeyName,omitempty"`
// Md5Hash: MD5 hash of the data; encoded using base64. For more
@@ -1226,6 +1321,15 @@ type Object struct {
// the object.
Owner *ObjectOwner `json:"owner,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).
+ RetentionExpirationTime string `json:"retentionExpirationTime,omitempty"`
+
// SelfLink: The link to this object.
SelfLink string `json:"selfLink,omitempty"`
@@ -1235,6 +1339,15 @@ type Object struct {
// 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 bool `json:"temporaryHold,omitempty"`
+
// TimeCreated: The creation time of the object in RFC 3339 format.
TimeCreated string `json:"timeCreated,omitempty"`
@@ -1274,8 +1387,8 @@ type Object struct {
}
func (s *Object) MarshalJSON() ([]byte, error) {
- type noMethod Object
- raw := noMethod(*s)
+ type NoMethod Object
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1307,8 +1420,8 @@ type ObjectCustomerEncryption struct {
}
func (s *ObjectCustomerEncryption) MarshalJSON() ([]byte, error) {
- type noMethod ObjectCustomerEncryption
- raw := noMethod(*s)
+ type NoMethod ObjectCustomerEncryption
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1339,8 +1452,8 @@ type ObjectOwner struct {
}
func (s *ObjectOwner) MarshalJSON() ([]byte, error) {
- type noMethod ObjectOwner
- raw := noMethod(*s)
+ type NoMethod ObjectOwner
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1423,8 +1536,8 @@ type ObjectAccessControl struct {
}
func (s *ObjectAccessControl) MarshalJSON() ([]byte, error) {
- type noMethod ObjectAccessControl
- raw := noMethod(*s)
+ type NoMethod ObjectAccessControl
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1455,8 +1568,8 @@ type ObjectAccessControlProjectTeam struct {
}
func (s *ObjectAccessControlProjectTeam) MarshalJSON() ([]byte, error) {
- type noMethod ObjectAccessControlProjectTeam
- raw := noMethod(*s)
+ type NoMethod ObjectAccessControlProjectTeam
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1491,8 +1604,8 @@ type ObjectAccessControls struct {
}
func (s *ObjectAccessControls) MarshalJSON() ([]byte, error) {
- type noMethod ObjectAccessControls
- raw := noMethod(*s)
+ type NoMethod ObjectAccessControls
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1536,8 +1649,8 @@ type Objects struct {
}
func (s *Objects) MarshalJSON() ([]byte, error) {
- type noMethod Objects
- raw := noMethod(*s)
+ type NoMethod Objects
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1585,8 +1698,8 @@ type Policy struct {
}
func (s *Policy) MarshalJSON() ([]byte, error) {
- type noMethod Policy
- raw := noMethod(*s)
+ type NoMethod Policy
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1668,8 +1781,8 @@ type PolicyBindings struct {
}
func (s *PolicyBindings) MarshalJSON() ([]byte, error) {
- type noMethod PolicyBindings
- raw := noMethod(*s)
+ type NoMethod PolicyBindings
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1723,8 +1836,8 @@ type RewriteResponse struct {
}
func (s *RewriteResponse) MarshalJSON() ([]byte, error) {
- type noMethod RewriteResponse
- raw := noMethod(*s)
+ type NoMethod RewriteResponse
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1760,8 +1873,8 @@ type ServiceAccount struct {
}
func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
- type noMethod ServiceAccount
- raw := noMethod(*s)
+ type NoMethod ServiceAccount
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1813,8 +1926,8 @@ type TestIamPermissionsResponse struct {
}
func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
- type noMethod TestIamPermissionsResponse
- raw := noMethod(*s)
+ type NoMethod TestIamPermissionsResponse
+ raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -2055,7 +2168,7 @@ func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketA
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -2205,7 +2318,7 @@ func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Buck
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -2358,7 +2471,7 @@ func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Bucket
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -2406,8 +2519,7 @@ type BucketAccessControlsPatchCall struct {
header_ http.Header
}
-// Patch: Updates an ACL entry on the specified bucket. This method
-// supports patch semantics.
+// Patch: Patches an ACL entry on the specified bucket.
func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsPatchCall {
c := &BucketAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.bucket = bucket
@@ -2505,12 +2617,12 @@ func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Bucke
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates an ACL entry on the specified bucket. This method supports patch semantics.",
+ // "description": "Patches an ACL entry on the specified bucket.",
// "httpMethod": "PATCH",
// "id": "storage.bucketAccessControls.patch",
// "parameterOrder": [
@@ -2661,7 +2773,7 @@ func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Buck
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -2987,7 +3099,7 @@ func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -3165,7 +3277,7 @@ func (c *BucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -3275,7 +3387,7 @@ func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall {
}
// UserProject sets the optional parameter "userProject": The project to
-// be billed for this request
+// be billed for this request.
func (c *BucketsInsertCall) UserProject(userProject string) *BucketsInsertCall {
c.urlParams_.Set("userProject", userProject)
return c
@@ -3359,7 +3471,7 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -3431,7 +3543,7 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
// "type": "string"
// },
// "userProject": {
- // "description": "The project to be billed for this request",
+ // "description": "The project to be billed for this request.",
// "location": "query",
// "type": "string"
// }
@@ -3596,7 +3708,7 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -3687,6 +3799,152 @@ func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) err
}
}
+// method id "storage.buckets.lockRetentionPolicy":
+
+type BucketsLockRetentionPolicyCall struct {
+ s *Service
+ bucket string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// LockRetentionPolicy: Locks retention policy on a bucket.
+func (r *BucketsService) LockRetentionPolicy(bucket string, ifMetagenerationMatch int64) *BucketsLockRetentionPolicyCall {
+ c := &BucketsLockRetentionPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.bucket = bucket
+ c.urlParams_.Set("ifMetagenerationMatch", fmt.Sprint(ifMetagenerationMatch))
+ return c
+}
+
+// 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.
+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.
+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.
+func (c *BucketsLockRetentionPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/lockRetentionPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "bucket": c.bucket,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// 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.
+func (c *BucketsLockRetentionPolicyCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Bucket{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ 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 {
@@ -3864,7 +4122,7 @@ func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -4075,7 +4333,7 @@ func (c *BucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -4231,7 +4489,7 @@ func (c *BucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -4455,7 +4713,7 @@ func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -4890,7 +5148,7 @@ func (c *DefaultObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -5041,7 +5299,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption)
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -5211,7 +5469,7 @@ func (c *DefaultObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -5271,8 +5529,7 @@ type DefaultObjectAccessControlsPatchCall struct {
header_ http.Header
}
-// Patch: Updates a default object ACL entry on the specified bucket.
-// This method supports patch semantics.
+// Patch: Patches a default object ACL entry on the specified bucket.
func (r *DefaultObjectAccessControlsService) Patch(bucket string, entity string, objectaccesscontrol *ObjectAccessControl) *DefaultObjectAccessControlsPatchCall {
c := &DefaultObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.bucket = bucket
@@ -5370,12 +5627,12 @@ func (c *DefaultObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption)
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates a default object ACL entry on the specified bucket. This method supports patch semantics.",
+ // "description": "Patches a default object ACL entry on the specified bucket.",
// "httpMethod": "PATCH",
// "id": "storage.defaultObjectAccessControls.patch",
// "parameterOrder": [
@@ -5526,7 +5783,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption)
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -5808,7 +6065,7 @@ func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification,
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -5961,7 +6218,7 @@ func (c *NotificationsInsertCall) Do(opts ...googleapi.CallOption) (*Notificatio
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -6116,7 +6373,7 @@ func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -6427,7 +6684,7 @@ func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectA
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -6601,7 +6858,7 @@ func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*Obje
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -6778,7 +7035,7 @@ func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*Object
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -6840,8 +7097,7 @@ type ObjectAccessControlsPatchCall struct {
header_ http.Header
}
-// Patch: Updates an ACL entry on the specified object. This method
-// supports patch semantics.
+// Patch: Patches an ACL entry on the specified object.
func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall {
c := &ObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.bucket = bucket
@@ -6949,12 +7205,12 @@ func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*Objec
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates an ACL entry on the specified object. This method supports patch semantics.",
+ // "description": "Patches an ACL entry on the specified object.",
// "httpMethod": "PATCH",
// "id": "storage.objectAccessControls.patch",
// "parameterOrder": [
@@ -7129,7 +7385,7 @@ func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*Obje
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -7273,9 +7529,9 @@ func (c *ObjectsComposeCall) Fields(s ...googleapi.Field) *ObjectsComposeCall {
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 method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall {
c.ctx_ = ctx
return c
@@ -7314,22 +7570,6 @@ func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
-// Download fetches the API endpoint's "media" value, instead of the normal
-// API response value. If the returned error is nil, the Response is guaranteed to
-// have a 2xx status code. Callers must close the Response.Body as usual.
-func (c *ObjectsComposeCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("media")
- if err != nil {
- return nil, err
- }
- if err := googleapi.CheckMediaResponse(res); err != nil {
- res.Body.Close()
- return nil, err
- }
- return res, nil
-}
-
// 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
@@ -7363,7 +7603,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -7443,9 +7683,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/devstorage.full_control",
// "https://www.googleapis.com/auth/devstorage.read_write"
- // ],
- // "supportsMediaDownload": true,
- // "useMediaDownloadService": true
+ // ]
// }
}
@@ -7605,9 +7843,9 @@ func (c *ObjectsCopyCall) Fields(s ...googleapi.Field) *ObjectsCopyCall {
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 method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall {
c.ctx_ = ctx
return c
@@ -7648,22 +7886,6 @@ func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
-// Download fetches the API endpoint's "media" value, instead of the normal
-// API response value. If the returned error is nil, the Response is guaranteed to
-// have a 2xx status code. Callers must close the Response.Body as usual.
-func (c *ObjectsCopyCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("media")
- if err != nil {
- return nil, err
- }
- if err := googleapi.CheckMediaResponse(res); err != nil {
- res.Body.Close()
- return nil, err
- }
- return res, nil
-}
-
// 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
@@ -7697,7 +7919,7 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -7841,9 +8063,7 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/devstorage.full_control",
// "https://www.googleapis.com/auth/devstorage.read_write"
- // ],
- // "supportsMediaDownload": true,
- // "useMediaDownloadService": true
+ // ]
// }
}
@@ -8231,7 +8451,7 @@ func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -8447,7 +8667,7 @@ func (c *ObjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -8570,7 +8790,8 @@ func (c *ObjectsInsertCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in
// 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.
+// metadata's kms_key_name value, if any. Limited availability; usable
+// only by enabled projects.
func (c *ObjectsInsertCall) KmsKeyName(kmsKeyName string) *ObjectsInsertCall {
c.urlParams_.Set("kmsKeyName", kmsKeyName)
return c
@@ -8713,11 +8934,12 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
- body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
+ body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
+ gensupport.SetGetBody(req, getBody)
googleapi.Expand(req.URL, map[string]string{
"bucket": c.bucket,
})
@@ -8774,7 +8996,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -8837,7 +9059,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "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.",
+ // "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. Limited availability; usable only by enabled projects.",
// "location": "query",
// "type": "string"
// },
@@ -8898,9 +9120,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "https://www.googleapis.com/auth/devstorage.full_control",
// "https://www.googleapis.com/auth/devstorage.read_write"
// ],
- // "supportsMediaDownload": true,
- // "supportsMediaUpload": true,
- // "useMediaDownloadService": true
+ // "supportsMediaUpload": true
// }
}
@@ -8934,6 +9154,15 @@ func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall {
return c
}
+// 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.
+func (c *ObjectsListCall) IncludeTrailingDelimiter(includeTrailingDelimiter bool) *ObjectsListCall {
+ 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
@@ -9074,7 +9303,7 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -9097,6 +9326,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) {
// "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.",
@@ -9188,8 +9422,7 @@ type ObjectsPatchCall struct {
header_ http.Header
}
-// Patch: Updates an object's metadata. This method supports patch
-// semantics.
+// Patch: Patches an object's metadata.
func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall {
c := &ObjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.bucket = bucket
@@ -9274,7 +9507,7 @@ func (c *ObjectsPatchCall) Projection(projection string) *ObjectsPatchCall {
}
// UserProject sets the optional parameter "userProject": The project to
-// be billed for this request. Required for Requester Pays buckets.
+// be billed for this request, for Requester Pays buckets.
func (c *ObjectsPatchCall) UserProject(userProject string) *ObjectsPatchCall {
c.urlParams_.Set("userProject", userProject)
return c
@@ -9362,12 +9595,12 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates an object's metadata. This method supports patch semantics.",
+ // "description": "Patches an object's metadata.",
// "httpMethod": "PATCH",
// "id": "storage.objects.patch",
// "parameterOrder": [
@@ -9452,7 +9685,7 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "type": "string"
// },
// "userProject": {
- // "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ // "description": "The project to be billed for this request, for Requester Pays buckets.",
// "location": "query",
// "type": "string"
// }
@@ -9738,7 +9971,7 @@ func (c *ObjectsRewriteCall) Do(opts ...googleapi.CallOption) (*RewriteResponse,
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -10021,7 +10254,7 @@ func (c *ObjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, err
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -10201,7 +10434,7 @@ func (c *ObjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestI
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -10372,9 +10605,9 @@ func (c *ObjectsUpdateCall) Fields(s ...googleapi.Field) *ObjectsUpdateCall {
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 method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall {
c.ctx_ = ctx
return c
@@ -10413,22 +10646,6 @@ func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
-// Download fetches the API endpoint's "media" value, instead of the normal
-// API response value. If the returned error is nil, the Response is guaranteed to
-// have a 2xx status code. Callers must close the Response.Body as usual.
-func (c *ObjectsUpdateCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("media")
- if err != nil {
- return nil, err
- }
- if err := googleapi.CheckMediaResponse(res); err != nil {
- res.Body.Close()
- return nil, err
- }
- return res, nil
-}
-
// 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
@@ -10462,7 +10679,7 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) {
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -10567,9 +10784,7 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/devstorage.full_control"
- // ],
- // "supportsMediaDownload": true,
- // "useMediaDownloadService": true
+ // ]
// }
}
@@ -10604,6 +10819,15 @@ func (c *ObjectsWatchAllCall) Delimiter(delimiter string) *ObjectsWatchAllCall {
return c
}
+// 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.
+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
@@ -10736,7 +10960,7 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error)
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@@ -10759,6 +10983,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error)
// "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.",
@@ -10936,7 +11165,7 @@ func (c *ProjectsServiceAccountGetCall) Do(opts ...googleapi.CallOption) (*Servi
},
}
target := &ret
- if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
diff --git a/vendor/google.golang.org/api/transport/dial.go b/vendor/google.golang.org/api/transport/dial.go
index 91d8325..c4c3719 100644
--- a/vendor/google.golang.org/api/transport/dial.go
+++ b/vendor/google.golang.org/api/transport/dial.go
@@ -21,10 +21,8 @@ import (
"net/http"
"golang.org/x/net/context"
- "golang.org/x/oauth2/google"
"google.golang.org/grpc"
- "google.golang.org/api/internal"
"google.golang.org/api/option"
gtransport "google.golang.org/api/transport/grpc"
htransport "google.golang.org/api/transport/http"
@@ -49,13 +47,3 @@ func DialGRPC(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientCon
func DialGRPCInsecure(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientConn, error) {
return gtransport.DialInsecure(ctx, opts...)
}
-
-// Creds constructs a google.DefaultCredentials from the information in the options,
-// or obtains the default credentials in the same way as google.FindDefaultCredentials.
-func Creds(ctx context.Context, opts ...option.ClientOption) (*google.DefaultCredentials, error) {
- var ds internal.DialSettings
- for _, opt := range opts {
- opt.Apply(&ds)
- }
- return internal.Creds(ctx, &ds)
-}
diff --git a/vendor/google.golang.org/api/transport/go19.go b/vendor/google.golang.org/api/transport/go19.go
new file mode 100644
index 0000000..0177e56
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/go19.go
@@ -0,0 +1,34 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.9
+
+package transport
+
+import (
+ "golang.org/x/net/context"
+ "golang.org/x/oauth2/google"
+ "google.golang.org/api/internal"
+ "google.golang.org/api/option"
+)
+
+// Creds constructs a google.Credentials from the information in the options,
+// or obtains the default credentials in the same way as google.FindDefaultCredentials.
+func Creds(ctx context.Context, opts ...option.ClientOption) (*google.Credentials, error) {
+ var ds internal.DialSettings
+ for _, opt := range opts {
+ opt.Apply(&ds)
+ }
+ return internal.Creds(ctx, &ds)
+}
diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go
index 8a23bd3..2b8ed6b 100644
--- a/vendor/google.golang.org/api/transport/grpc/dial.go
+++ b/vendor/google.golang.org/api/transport/grpc/dial.go
@@ -34,50 +34,51 @@ var appengineDialerHook func(context.Context) grpc.DialOption
// Dial returns a GRPC connection for use communicating with a Google cloud
// service, configured with the given ClientOptions.
func Dial(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientConn, error) {
- var o internal.DialSettings
- for _, opt := range opts {
- opt.Apply(&o)
- }
- if o.HTTPClient != nil {
- return nil, errors.New("unsupported HTTP client specified")
- }
- if o.GRPCConn != nil {
- return o.GRPCConn, nil
- }
- creds, err := internal.Creds(ctx, &o)
- if err != nil {
- return nil, err
- }
- grpcOpts := []grpc.DialOption{
- grpc.WithPerRPCCredentials(oauth.TokenSource{creds.TokenSource}),
- grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")),
- }
- if appengineDialerHook != nil {
- // Use the Socket API on App Engine.
- grpcOpts = append(grpcOpts, appengineDialerHook(ctx))
- }
- grpcOpts = append(grpcOpts, o.GRPCDialOpts...)
- if o.UserAgent != "" {
- grpcOpts = append(grpcOpts, grpc.WithUserAgent(o.UserAgent))
- }
- return grpc.DialContext(ctx, o.Endpoint, grpcOpts...)
+ return dial(ctx, false, opts)
}
// DialInsecure returns an insecure GRPC connection for use communicating
// with fake or mock Google cloud service implementations, such as emulators.
// The connection is configured with the given ClientOptions.
func DialInsecure(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientConn, error) {
+ return dial(ctx, true, opts)
+}
+
+func dial(ctx context.Context, insecure bool, opts []option.ClientOption) (*grpc.ClientConn, error) {
var o internal.DialSettings
for _, opt := range opts {
opt.Apply(&o)
}
+ if err := o.Validate(); err != nil {
+ return nil, err
+ }
if o.HTTPClient != nil {
return nil, errors.New("unsupported HTTP client specified")
}
if o.GRPCConn != nil {
return o.GRPCConn, nil
}
- grpcOpts := []grpc.DialOption{grpc.WithInsecure()}
+ var grpcOpts []grpc.DialOption
+ if insecure {
+ grpcOpts = []grpc.DialOption{grpc.WithInsecure()}
+ } else if !o.NoAuth {
+ creds, err := internal.Creds(ctx, &o)
+ if err != nil {
+ return nil, err
+ }
+ grpcOpts = []grpc.DialOption{
+ grpc.WithPerRPCCredentials(oauth.TokenSource{creds.TokenSource}),
+ grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")),
+ }
+ }
+ if appengineDialerHook != nil {
+ // Use the Socket API on App Engine.
+ grpcOpts = append(grpcOpts, appengineDialerHook(ctx))
+ }
+ // Add tracing, but before the other options, so that clients can override the
+ // gRPC stats handler.
+ // This assumes that gRPC options are processed in order, left to right.
+ grpcOpts = addOCStatsHandler(grpcOpts)
grpcOpts = append(grpcOpts, o.GRPCDialOpts...)
if o.UserAgent != "" {
grpcOpts = append(grpcOpts, grpc.WithUserAgent(o.UserAgent))
diff --git a/vendor/google.golang.org/api/transport/grpc/dial_appengine.go b/vendor/google.golang.org/api/transport/grpc/dial_appengine.go
new file mode 100644
index 0000000..a40cef2
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/grpc/dial_appengine.go
@@ -0,0 +1,41 @@
+// Copyright 2016 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build appengine
+
+package grpc
+
+import (
+ "net"
+ "time"
+
+ "golang.org/x/net/context"
+ "google.golang.org/appengine"
+ "google.golang.org/appengine/socket"
+ "google.golang.org/grpc"
+)
+
+func init() {
+ // NOTE: dev_appserver doesn't currently support SSL.
+ // When it does, this code can be removed.
+ if appengine.IsDevAppServer() {
+ return
+ }
+
+ appengineDialerHook = func(ctx context.Context) grpc.DialOption {
+ return grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
+ return socket.DialTimeout(ctx, "tcp", addr, timeout)
+ })
+ }
+}
diff --git a/vendor/google.golang.org/api/transport/grpc/go18.go b/vendor/google.golang.org/api/transport/grpc/go18.go
new file mode 100644
index 0000000..a4b4a99
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/grpc/go18.go
@@ -0,0 +1,26 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package grpc
+
+import (
+ "go.opencensus.io/plugin/ocgrpc"
+ "google.golang.org/grpc"
+)
+
+func addOCStatsHandler(opts []grpc.DialOption) []grpc.DialOption {
+ return append(opts, grpc.WithStatsHandler(&ocgrpc.ClientHandler{}))
+}
diff --git a/vendor/google.golang.org/api/transport/grpc/not_go18.go b/vendor/google.golang.org/api/transport/grpc/not_go18.go
new file mode 100644
index 0000000..f509d86
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/grpc/not_go18.go
@@ -0,0 +1,21 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.8
+
+package grpc
+
+import "google.golang.org/grpc"
+
+func addOCStatsHandler(opts []grpc.DialOption) []grpc.DialOption { return opts }
diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go
index a04956d..5184ff5 100644
--- a/vendor/google.golang.org/api/transport/http/dial.go
+++ b/vendor/google.golang.org/api/transport/http/dial.go
@@ -32,43 +32,74 @@ import (
// service, configured with the given ClientOptions. It also returns the endpoint
// for the service as specified in the options.
func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, string, error) {
- var o internal.DialSettings
- for _, opt := range opts {
- opt.Apply(&o)
- }
- if o.GRPCConn != nil {
- return nil, "", errors.New("unsupported gRPC connection specified")
+ settings, err := newSettings(opts)
+ if err != nil {
+ return nil, "", err
}
// TODO(cbro): consider injecting the User-Agent even if an explicit HTTP client is provided?
- if o.HTTPClient != nil {
- return o.HTTPClient, o.Endpoint, nil
+ if settings.HTTPClient != nil {
+ return settings.HTTPClient, settings.Endpoint, nil
}
- if o.APIKey != "" {
- hc := &http.Client{
- Transport: &transport.APIKey{
- Key: o.APIKey,
- Transport: userAgentTransport{
- base: baseTransport(ctx),
- userAgent: o.UserAgent,
- },
- },
- }
- return hc, o.Endpoint, nil
- }
- creds, err := internal.Creds(ctx, &o)
+ trans, err := newTransport(ctx, defaultBaseTransport(ctx), settings)
if err != nil {
return nil, "", err
}
- hc := &http.Client{
- Transport: &oauth2.Transport{
+ return &http.Client{Transport: trans}, settings.Endpoint, nil
+}
+
+// NewTransport creates an http.RoundTripper for use communicating with a Google
+// cloud service, configured with the given ClientOptions. Its RoundTrip method delegates to base.
+func NewTransport(ctx context.Context, base http.RoundTripper, opts ...option.ClientOption) (http.RoundTripper, error) {
+ settings, err := newSettings(opts)
+ if err != nil {
+ return nil, err
+ }
+ if settings.HTTPClient != nil {
+ return nil, errors.New("transport/http: WithHTTPClient passed to NewTransport")
+ }
+ return newTransport(ctx, base, settings)
+}
+
+func newTransport(ctx context.Context, base http.RoundTripper, settings *internal.DialSettings) (http.RoundTripper, error) {
+ trans := base
+ trans = userAgentTransport{
+ base: trans,
+ userAgent: settings.UserAgent,
+ }
+ trans = addOCTransport(trans)
+ switch {
+ case settings.NoAuth:
+ // Do nothing.
+ case settings.APIKey != "":
+ trans = &transport.APIKey{
+ Transport: trans,
+ Key: settings.APIKey,
+ }
+ default:
+ creds, err := internal.Creds(ctx, settings)
+ if err != nil {
+ return nil, err
+ }
+ trans = &oauth2.Transport{
+ Base: trans,
Source: creds.TokenSource,
- Base: userAgentTransport{
- base: baseTransport(ctx),
- userAgent: o.UserAgent,
- },
- },
+ }
+ }
+ return trans, nil
+}
+
+func newSettings(opts []option.ClientOption) (*internal.DialSettings, error) {
+ var o internal.DialSettings
+ for _, opt := range opts {
+ opt.Apply(&o)
+ }
+ if err := o.Validate(); err != nil {
+ return nil, err
+ }
+ if o.GRPCConn != nil {
+ return nil, errors.New("unsupported gRPC connection specified")
}
- return hc, o.Endpoint, nil
+ return &o, nil
}
type userAgentTransport struct {
@@ -97,9 +128,9 @@ func (t userAgentTransport) RoundTrip(req *http.Request) (*http.Response, error)
// Set at init time by dial_appengine.go. If nil, we're not on App Engine.
var appengineUrlfetchHook func(context.Context) http.RoundTripper
-// baseTransport returns the base HTTP transport.
+// defaultBaseTransport returns the base HTTP transport.
// On App Engine, this is urlfetch.Transport, otherwise it's http.DefaultTransport.
-func baseTransport(ctx context.Context) http.RoundTripper {
+func defaultBaseTransport(ctx context.Context) http.RoundTripper {
if appengineUrlfetchHook != nil {
return appengineUrlfetchHook(ctx)
}
diff --git a/vendor/google.golang.org/api/transport/http/dial_appengine.go b/vendor/google.golang.org/api/transport/http/dial_appengine.go
new file mode 100644
index 0000000..0cdef74
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/http/dial_appengine.go
@@ -0,0 +1,30 @@
+// Copyright 2016 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build appengine
+
+package http
+
+import (
+ "net/http"
+
+ "golang.org/x/net/context"
+ "google.golang.org/appengine/urlfetch"
+)
+
+func init() {
+ appengineUrlfetchHook = func(ctx context.Context) http.RoundTripper {
+ return &urlfetch.Transport{Context: ctx}
+ }
+}
diff --git a/vendor/google.golang.org/api/transport/http/go18.go b/vendor/google.golang.org/api/transport/http/go18.go
new file mode 100644
index 0000000..1d4bb8e
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/http/go18.go
@@ -0,0 +1,31 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package http
+
+import (
+ "net/http"
+
+ "go.opencensus.io/exporter/stackdriver/propagation"
+ "go.opencensus.io/plugin/ochttp"
+)
+
+func addOCTransport(trans http.RoundTripper) http.RoundTripper {
+ return &ochttp.Transport{
+ Base: trans,
+ Propagation: &propagation.HTTPFormat{},
+ }
+}
diff --git a/vendor/google.golang.org/api/transport/http/not_go18.go b/vendor/google.golang.org/api/transport/http/not_go18.go
new file mode 100644
index 0000000..628a21a
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/http/not_go18.go
@@ -0,0 +1,21 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.8
+
+package http
+
+import "net/http"
+
+func addOCTransport(trans http.RoundTripper) http.RoundTripper { return trans }
diff --git a/vendor/google.golang.org/api/transport/not_go19.go b/vendor/google.golang.org/api/transport/not_go19.go
new file mode 100644
index 0000000..4489bc9
--- /dev/null
+++ b/vendor/google.golang.org/api/transport/not_go19.go
@@ -0,0 +1,34 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.9
+
+package transport
+
+import (
+ "golang.org/x/net/context"
+ "golang.org/x/oauth2/google"
+ "google.golang.org/api/internal"
+ "google.golang.org/api/option"
+)
+
+// Creds constructs a google.DefaultCredentials from the information in the options,
+// or obtains the default credentials in the same way as google.FindDefaultCredentials.
+func Creds(ctx context.Context, opts ...option.ClientOption) (*google.DefaultCredentials, error) {
+ var ds internal.DialSettings
+ for _, opt := range opts {
+ opt.Apply(&ds)
+ }
+ return internal.Creds(ctx, &ds)
+}