1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-19 17:53:16 +00:00

vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-06-17 17:59:12 +01:00
parent 3f0789e2db
commit 08021c4636
2474 changed files with 435818 additions and 282709 deletions

View File

@@ -165,7 +165,6 @@ type ProjectsReposService struct {
type AuditConfig struct {
// AuditLogConfigs: The configuration for logging of each type of
// permission.
// Next ID: 4
AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
// Service: Specifies a service that will be enabled for audit
@@ -276,7 +275,7 @@ type Binding struct {
//
// * `user:{emailid}`: An email address that represents a specific
// Google
// account. For example, `alice@gmail.com` or `joe@example.com`.
// account. For example, `alice@gmail.com` .
//
//
// * `serviceAccount:{emailid}`: An email address that represents a
@@ -432,7 +431,7 @@ func (s *MirrorConfig) MarshalJSON() ([]byte, error) {
// specify access control policies for Cloud Platform resources.
//
//
// A `Policy` consists of a list of `bindings`. A `Binding` binds a list
// A `Policy` consists of a list of `bindings`. A `binding` binds a list
// of
// `members` to a `role`, where the members can be user accounts, Google
// groups,
@@ -440,7 +439,7 @@ func (s *MirrorConfig) MarshalJSON() ([]byte, error) {
// permissions
// defined by IAM.
//
// **Example**
// **JSON Example**
//
// {
// "bindings": [
@@ -451,7 +450,7 @@ func (s *MirrorConfig) MarshalJSON() ([]byte, error) {
// "group:admins@example.com",
// "domain:google.com",
//
// "serviceAccount:my-other-app@appspot.gserviceaccount.com",
// "serviceAccount:my-other-app@appspot.gserviceaccount.com"
// ]
// },
// {
@@ -461,6 +460,20 @@ func (s *MirrorConfig) MarshalJSON() ([]byte, error) {
// ]
// }
//
// **YAML Example**
//
// bindings:
// - members:
// - user:mike@example.com
// - group:admins@example.com
// - domain:google.com
// - serviceAccount:my-other-app@appspot.gserviceaccount.com
// role: roles/owner
// - members:
// - user:sean@example.com
// role: roles/viewer
//
//
// For a description of IAM and its features, see the
// [IAM developer's guide](https://cloud.google.com/iam/docs).
type Policy struct {
@@ -522,6 +535,102 @@ func (s *Policy) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ProjectConfig: Cloud Source Repositories configuration of a project.
type ProjectConfig struct {
// EnablePrivateKeyCheck: Reject a Git push that contains a private key.
EnablePrivateKeyCheck bool `json:"enablePrivateKeyCheck,omitempty"`
// Name: The name of the project. Values are of the form
// `projects/<project>`.
Name string `json:"name,omitempty"`
// PubsubConfigs: How this project publishes a change in the
// repositories through Cloud
// Pub/Sub. Keyed by the topic names.
PubsubConfigs map[string]PubsubConfig `json:"pubsubConfigs,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "EnablePrivateKeyCheck") 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. "EnablePrivateKeyCheck") 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 *ProjectConfig) MarshalJSON() ([]byte, error) {
type NoMethod ProjectConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PubsubConfig: Configuration to publish a Cloud Pub/Sub message.
type PubsubConfig struct {
// MessageFormat: The format of the Cloud Pub/Sub messages.
//
// Possible values:
// "MESSAGE_FORMAT_UNSPECIFIED" - Unspecified.
// "PROTOBUF" - The message payload is a serialized protocol buffer of
// SourceRepoEvent.
// "JSON" - The message payload is a JSON string of SourceRepoEvent.
MessageFormat string `json:"messageFormat,omitempty"`
// ServiceAccountEmail: Email address of the service account used for
// publishing Cloud Pub/Sub
// messages. This service account needs to be in the same project as
// the
// PubsubConfig. When added, the caller needs to
// have
// iam.serviceAccounts.actAs permission on this service account.
// If
// unspecified, it defaults to the compute engine default service
// account.
ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
// Topic: A topic of Cloud Pub/Sub. Values are of the
// form
// `projects/<project>/topics/<topic>`. The project needs to be the
// same
// project as this config is in.
Topic string `json:"topic,omitempty"`
// ForceSendFields is a list of field names (e.g. "MessageFormat") 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. "MessageFormat") 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 *PubsubConfig) MarshalJSON() ([]byte, error) {
type NoMethod PubsubConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Repo: A repository (or repo) is a Git repository storing versioned
// source content.
type Repo struct {
@@ -537,6 +646,11 @@ type Repo struct {
// eg, `projects/myproject/repos/name/with/slash`
Name string `json:"name,omitempty"`
// PubsubConfigs: How this repository publishes a change in the
// repository through Cloud
// Pub/Sub. Keyed by the topic names.
PubsubConfigs map[string]PubsubConfig `json:"pubsubConfigs,omitempty"`
// Size: The disk usage of the repo, in bytes. Read-only field. Size is
// only
// returned by GetRepo.
@@ -686,6 +800,358 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UpdateProjectConfigRequest: Request for UpdateProjectConfig.
type UpdateProjectConfigRequest struct {
// ProjectConfig: The new configuration for the project.
ProjectConfig *ProjectConfig `json:"projectConfig,omitempty"`
// UpdateMask: A FieldMask specifying which fields of the project_config
// to modify. Only
// the fields in the mask will be modified. If no mask is provided,
// this
// request is no-op.
UpdateMask string `json:"updateMask,omitempty"`
// ForceSendFields is a list of field names (e.g. "ProjectConfig") 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. "ProjectConfig") 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 *UpdateProjectConfigRequest) MarshalJSON() ([]byte, error) {
type NoMethod UpdateProjectConfigRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UpdateRepoRequest: Request for UpdateRepo.
type UpdateRepoRequest struct {
// Repo: The new configuration for the repository.
Repo *Repo `json:"repo,omitempty"`
// UpdateMask: A FieldMask specifying which fields of the repo to
// modify. Only the fields
// in the mask will be modified. If no mask is provided, this request
// is
// no-op.
UpdateMask string `json:"updateMask,omitempty"`
// ForceSendFields is a list of field names (e.g. "Repo") 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. "Repo") 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 *UpdateRepoRequest) MarshalJSON() ([]byte, error) {
type NoMethod UpdateRepoRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "sourcerepo.projects.getConfig":
type ProjectsGetConfigCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// GetConfig: Returns the Cloud Source Repositories configuration of the
// project.
func (r *ProjectsService) GetConfig(name string) *ProjectsGetConfigCall {
c := &ProjectsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
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 *ProjectsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsGetConfigCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ProjectsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsGetConfigCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ProjectsGetConfigCall) Context(ctx context.Context) *ProjectsGetConfigCall {
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 *ProjectsGetConfigCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsGetConfigCall) 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())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/config")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sourcerepo.projects.getConfig" call.
// Exactly one of *ProjectConfig or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *ProjectConfig.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 *ProjectsGetConfigCall) Do(opts ...googleapi.CallOption) (*ProjectConfig, 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 := &ProjectConfig{
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": "Returns the Cloud Source Repositories configuration of the project.",
// "flatPath": "v1/projects/{projectsId}/config",
// "httpMethod": "GET",
// "id": "sourcerepo.projects.getConfig",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the requested project. Values are of the form\n`projects/\u003cproject\u003e`.",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}/config",
// "response": {
// "$ref": "ProjectConfig"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/source.full_control",
// "https://www.googleapis.com/auth/source.read_only",
// "https://www.googleapis.com/auth/source.read_write"
// ]
// }
}
// method id "sourcerepo.projects.updateConfig":
type ProjectsUpdateConfigCall struct {
s *Service
name string
updateprojectconfigrequest *UpdateProjectConfigRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// UpdateConfig: Updates the Cloud Source Repositories configuration of
// the project.
func (r *ProjectsService) UpdateConfig(name string, updateprojectconfigrequest *UpdateProjectConfigRequest) *ProjectsUpdateConfigCall {
c := &ProjectsUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.updateprojectconfigrequest = updateprojectconfigrequest
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 *ProjectsUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateConfigCall {
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 *ProjectsUpdateConfigCall) Context(ctx context.Context) *ProjectsUpdateConfigCall {
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 *ProjectsUpdateConfigCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUpdateConfigCall) 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
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateprojectconfigrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/config")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sourcerepo.projects.updateConfig" call.
// Exactly one of *ProjectConfig or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *ProjectConfig.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 *ProjectsUpdateConfigCall) Do(opts ...googleapi.CallOption) (*ProjectConfig, 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 := &ProjectConfig{
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": "Updates the Cloud Source Repositories configuration of the project.",
// "flatPath": "v1/projects/{projectsId}/config",
// "httpMethod": "PATCH",
// "id": "sourcerepo.projects.updateConfig",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the requested project. Values are of the form\n`projects/\u003cproject\u003e`.",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}/config",
// "request": {
// "$ref": "UpdateProjectConfigRequest"
// },
// "response": {
// "$ref": "ProjectConfig"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/source.full_control",
// "https://www.googleapis.com/auth/source.read_only",
// "https://www.googleapis.com/auth/source.read_write"
// ]
// }
}
// method id "sourcerepo.projects.repos.create":
type ProjectsReposCreateCall struct {
@@ -1436,6 +1902,144 @@ func (c *ProjectsReposListCall) Pages(ctx context.Context, f func(*ListReposResp
}
}
// method id "sourcerepo.projects.repos.patch":
type ProjectsReposPatchCall struct {
s *Service
name string
updatereporequest *UpdateRepoRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Patch: Updates information about a repo.
func (r *ProjectsReposService) Patch(name string, updatereporequest *UpdateRepoRequest) *ProjectsReposPatchCall {
c := &ProjectsReposPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.updatereporequest = updatereporequest
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 *ProjectsReposPatchCall) Fields(s ...googleapi.Field) *ProjectsReposPatchCall {
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 *ProjectsReposPatchCall) Context(ctx context.Context) *ProjectsReposPatchCall {
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 *ProjectsReposPatchCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsReposPatchCall) 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
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatereporequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sourcerepo.projects.repos.patch" call.
// Exactly one of *Repo or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Repo.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 *ProjectsReposPatchCall) Do(opts ...googleapi.CallOption) (*Repo, 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 := &Repo{
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": "Updates information about a repo.",
// "flatPath": "v1/projects/{projectsId}/repos/{reposId}",
// "httpMethod": "PATCH",
// "id": "sourcerepo.projects.repos.patch",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the requested repository. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.",
// "location": "path",
// "pattern": "^projects/[^/]+/repos/.+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}",
// "request": {
// "$ref": "UpdateRepoRequest"
// },
// "response": {
// "$ref": "Repo"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/source.full_control",
// "https://www.googleapis.com/auth/source.read_only",
// "https://www.googleapis.com/auth/source.read_write"
// ]
// }
}
// method id "sourcerepo.projects.repos.setIamPolicy":
type ProjectsReposSetIamPolicyCall struct {