| // Copyright 2020 Google LLC. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Code generated file. DO NOT EDIT. |
| |
| // Package monorail provides access to the . |
| // |
| // For product documentation, see: https://chromium.googlesource.com/infra/infra/+doc/master/appengine/monorail/doc/api.md |
| // |
| // # Creating a client |
| // |
| // Usage example: |
| // |
| // import "go.skia.org/infra/go/monorail/v1" |
| // ... |
| // ctx := context.Background() |
| // monorailService, err := monorail.NewService(ctx) |
| // |
| // In this example, Google Application Default Credentials are used for authentication. |
| // |
| // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. |
| // |
| // # Other authentication options |
| // |
| // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: |
| // |
| // monorailService, err := monorail.NewService(ctx, option.WithAPIKey("AIza...")) |
| // |
| // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: |
| // |
| // config := &oauth2.Config{...} |
| // // ... |
| // token, err := config.Exchange(ctx, ...) |
| // monorailService, err := monorail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) |
| // |
| // See https://godoc.org/google.golang.org/api/option/ for details on options. |
| package monorail // import "go.skia.org/infra/go/monorail/v1" |
| |
| import ( |
| "bytes" |
| "context" |
| "encoding/json" |
| "errors" |
| "fmt" |
| "io" |
| "net/http" |
| "net/url" |
| "strconv" |
| "strings" |
| |
| gensupport "github.com/skia-dev/google-api-go-client/gensupport" |
| googleapi "google.golang.org/api/googleapi" |
| option "google.golang.org/api/option" |
| htransport "google.golang.org/api/transport/http" |
| ) |
| |
| // Always reference these packages, just in case the auto-generated code |
| // below doesn't. |
| var _ = bytes.NewBuffer |
| var _ = strconv.Itoa |
| var _ = fmt.Sprintf |
| var _ = json.NewDecoder |
| var _ = io.Copy |
| var _ = url.Parse |
| var _ = gensupport.MarshalJSON |
| var _ = googleapi.Version |
| var _ = errors.New |
| var _ = strings.Replace |
| var _ = context.Canceled |
| |
| const apiId = "monorail:v1" |
| const apiName = "monorail" |
| const apiVersion = "v1" |
| const basePath = "https://monorail-prod.appspot.com/_ah/api/monorail/v1/" |
| |
| // OAuth2 scopes used by this API. |
| const ( |
| // https://www.googleapis.com/auth/userinfo.email |
| UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" |
| ) |
| |
| // NewService creates a new Service. |
| func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { |
| scopesOption := option.WithScopes( |
| "https://www.googleapis.com/auth/userinfo.email", |
| ) |
| // NOTE: prepend, so we don't override user-specified scopes. |
| opts = append([]option.ClientOption{scopesOption}, opts...) |
| client, endpoint, err := htransport.NewClient(ctx, opts...) |
| if err != nil { |
| return nil, err |
| } |
| s, err := New(client) |
| if err != nil { |
| return nil, err |
| } |
| if endpoint != "" { |
| s.BasePath = endpoint |
| } |
| return s, nil |
| } |
| |
| // New creates a new Service. It uses the provided http.Client for requests. |
| // |
| // Deprecated: please use NewService instead. |
| // To provide a custom HTTP client, use option.WithHTTPClient. |
| // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. |
| func New(client *http.Client) (*Service, error) { |
| if client == nil { |
| return nil, errors.New("client is nil") |
| } |
| s := &Service{client: client, BasePath: basePath} |
| s.Approvals = NewApprovalsService(s) |
| s.Components = NewComponentsService(s) |
| s.Groups = NewGroupsService(s) |
| s.Issues = NewIssuesService(s) |
| s.Users = NewUsersService(s) |
| return s, nil |
| } |
| |
| type Service struct { |
| client *http.Client |
| BasePath string // API endpoint base URL |
| UserAgent string // optional additional User-Agent fragment |
| |
| Approvals *ApprovalsService |
| |
| Components *ComponentsService |
| |
| Groups *GroupsService |
| |
| Issues *IssuesService |
| |
| Users *UsersService |
| } |
| |
| func (s *Service) userAgent() string { |
| if s.UserAgent == "" { |
| return googleapi.UserAgent |
| } |
| return googleapi.UserAgent + " " + s.UserAgent |
| } |
| |
| func NewApprovalsService(s *Service) *ApprovalsService { |
| rs := &ApprovalsService{s: s} |
| rs.Comments = NewApprovalsCommentsService(s) |
| return rs |
| } |
| |
| type ApprovalsService struct { |
| s *Service |
| |
| Comments *ApprovalsCommentsService |
| } |
| |
| func NewApprovalsCommentsService(s *Service) *ApprovalsCommentsService { |
| rs := &ApprovalsCommentsService{s: s} |
| return rs |
| } |
| |
| type ApprovalsCommentsService struct { |
| s *Service |
| } |
| |
| func NewComponentsService(s *Service) *ComponentsService { |
| rs := &ComponentsService{s: s} |
| return rs |
| } |
| |
| type ComponentsService struct { |
| s *Service |
| } |
| |
| func NewGroupsService(s *Service) *GroupsService { |
| rs := &GroupsService{s: s} |
| rs.Settings = NewGroupsSettingsService(s) |
| return rs |
| } |
| |
| type GroupsService struct { |
| s *Service |
| |
| Settings *GroupsSettingsService |
| } |
| |
| func NewGroupsSettingsService(s *Service) *GroupsSettingsService { |
| rs := &GroupsSettingsService{s: s} |
| return rs |
| } |
| |
| type GroupsSettingsService struct { |
| s *Service |
| } |
| |
| func NewIssuesService(s *Service) *IssuesService { |
| rs := &IssuesService{s: s} |
| rs.Comments = NewIssuesCommentsService(s) |
| return rs |
| } |
| |
| type IssuesService struct { |
| s *Service |
| |
| Comments *IssuesCommentsService |
| } |
| |
| func NewIssuesCommentsService(s *Service) *IssuesCommentsService { |
| rs := &IssuesCommentsService{s: s} |
| return rs |
| } |
| |
| type IssuesCommentsService struct { |
| s *Service |
| } |
| |
| func NewUsersService(s *Service) *UsersService { |
| rs := &UsersService{s: s} |
| return rs |
| } |
| |
| type UsersService struct { |
| s *Service |
| } |
| |
| // ProtoApiPb2V1Approval: Approval Value details |
| type ProtoApiPb2V1Approval struct { |
| ApprovalName string `json:"approvalName,omitempty"` |
| |
| // Approvers: Atomic person. |
| Approvers []*ProtoApiPb2V1AtomPerson `json:"approvers,omitempty"` |
| |
| PhaseName string `json:"phaseName,omitempty"` |
| |
| SetOn string `json:"setOn,omitempty"` |
| |
| // Setter: Atomic person. |
| Setter *ProtoApiPb2V1AtomPerson `json:"setter,omitempty"` |
| |
| // Possible values: |
| // "approved" |
| // "nA" |
| // "needInfo" |
| // "needsReview" |
| // "notApproved" |
| // "notSet" |
| // "reviewRequested" |
| // "reviewStarted" |
| Status string `json:"status,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalName") 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. "ApprovalName") 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 *ProtoApiPb2V1Approval) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Approval |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ApprovalCommentWrapper: Approval comment details. |
| type ProtoApiPb2V1ApprovalCommentWrapper struct { |
| // ApprovalUpdates: Approval update. |
| ApprovalUpdates *ProtoApiPb2V1ApprovalUpdate `json:"approvalUpdates,omitempty"` |
| |
| // Attachments: Issue attachment. |
| Attachments []*ProtoApiPb2V1Attachment `json:"attachments,omitempty"` |
| |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| CanDelete bool `json:"canDelete,omitempty"` |
| |
| Content string `json:"content,omitempty"` |
| |
| // DeletedBy: Atomic person. |
| DeletedBy *ProtoApiPb2V1AtomPerson `json:"deletedBy,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| IsDescription bool `json:"is_description,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalUpdates") 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. "ApprovalUpdates") 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 *ProtoApiPb2V1ApprovalCommentWrapper) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ApprovalCommentWrapper |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ApprovalUpdate: Approval update. |
| type ProtoApiPb2V1ApprovalUpdate struct { |
| Approvers []string `json:"approvers,omitempty"` |
| |
| // FieldValues: Custom field values. |
| FieldValues []*ProtoApiPb2V1FieldValue `json:"fieldValues,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Approvers") 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. "Approvers") 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 *ProtoApiPb2V1ApprovalUpdate) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ApprovalUpdate |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ApprovalsCommentsInsertResponse: Response message of |
| // request to insert an isuse's comments. |
| type ProtoApiPb2V1ApprovalsCommentsInsertResponse struct { |
| ApprovalName string `json:"approvalName,omitempty"` |
| |
| // ApprovalUpdates: Approval update. |
| ApprovalUpdates *ProtoApiPb2V1ApprovalUpdate `json:"approvalUpdates,omitempty"` |
| |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| CanDelete bool `json:"canDelete,omitempty"` |
| |
| Content string `json:"content,omitempty"` |
| |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalName") 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. "ApprovalName") 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 *ProtoApiPb2V1ApprovalsCommentsInsertResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ApprovalsCommentsInsertResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ApprovalsCommentsListResponse: Response message of |
| // request to list an approval's comments. |
| type ProtoApiPb2V1ApprovalsCommentsListResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // Items: Approval comment details. |
| Items []*ProtoApiPb2V1ApprovalCommentWrapper `json:"items,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| TotalResults int64 `json:"totalResults,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1ApprovalsCommentsListResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ApprovalsCommentsListResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1AtomPerson: Atomic person. |
| type ProtoApiPb2V1AtomPerson struct { |
| EmailBouncing bool `json:"email_bouncing,omitempty"` |
| |
| HtmlLink string `json:"htmlLink,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| LastVisitDaysAgo int64 `json:"last_visit_days_ago,omitempty,string"` |
| |
| Name string `json:"name,omitempty"` |
| |
| VacationMessage string `json:"vacation_message,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "EmailBouncing") 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. "EmailBouncing") 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 *ProtoApiPb2V1AtomPerson) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1AtomPerson |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Attachment: Issue attachment. |
| type ProtoApiPb2V1Attachment struct { |
| AttachmentId int64 `json:"attachmentId,omitempty,string"` |
| |
| FileName string `json:"fileName,omitempty"` |
| |
| FileSize int64 `json:"fileSize,omitempty"` |
| |
| IsDeleted bool `json:"isDeleted,omitempty"` |
| |
| Mimetype string `json:"mimetype,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "AttachmentId") 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. "AttachmentId") 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 *ProtoApiPb2V1Attachment) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Attachment |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Component: Component PB. |
| type ProtoApiPb2V1Component struct { |
| Admin []string `json:"admin,omitempty"` |
| |
| Cc []string `json:"cc,omitempty"` |
| |
| ComponentId int64 `json:"componentId,omitempty"` |
| |
| ComponentPath string `json:"componentPath,omitempty"` |
| |
| Created string `json:"created,omitempty"` |
| |
| Creator string `json:"creator,omitempty"` |
| |
| Deprecated bool `json:"deprecated,omitempty"` |
| |
| Description string `json:"description,omitempty"` |
| |
| Modified string `json:"modified,omitempty"` |
| |
| Modifier string `json:"modifier,omitempty"` |
| |
| ProjectName string `json:"projectName,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Admin") 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. "Admin") 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 *ProtoApiPb2V1Component) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Component |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ComponentCreateRequestBody: Request body to create a |
| // component. |
| type ProtoApiPb2V1ComponentCreateRequestBody struct { |
| Admin []string `json:"admin,omitempty"` |
| |
| Cc []string `json:"cc,omitempty"` |
| |
| Deprecated bool `json:"deprecated,omitempty"` |
| |
| Description string `json:"description,omitempty"` |
| |
| ParentPath string `json:"parentPath,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Admin") 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. "Admin") 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 *ProtoApiPb2V1ComponentCreateRequestBody) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ComponentCreateRequestBody |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ComponentUpdate: Component update. |
| type ProtoApiPb2V1ComponentUpdate struct { |
| Admin []string `json:"admin,omitempty"` |
| |
| Cc []string `json:"cc,omitempty"` |
| |
| Deprecated bool `json:"deprecated,omitempty"` |
| |
| Description string `json:"description,omitempty"` |
| |
| // Possible values: |
| // "ADMIN" |
| // "CC" |
| // "DEPRECATED" |
| // "DESCRIPTION" |
| // "LEAF_NAME" |
| Field string `json:"field,omitempty"` |
| |
| LeafName string `json:"leafName,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Admin") 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. "Admin") 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 *ProtoApiPb2V1ComponentUpdate) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ComponentUpdate |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ComponentUpdateRequestBody: Request body to update a |
| // component. |
| type ProtoApiPb2V1ComponentUpdateRequestBody struct { |
| // Updates: Component update. |
| Updates []*ProtoApiPb2V1ComponentUpdate `json:"updates,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Updates") 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. "Updates") 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 *ProtoApiPb2V1ComponentUpdateRequestBody) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ComponentUpdateRequestBody |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ComponentsListResponse: Response to list components. |
| type ProtoApiPb2V1ComponentsListResponse struct { |
| // Components: Component PB. |
| Components []*ProtoApiPb2V1Component `json:"components,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Components") 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. "Components") 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 *ProtoApiPb2V1ComponentsListResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ComponentsListResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ErrorMessage: Request error. |
| type ProtoApiPb2V1ErrorMessage struct { |
| Code int64 `json:"code,omitempty"` |
| |
| Message string `json:"message,omitempty"` |
| |
| Reason string `json:"reason,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") to include in API |
| // requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. However, any field with an |
| // empty value appearing in NullFields will be sent to the server as |
| // null. It is an error if a field in this list has a non-empty value. |
| // This may be used to include null fields in Patch requests. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s *ProtoApiPb2V1ErrorMessage) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ErrorMessage |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1FieldValue: Custom field values. |
| type ProtoApiPb2V1FieldValue struct { |
| ApprovalName string `json:"approvalName,omitempty"` |
| |
| Derived bool `json:"derived,omitempty"` |
| |
| FieldName string `json:"fieldName,omitempty"` |
| |
| FieldValue string `json:"fieldValue,omitempty"` |
| |
| // Possible values: |
| // "add" (default) |
| // "clear" |
| // "remove" |
| Operator string `json:"operator,omitempty"` |
| |
| PhaseName string `json:"phaseName,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalName") 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. "ApprovalName") 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 *ProtoApiPb2V1FieldValue) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1FieldValue |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1GroupCitizens: Group members and owners. |
| type ProtoApiPb2V1GroupCitizens struct { |
| GroupMembers []string `json:"groupMembers,omitempty"` |
| |
| GroupOwners []string `json:"groupOwners,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "GroupMembers") 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. "GroupMembers") 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 *ProtoApiPb2V1GroupCitizens) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1GroupCitizens |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1GroupsCreateResponse: Response message of request to |
| // create a group. |
| type ProtoApiPb2V1GroupsCreateResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| GroupID int64 `json:"groupID,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1GroupsCreateResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1GroupsCreateResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1GroupsGetResponse: Response message of request to create |
| // a group. |
| type ProtoApiPb2V1GroupsGetResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| GroupID int64 `json:"groupID,omitempty"` |
| |
| GroupMembers []string `json:"groupMembers,omitempty"` |
| |
| GroupOwners []string `json:"groupOwners,omitempty"` |
| |
| // GroupSettings: User group settings. |
| GroupSettings *ProtoApiPb2V1UserGroupSettingsWrapper `json:"groupSettings,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1GroupsGetResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1GroupsGetResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1GroupsSettingsListResponse: Response message of request |
| // to list group settings. |
| type ProtoApiPb2V1GroupsSettingsListResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // GroupSettings: User group settings. |
| GroupSettings []*ProtoApiPb2V1UserGroupSettingsWrapper `json:"groupSettings,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1GroupsSettingsListResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1GroupsSettingsListResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1GroupsUpdateResponse: Response message of request to |
| // update a group. |
| type ProtoApiPb2V1GroupsUpdateResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1GroupsUpdateResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1GroupsUpdateResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssueCommentWrapper: Issue comment details. |
| type ProtoApiPb2V1IssueCommentWrapper struct { |
| // Attachments: Issue attachment. |
| Attachments []*ProtoApiPb2V1Attachment `json:"attachments,omitempty"` |
| |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| CanDelete bool `json:"canDelete,omitempty"` |
| |
| Content string `json:"content,omitempty"` |
| |
| // DeletedBy: Atomic person. |
| DeletedBy *ProtoApiPb2V1AtomPerson `json:"deletedBy,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| IsDescription bool `json:"is_description,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| // Updates: Issue update. |
| Updates *ProtoApiPb2V1Update `json:"updates,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Attachments") 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. "Attachments") 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 *ProtoApiPb2V1IssueCommentWrapper) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssueCommentWrapper |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssueRef: Issue reference. |
| type ProtoApiPb2V1IssueRef struct { |
| IssueId int64 `json:"issueId,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| ProjectId string `json:"projectId,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "IssueId") 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. "IssueId") 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 *ProtoApiPb2V1IssueRef) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssueRef |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssueWrapper: Issue details. |
| type ProtoApiPb2V1IssueWrapper struct { |
| // ApprovalValues: Approval Value details |
| ApprovalValues []*ProtoApiPb2V1Approval `json:"approvalValues,omitempty"` |
| |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| // BlockedOn: Issue reference. |
| BlockedOn []*ProtoApiPb2V1IssueRef `json:"blockedOn,omitempty"` |
| |
| // Blocking: Issue reference. |
| Blocking []*ProtoApiPb2V1IssueRef `json:"blocking,omitempty"` |
| |
| CanComment bool `json:"canComment,omitempty"` |
| |
| CanEdit bool `json:"canEdit,omitempty"` |
| |
| // Cc: Atomic person. |
| Cc []*ProtoApiPb2V1AtomPerson `json:"cc,omitempty"` |
| |
| Closed string `json:"closed,omitempty"` |
| |
| ComponentModified string `json:"component_modified,omitempty"` |
| |
| Components []string `json:"components,omitempty"` |
| |
| Description string `json:"description,omitempty"` |
| |
| // FieldValues: Custom field values. |
| FieldValues []*ProtoApiPb2V1FieldValue `json:"fieldValues,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Labels []string `json:"labels,omitempty"` |
| |
| // MergedInto: Issue reference. |
| MergedInto *ProtoApiPb2V1IssueRef `json:"mergedInto,omitempty"` |
| |
| // Owner: Atomic person. |
| Owner *ProtoApiPb2V1AtomPerson `json:"owner,omitempty"` |
| |
| OwnerModified string `json:"owner_modified,omitempty"` |
| |
| // Phases: Issue phase details. |
| Phases []*ProtoApiPb2V1Phase `json:"phases,omitempty"` |
| |
| ProjectId string `json:"projectId,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| Starred bool `json:"starred,omitempty"` |
| |
| Stars int64 `json:"stars,omitempty"` |
| |
| // Possible values: |
| // "closed" |
| // "open" |
| State string `json:"state,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| StatusModified string `json:"status_modified,omitempty"` |
| |
| Summary string `json:"summary,omitempty"` |
| |
| Title string `json:"title,omitempty"` |
| |
| Updated string `json:"updated,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalValues") 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. "ApprovalValues") 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 *ProtoApiPb2V1IssueWrapper) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssueWrapper |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssuesCommentsDeleteResponse: Response message of |
| // request to delete/undelete an issue's comments. |
| type ProtoApiPb2V1IssuesCommentsDeleteResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1IssuesCommentsDeleteResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssuesCommentsDeleteResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssuesCommentsInsertResponse: Response message of |
| // request to insert an issue's comments. |
| type ProtoApiPb2V1IssuesCommentsInsertResponse struct { |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| CanDelete bool `json:"canDelete,omitempty"` |
| |
| Content string `json:"content,omitempty"` |
| |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| // Updates: Issue update. |
| Updates *ProtoApiPb2V1Update `json:"updates,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Author") 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. "Author") 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 *ProtoApiPb2V1IssuesCommentsInsertResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssuesCommentsInsertResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssuesCommentsListResponse: Response message of request |
| // to list an issue's comments. |
| type ProtoApiPb2V1IssuesCommentsListResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // Items: Issue comment details. |
| Items []*ProtoApiPb2V1IssueCommentWrapper `json:"items,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| TotalResults int64 `json:"totalResults,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1IssuesCommentsListResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssuesCommentsListResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssuesGetInsertResponse: Response message of request to |
| // get/insert an issue. |
| type ProtoApiPb2V1IssuesGetInsertResponse struct { |
| // ApprovalValues: Approval Value details |
| ApprovalValues []*ProtoApiPb2V1Approval `json:"approvalValues,omitempty"` |
| |
| // Author: Atomic person. |
| Author *ProtoApiPb2V1AtomPerson `json:"author,omitempty"` |
| |
| // BlockedOn: Issue reference. |
| BlockedOn []*ProtoApiPb2V1IssueRef `json:"blockedOn,omitempty"` |
| |
| // Blocking: Issue reference. |
| Blocking []*ProtoApiPb2V1IssueRef `json:"blocking,omitempty"` |
| |
| CanComment bool `json:"canComment,omitempty"` |
| |
| CanEdit bool `json:"canEdit,omitempty"` |
| |
| // Cc: Atomic person. |
| Cc []*ProtoApiPb2V1AtomPerson `json:"cc,omitempty"` |
| |
| Closed string `json:"closed,omitempty"` |
| |
| ComponentModified string `json:"component_modified,omitempty"` |
| |
| Components []string `json:"components,omitempty"` |
| |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // FieldValues: Custom field values. |
| FieldValues []*ProtoApiPb2V1FieldValue `json:"fieldValues,omitempty"` |
| |
| Id int64 `json:"id,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Labels []string `json:"labels,omitempty"` |
| |
| // MergedInto: Issue reference. |
| MergedInto *ProtoApiPb2V1IssueRef `json:"mergedInto,omitempty"` |
| |
| // Owner: Atomic person. |
| Owner *ProtoApiPb2V1AtomPerson `json:"owner,omitempty"` |
| |
| OwnerModified string `json:"owner_modified,omitempty"` |
| |
| // Phases: Issue phase details. |
| Phases []*ProtoApiPb2V1Phase `json:"phases,omitempty"` |
| |
| ProjectId string `json:"projectId,omitempty"` |
| |
| Published string `json:"published,omitempty"` |
| |
| Starred bool `json:"starred,omitempty"` |
| |
| Stars int64 `json:"stars,omitempty"` |
| |
| // Possible values: |
| // "closed" |
| // "open" |
| State string `json:"state,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| StatusModified string `json:"status_modified,omitempty"` |
| |
| Summary string `json:"summary,omitempty"` |
| |
| Title string `json:"title,omitempty"` |
| |
| Updated string `json:"updated,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "ApprovalValues") 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. "ApprovalValues") 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 *ProtoApiPb2V1IssuesGetInsertResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssuesGetInsertResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1IssuesListResponse: Response message of request to list |
| // issues. |
| type ProtoApiPb2V1IssuesListResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| // Items: Issue details. |
| Items []*ProtoApiPb2V1IssueWrapper `json:"items,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| TotalResults int64 `json:"totalResults,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1IssuesListResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1IssuesListResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Label: Issue label. |
| type ProtoApiPb2V1Label struct { |
| Description string `json:"description,omitempty"` |
| |
| Label string `json:"label,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include |
| // in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. However, any field with |
| // an empty value appearing in NullFields will be sent to the server as |
| // null. It is an error if a field in this list has a non-empty value. |
| // This may be used to include null fields in Patch requests. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s *ProtoApiPb2V1Label) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Label |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Phase: Issue phase details. |
| type ProtoApiPb2V1Phase struct { |
| PhaseName string `json:"phaseName,omitempty"` |
| |
| Rank int64 `json:"rank,omitempty,string"` |
| |
| // ForceSendFields is a list of field names (e.g. "PhaseName") 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. "PhaseName") 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 *ProtoApiPb2V1Phase) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Phase |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ProjectIssueConfig: Issue configuration of project. |
| type ProtoApiPb2V1ProjectIssueConfig struct { |
| DefaultColumns []string `json:"defaultColumns,omitempty"` |
| |
| DefaultPromptForMembers int64 `json:"defaultPromptForMembers,omitempty"` |
| |
| DefaultPromptForNonMembers int64 `json:"defaultPromptForNonMembers,omitempty"` |
| |
| DefaultSorting []string `json:"defaultSorting,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| // Labels: Issue label. |
| Labels []*ProtoApiPb2V1Label `json:"labels,omitempty"` |
| |
| // Prompts: Default issue template values. |
| Prompts []*ProtoApiPb2V1Prompt `json:"prompts,omitempty"` |
| |
| RestrictToKnown bool `json:"restrictToKnown,omitempty"` |
| |
| // Statuses: Issue status. |
| Statuses []*ProtoApiPb2V1Status `json:"statuses,omitempty"` |
| |
| UsersCanSetLabels bool `json:"usersCanSetLabels,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "DefaultColumns") 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. "DefaultColumns") 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 *ProtoApiPb2V1ProjectIssueConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ProjectIssueConfig |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1ProjectWrapper: Project details. |
| type ProtoApiPb2V1ProjectWrapper struct { |
| Description string `json:"description,omitempty"` |
| |
| ExternalId string `json:"externalId,omitempty"` |
| |
| HtmlLink string `json:"htmlLink,omitempty"` |
| |
| // IssuesConfig: Issue configuration of project. |
| IssuesConfig *ProtoApiPb2V1ProjectIssueConfig `json:"issuesConfig,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| // Members: Atomic person. |
| Members []*ProtoApiPb2V1AtomPerson `json:"members,omitempty"` |
| |
| Name string `json:"name,omitempty"` |
| |
| RepositoryUrls []string `json:"repositoryUrls,omitempty"` |
| |
| // Possible values: |
| // "contributor" |
| // "member" |
| // "owner" |
| Role string `json:"role,omitempty"` |
| |
| Summary string `json:"summary,omitempty"` |
| |
| VersionControlSystem string `json:"versionControlSystem,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include |
| // in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. However, any field with |
| // an empty value appearing in NullFields will be sent to the server as |
| // null. It is an error if a field in this list has a non-empty value. |
| // This may be used to include null fields in Patch requests. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s *ProtoApiPb2V1ProjectWrapper) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1ProjectWrapper |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Prompt: Default issue template values. |
| type ProtoApiPb2V1Prompt struct { |
| ComponentRequired bool `json:"componentRequired,omitempty"` |
| |
| DefaultToMember bool `json:"defaultToMember,omitempty"` |
| |
| Description string `json:"description,omitempty"` |
| |
| Labels []string `json:"labels,omitempty"` |
| |
| MembersOnly bool `json:"membersOnly,omitempty"` |
| |
| Name string `json:"name,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| Title string `json:"title,omitempty"` |
| |
| TitleMustBeEdited bool `json:"titleMustBeEdited,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ComponentRequired") |
| // 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. "ComponentRequired") 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 *ProtoApiPb2V1Prompt) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Prompt |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Status: Issue status. |
| type ProtoApiPb2V1Status struct { |
| Description string `json:"description,omitempty"` |
| |
| MeansOpen bool `json:"meansOpen,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include |
| // in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. However, any field with |
| // an empty value appearing in NullFields will be sent to the server as |
| // null. It is an error if a field in this list has a non-empty value. |
| // This may be used to include null fields in Patch requests. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s *ProtoApiPb2V1Status) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Status |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1Update: Issue update. |
| type ProtoApiPb2V1Update struct { |
| BlockedOn []string `json:"blockedOn,omitempty"` |
| |
| Blocking []string `json:"blocking,omitempty"` |
| |
| Cc []string `json:"cc,omitempty"` |
| |
| Components []string `json:"components,omitempty"` |
| |
| // FieldValues: Custom field values. |
| FieldValues []*ProtoApiPb2V1FieldValue `json:"fieldValues,omitempty"` |
| |
| IsDescription bool `json:"is_description,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| Labels []string `json:"labels,omitempty"` |
| |
| MergedInto string `json:"mergedInto,omitempty"` |
| |
| MoveToProject string `json:"moveToProject,omitempty"` |
| |
| Owner string `json:"owner,omitempty"` |
| |
| Status string `json:"status,omitempty"` |
| |
| Summary string `json:"summary,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "BlockedOn") 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. "BlockedOn") 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 *ProtoApiPb2V1Update) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1Update |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1UserGroupSettingsWrapper: User group settings. |
| type ProtoApiPb2V1UserGroupSettingsWrapper struct { |
| // Possible values: |
| // "BAGGINS" |
| // "CHROME_INFRA_AUTH" |
| // "COMPUTED" |
| // "MDB" |
| ExtGroupType string `json:"ext_group_type,omitempty"` |
| |
| GroupName string `json:"groupName,omitempty"` |
| |
| LastSyncTime int64 `json:"last_sync_time,omitempty"` |
| |
| // Possible values: |
| // "ANYONE" |
| // "MEMBERS" (default) |
| // "OWNERS" |
| WhoCanViewMembers string `json:"who_can_view_members,omitempty"` |
| |
| // ForceSendFields is a list of field names (e.g. "ExtGroupType") 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. "ExtGroupType") 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 *ProtoApiPb2V1UserGroupSettingsWrapper) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1UserGroupSettingsWrapper |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProtoApiPb2V1UsersGetResponse: Response message of request to get a |
| // user. |
| type ProtoApiPb2V1UsersGetResponse struct { |
| // Error: Request error. |
| Error *ProtoApiPb2V1ErrorMessage `json:"error,omitempty"` |
| |
| Id string `json:"id,omitempty"` |
| |
| Kind string `json:"kind,omitempty"` |
| |
| // Projects: Project details. |
| Projects []*ProtoApiPb2V1ProjectWrapper `json:"projects,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the |
| // server. |
| googleapi.ServerResponse `json:"-"` |
| |
| // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *ProtoApiPb2V1UsersGetResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ProtoApiPb2V1UsersGetResponse |
| raw := NoMethod(*s) |
| return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) |
| } |
| |
| // method id "monorail.approvals.comments.insert": |
| |
| type ApprovalsCommentsInsertCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| approvalName string |
| protoapipb2v1approvalcommentwrapper *ProtoApiPb2V1ApprovalCommentWrapper |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Insert: Add an approval comment. |
| func (r *ApprovalsCommentsService) Insert(projectId string, issueId int64, approvalName string, protoapipb2v1approvalcommentwrapper *ProtoApiPb2V1ApprovalCommentWrapper) *ApprovalsCommentsInsertCall { |
| c := &ApprovalsCommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| c.approvalName = approvalName |
| c.protoapipb2v1approvalcommentwrapper = protoapipb2v1approvalcommentwrapper |
| return c |
| } |
| |
| // SendEmail sets the optional parameter "sendEmail": |
| func (c *ApprovalsCommentsInsertCall) SendEmail(sendEmail bool) *ApprovalsCommentsInsertCall { |
| c.urlParams_.Set("sendEmail", fmt.Sprint(sendEmail)) |
| 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 *ApprovalsCommentsInsertCall) Fields(s ...googleapi.Field) *ApprovalsCommentsInsertCall { |
| 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 *ApprovalsCommentsInsertCall) Context(ctx context.Context) *ApprovalsCommentsInsertCall { |
| 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 *ApprovalsCommentsInsertCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ApprovalsCommentsInsertCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1approvalcommentwrapper) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/approvals/{approvalName}/comments") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| "approvalName": c.approvalName, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.approvals.comments.insert" call. |
| // Exactly one of *ProtoApiPb2V1ApprovalsCommentsInsertResponse or error |
| // will be non-nil. Any non-2xx status code is an error. Response |
| // headers are in either |
| // *ProtoApiPb2V1ApprovalsCommentsInsertResponse.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 *ApprovalsCommentsInsertCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1ApprovalsCommentsInsertResponse, 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 := &ProtoApiPb2V1ApprovalsCommentsInsertResponse{ |
| 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": "Add an approval comment.", |
| // "httpMethod": "POST", |
| // "id": "monorail.approvals.comments.insert", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId", |
| // "approvalName" |
| // ], |
| // "parameters": { |
| // "approvalName": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "sendEmail": { |
| // "location": "query", |
| // "type": "boolean" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/approvals/{approvalName}/comments", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1ApprovalCommentWrapper", |
| // "parameterName": "resource" |
| // }, |
| // "response": { |
| // "$ref": "ProtoApiPb2V1ApprovalsCommentsInsertResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.approvals.comments.list": |
| |
| type ApprovalsCommentsListCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| approvalName string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: List all comments for an issue approval. |
| func (r *ApprovalsCommentsService) List(projectId string, issueId int64, approvalName string) *ApprovalsCommentsListCall { |
| c := &ApprovalsCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| c.approvalName = approvalName |
| return c |
| } |
| |
| // MaxResults sets the optional parameter "maxResults": |
| func (c *ApprovalsCommentsListCall) MaxResults(maxResults int64) *ApprovalsCommentsListCall { |
| c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) |
| return c |
| } |
| |
| // StartIndex sets the optional parameter "startIndex": |
| func (c *ApprovalsCommentsListCall) StartIndex(startIndex int64) *ApprovalsCommentsListCall { |
| c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) |
| 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 *ApprovalsCommentsListCall) Fields(s ...googleapi.Field) *ApprovalsCommentsListCall { |
| 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 *ApprovalsCommentsListCall) IfNoneMatch(entityTag string) *ApprovalsCommentsListCall { |
| 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 *ApprovalsCommentsListCall) Context(ctx context.Context) *ApprovalsCommentsListCall { |
| 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 *ApprovalsCommentsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ApprovalsCommentsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/approvals/{approvalName}/comments") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| "approvalName": c.approvalName, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.approvals.comments.list" call. |
| // Exactly one of *ProtoApiPb2V1ApprovalsCommentsListResponse or error |
| // will be non-nil. Any non-2xx status code is an error. Response |
| // headers are in either |
| // *ProtoApiPb2V1ApprovalsCommentsListResponse.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 *ApprovalsCommentsListCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1ApprovalsCommentsListResponse, 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 := &ProtoApiPb2V1ApprovalsCommentsListResponse{ |
| 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": "List all comments for an issue approval.", |
| // "httpMethod": "GET", |
| // "id": "monorail.approvals.comments.list", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId", |
| // "approvalName" |
| // ], |
| // "parameters": { |
| // "approvalName": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "maxResults": { |
| // "default": "100", |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "startIndex": { |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/approvals/{approvalName}/comments", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1ApprovalsCommentsListResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.components.create": |
| |
| type ComponentsCreateCall struct { |
| s *Service |
| projectId string |
| protoapipb2v1componentcreaterequestbody *ProtoApiPb2V1ComponentCreateRequestBody |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Create a component. |
| func (r *ComponentsService) Create(projectId string, componentName string, protoapipb2v1componentcreaterequestbody *ProtoApiPb2V1ComponentCreateRequestBody) *ComponentsCreateCall { |
| c := &ComponentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.urlParams_.Set("componentName", componentName) |
| c.protoapipb2v1componentcreaterequestbody = protoapipb2v1componentcreaterequestbody |
| 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 *ComponentsCreateCall) Fields(s ...googleapi.Field) *ComponentsCreateCall { |
| 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 *ComponentsCreateCall) Context(ctx context.Context) *ComponentsCreateCall { |
| 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 *ComponentsCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ComponentsCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1componentcreaterequestbody) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/components") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.components.create" call. |
| // Exactly one of *ProtoApiPb2V1Component or error will be non-nil. Any |
| // non-2xx status code is an error. Response headers are in either |
| // *ProtoApiPb2V1Component.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 *ComponentsCreateCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1Component, 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 := &ProtoApiPb2V1Component{ |
| 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": "Create a component.", |
| // "httpMethod": "POST", |
| // "id": "monorail.components.create", |
| // "parameterOrder": [ |
| // "projectId", |
| // "componentName" |
| // ], |
| // "parameters": { |
| // "componentName": { |
| // "location": "query", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/components", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1ComponentCreateRequestBody", |
| // "parameterName": "resource" |
| // }, |
| // "response": { |
| // "$ref": "ProtoApiPb2V1Component" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.components.delete": |
| |
| type ComponentsDeleteCall struct { |
| s *Service |
| projectId string |
| componentPath string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Delete a component. |
| func (r *ComponentsService) Delete(projectId string, componentPath string) *ComponentsDeleteCall { |
| c := &ComponentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.componentPath = componentPath |
| 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 *ComponentsDeleteCall) Fields(s ...googleapi.Field) *ComponentsDeleteCall { |
| 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 *ComponentsDeleteCall) Context(ctx context.Context) *ComponentsDeleteCall { |
| 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 *ComponentsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ComponentsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/components/{componentPath}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "componentPath": c.componentPath, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.components.delete" call. |
| func (c *ComponentsDeleteCall) Do(opts ...googleapi.CallOption) error { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if err != nil { |
| return err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return err |
| } |
| return nil |
| // { |
| // "description": "Delete a component.", |
| // "httpMethod": "DELETE", |
| // "id": "monorail.components.delete", |
| // "parameterOrder": [ |
| // "projectId", |
| // "componentPath" |
| // ], |
| // "parameters": { |
| // "componentPath": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/components/{componentPath}", |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.components.list": |
| |
| type ComponentsListCall struct { |
| s *Service |
| projectId string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: List all components of a given project. |
| func (r *ComponentsService) List(projectId string) *ComponentsListCall { |
| c := &ComponentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| 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 *ComponentsListCall) Fields(s ...googleapi.Field) *ComponentsListCall { |
| 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 *ComponentsListCall) IfNoneMatch(entityTag string) *ComponentsListCall { |
| 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 *ComponentsListCall) Context(ctx context.Context) *ComponentsListCall { |
| 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 *ComponentsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ComponentsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/components") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.components.list" call. |
| // Exactly one of *ProtoApiPb2V1ComponentsListResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1ComponentsListResponse.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 *ComponentsListCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1ComponentsListResponse, 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 := &ProtoApiPb2V1ComponentsListResponse{ |
| 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": "List all components of a given project.", |
| // "httpMethod": "GET", |
| // "id": "monorail.components.list", |
| // "parameterOrder": [ |
| // "projectId" |
| // ], |
| // "parameters": { |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/components", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1ComponentsListResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.components.update": |
| |
| type ComponentsUpdateCall struct { |
| s *Service |
| projectId string |
| componentPath string |
| protoapipb2v1componentupdaterequestbody *ProtoApiPb2V1ComponentUpdateRequestBody |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Update: Update a component. |
| func (r *ComponentsService) Update(projectId string, componentPath string, protoapipb2v1componentupdaterequestbody *ProtoApiPb2V1ComponentUpdateRequestBody) *ComponentsUpdateCall { |
| c := &ComponentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.componentPath = componentPath |
| c.protoapipb2v1componentupdaterequestbody = protoapipb2v1componentupdaterequestbody |
| 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 *ComponentsUpdateCall) Fields(s ...googleapi.Field) *ComponentsUpdateCall { |
| 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 *ComponentsUpdateCall) Context(ctx context.Context) *ComponentsUpdateCall { |
| 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 *ComponentsUpdateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ComponentsUpdateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1componentupdaterequestbody) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/components/{componentPath}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "componentPath": c.componentPath, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.components.update" call. |
| func (c *ComponentsUpdateCall) Do(opts ...googleapi.CallOption) error { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if err != nil { |
| return err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return err |
| } |
| return nil |
| // { |
| // "description": "Update a component.", |
| // "httpMethod": "POST", |
| // "id": "monorail.components.update", |
| // "parameterOrder": [ |
| // "projectId", |
| // "componentPath" |
| // ], |
| // "parameters": { |
| // "componentPath": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/components/{componentPath}", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1ComponentUpdateRequestBody", |
| // "parameterName": "resource" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.groups.create": |
| |
| type GroupsCreateCall struct { |
| s *Service |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Create a new user group. |
| func (r *GroupsService) Create(groupName string, whoCanViewMembers string) *GroupsCreateCall { |
| c := &GroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.urlParams_.Set("groupName", groupName) |
| c.urlParams_.Set("who_can_view_members", whoCanViewMembers) |
| return c |
| } |
| |
| // ExtGroupType sets the optional parameter "ext_group_type": |
| // |
| // Possible values: |
| // |
| // "BAGGINS" |
| // "CHROME_INFRA_AUTH" |
| // "COMPUTED" |
| // "MDB" |
| func (c *GroupsCreateCall) ExtGroupType(extGroupType string) *GroupsCreateCall { |
| c.urlParams_.Set("ext_group_type", extGroupType) |
| 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 *GroupsCreateCall) Fields(s ...googleapi.Field) *GroupsCreateCall { |
| 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 *GroupsCreateCall) Context(ctx context.Context) *GroupsCreateCall { |
| 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 *GroupsCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *GroupsCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "groups") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.groups.create" call. |
| // Exactly one of *ProtoApiPb2V1GroupsCreateResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1GroupsCreateResponse.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 *GroupsCreateCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1GroupsCreateResponse, 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 := &ProtoApiPb2V1GroupsCreateResponse{ |
| 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": "Create a new user group.", |
| // "httpMethod": "POST", |
| // "id": "monorail.groups.create", |
| // "parameterOrder": [ |
| // "groupName", |
| // "who_can_view_members" |
| // ], |
| // "parameters": { |
| // "ext_group_type": { |
| // "enum": [ |
| // "BAGGINS", |
| // "CHROME_INFRA_AUTH", |
| // "COMPUTED", |
| // "MDB" |
| // ], |
| // "enumDescriptions": [ |
| // "", |
| // "", |
| // "", |
| // "" |
| // ], |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "groupName": { |
| // "location": "query", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "who_can_view_members": { |
| // "default": "MEMBERS", |
| // "enum": [ |
| // "ANYONE", |
| // "MEMBERS", |
| // "OWNERS" |
| // ], |
| // "enumDescriptions": [ |
| // "", |
| // "", |
| // "" |
| // ], |
| // "location": "query", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "groups", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1GroupsCreateResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.groups.get": |
| |
| type GroupsGetCall struct { |
| s *Service |
| groupName string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Get a group's settings and users. |
| func (r *GroupsService) Get(groupName string) *GroupsGetCall { |
| c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.groupName = groupName |
| 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 *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall { |
| 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 *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall { |
| 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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall { |
| 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 *GroupsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupName}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "groupName": c.groupName, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.groups.get" call. |
| // Exactly one of *ProtoApiPb2V1GroupsGetResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1GroupsGetResponse.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 *GroupsGetCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1GroupsGetResponse, 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 := &ProtoApiPb2V1GroupsGetResponse{ |
| 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": "Get a group's settings and users.", |
| // "httpMethod": "GET", |
| // "id": "monorail.groups.get", |
| // "parameterOrder": [ |
| // "groupName" |
| // ], |
| // "parameters": { |
| // "groupName": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "groups/{groupName}", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1GroupsGetResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.groups.update": |
| |
| type GroupsUpdateCall struct { |
| s *Service |
| groupName string |
| protoapipb2v1groupcitizens *ProtoApiPb2V1GroupCitizens |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Update: Update a group's settings and users. |
| func (r *GroupsService) Update(groupName string, protoapipb2v1groupcitizens *ProtoApiPb2V1GroupCitizens) *GroupsUpdateCall { |
| c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.groupName = groupName |
| c.protoapipb2v1groupcitizens = protoapipb2v1groupcitizens |
| return c |
| } |
| |
| // ExtGroupType sets the optional parameter "ext_group_type": |
| // |
| // Possible values: |
| // |
| // "BAGGINS" |
| // "CHROME_INFRA_AUTH" |
| // "COMPUTED" |
| // "MDB" |
| func (c *GroupsUpdateCall) ExtGroupType(extGroupType string) *GroupsUpdateCall { |
| c.urlParams_.Set("ext_group_type", extGroupType) |
| return c |
| } |
| |
| // FriendProjects sets the optional parameter "friend_projects": |
| func (c *GroupsUpdateCall) FriendProjects(friendProjects ...string) *GroupsUpdateCall { |
| c.urlParams_.SetMulti("friend_projects", append([]string{}, friendProjects...)) |
| return c |
| } |
| |
| // LastSyncTime sets the optional parameter "last_sync_time": |
| func (c *GroupsUpdateCall) LastSyncTime(lastSyncTime int64) *GroupsUpdateCall { |
| c.urlParams_.Set("last_sync_time", fmt.Sprint(lastSyncTime)) |
| return c |
| } |
| |
| // WhoCanViewMembers sets the optional parameter "who_can_view_members": |
| // |
| // Possible values: |
| // |
| // "ANYONE" |
| // "MEMBERS" |
| // "OWNERS" |
| func (c *GroupsUpdateCall) WhoCanViewMembers(whoCanViewMembers string) *GroupsUpdateCall { |
| c.urlParams_.Set("who_can_view_members", whoCanViewMembers) |
| 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 *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall { |
| 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 *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall { |
| 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 *GroupsUpdateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1groupcitizens) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupName}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "groupName": c.groupName, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.groups.update" call. |
| // Exactly one of *ProtoApiPb2V1GroupsUpdateResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1GroupsUpdateResponse.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 *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1GroupsUpdateResponse, 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 := &ProtoApiPb2V1GroupsUpdateResponse{ |
| 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": "Update a group's settings and users.", |
| // "httpMethod": "POST", |
| // "id": "monorail.groups.update", |
| // "parameterOrder": [ |
| // "groupName" |
| // ], |
| // "parameters": { |
| // "ext_group_type": { |
| // "enum": [ |
| // "BAGGINS", |
| // "CHROME_INFRA_AUTH", |
| // "COMPUTED", |
| // "MDB" |
| // ], |
| // "enumDescriptions": [ |
| // "", |
| // "", |
| // "", |
| // "" |
| // ], |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "friend_projects": { |
| // "location": "query", |
| // "repeated": true, |
| // "type": "string" |
| // }, |
| // "groupName": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "last_sync_time": { |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // }, |
| // "who_can_view_members": { |
| // "enum": [ |
| // "ANYONE", |
| // "MEMBERS", |
| // "OWNERS" |
| // ], |
| // "enumDescriptions": [ |
| // "", |
| // "", |
| // "" |
| // ], |
| // "location": "query", |
| // "type": "string" |
| // } |
| // }, |
| // "path": "groups/{groupName}", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1GroupCitizens", |
| // "parameterName": "resource" |
| // }, |
| // "response": { |
| // "$ref": "ProtoApiPb2V1GroupsUpdateResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.groups.settings.list": |
| |
| type GroupsSettingsListCall struct { |
| s *Service |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: List all group settings. |
| func (r *GroupsSettingsService) List() *GroupsSettingsListCall { |
| c := &GroupsSettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| return c |
| } |
| |
| // ImportedGroupsOnly sets the optional parameter "importedGroupsOnly": |
| func (c *GroupsSettingsListCall) ImportedGroupsOnly(importedGroupsOnly bool) *GroupsSettingsListCall { |
| c.urlParams_.Set("importedGroupsOnly", fmt.Sprint(importedGroupsOnly)) |
| 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 *GroupsSettingsListCall) Fields(s ...googleapi.Field) *GroupsSettingsListCall { |
| 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 *GroupsSettingsListCall) IfNoneMatch(entityTag string) *GroupsSettingsListCall { |
| 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 *GroupsSettingsListCall) Context(ctx context.Context) *GroupsSettingsListCall { |
| 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 *GroupsSettingsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *GroupsSettingsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "groupsettings") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.groups.settings.list" call. |
| // Exactly one of *ProtoApiPb2V1GroupsSettingsListResponse or error will |
| // be non-nil. Any non-2xx status code is an error. Response headers are |
| // in either |
| // *ProtoApiPb2V1GroupsSettingsListResponse.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 *GroupsSettingsListCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1GroupsSettingsListResponse, 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 := &ProtoApiPb2V1GroupsSettingsListResponse{ |
| 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": "List all group settings.", |
| // "httpMethod": "GET", |
| // "id": "monorail.groups.settings.list", |
| // "parameters": { |
| // "importedGroupsOnly": { |
| // "location": "query", |
| // "type": "boolean" |
| // } |
| // }, |
| // "path": "groupsettings", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1GroupsSettingsListResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.get": |
| |
| type IssuesGetCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Get an issue. |
| func (r *IssuesService) Get(projectId string, issueId int64) *IssuesGetCall { |
| c := &IssuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| 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 *IssuesGetCall) Fields(s ...googleapi.Field) *IssuesGetCall { |
| 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 *IssuesGetCall) IfNoneMatch(entityTag string) *IssuesGetCall { |
| 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 *IssuesGetCall) Context(ctx context.Context) *IssuesGetCall { |
| 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 *IssuesGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.get" call. |
| // Exactly one of *ProtoApiPb2V1IssuesGetInsertResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1IssuesGetInsertResponse.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 *IssuesGetCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesGetInsertResponse, 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 := &ProtoApiPb2V1IssuesGetInsertResponse{ |
| 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": "Get an issue.", |
| // "httpMethod": "GET", |
| // "id": "monorail.issues.get", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId" |
| // ], |
| // "parameters": { |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesGetInsertResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.insert": |
| |
| type IssuesInsertCall struct { |
| s *Service |
| projectId string |
| protoapipb2v1issuewrapper *ProtoApiPb2V1IssueWrapper |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Insert: Add a new issue. |
| func (r *IssuesService) Insert(projectId string, protoapipb2v1issuewrapper *ProtoApiPb2V1IssueWrapper) *IssuesInsertCall { |
| c := &IssuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.protoapipb2v1issuewrapper = protoapipb2v1issuewrapper |
| return c |
| } |
| |
| // SendEmail sets the optional parameter "sendEmail": |
| func (c *IssuesInsertCall) SendEmail(sendEmail bool) *IssuesInsertCall { |
| c.urlParams_.Set("sendEmail", fmt.Sprint(sendEmail)) |
| 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 *IssuesInsertCall) Fields(s ...googleapi.Field) *IssuesInsertCall { |
| 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 *IssuesInsertCall) Context(ctx context.Context) *IssuesInsertCall { |
| 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 *IssuesInsertCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesInsertCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1issuewrapper) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.insert" call. |
| // Exactly one of *ProtoApiPb2V1IssuesGetInsertResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1IssuesGetInsertResponse.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 *IssuesInsertCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesGetInsertResponse, 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 := &ProtoApiPb2V1IssuesGetInsertResponse{ |
| 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": "Add a new issue.", |
| // "httpMethod": "POST", |
| // "id": "monorail.issues.insert", |
| // "parameterOrder": [ |
| // "projectId" |
| // ], |
| // "parameters": { |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "sendEmail": { |
| // "default": "true", |
| // "location": "query", |
| // "type": "boolean" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1IssueWrapper", |
| // "parameterName": "resource" |
| // }, |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesGetInsertResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.list": |
| |
| type IssuesListCall struct { |
| s *Service |
| projectId string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: List issues for projects. |
| func (r *IssuesService) List(projectId string) *IssuesListCall { |
| c := &IssuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| return c |
| } |
| |
| // AdditionalProject sets the optional parameter "additionalProject": |
| func (c *IssuesListCall) AdditionalProject(additionalProject ...string) *IssuesListCall { |
| c.urlParams_.SetMulti("additionalProject", append([]string{}, additionalProject...)) |
| return c |
| } |
| |
| // Can sets the optional parameter "can": |
| // |
| // Possible values: |
| // |
| // "all" (default) |
| // "new" |
| // "open" |
| // "owned" |
| // "reported" |
| // "starred" |
| // "to_verify" |
| func (c *IssuesListCall) Can(can string) *IssuesListCall { |
| c.urlParams_.Set("can", can) |
| return c |
| } |
| |
| // Label sets the optional parameter "label": |
| func (c *IssuesListCall) Label(label string) *IssuesListCall { |
| c.urlParams_.Set("label", label) |
| return c |
| } |
| |
| // MaxResults sets the optional parameter "maxResults": |
| func (c *IssuesListCall) MaxResults(maxResults int64) *IssuesListCall { |
| c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) |
| return c |
| } |
| |
| // Owner sets the optional parameter "owner": |
| func (c *IssuesListCall) Owner(owner string) *IssuesListCall { |
| c.urlParams_.Set("owner", owner) |
| return c |
| } |
| |
| // PublishedMax sets the optional parameter "publishedMax": |
| func (c *IssuesListCall) PublishedMax(publishedMax int64) *IssuesListCall { |
| c.urlParams_.Set("publishedMax", fmt.Sprint(publishedMax)) |
| return c |
| } |
| |
| // PublishedMin sets the optional parameter "publishedMin": |
| func (c *IssuesListCall) PublishedMin(publishedMin int64) *IssuesListCall { |
| c.urlParams_.Set("publishedMin", fmt.Sprint(publishedMin)) |
| return c |
| } |
| |
| // Q sets the optional parameter "q": |
| func (c *IssuesListCall) Q(q string) *IssuesListCall { |
| c.urlParams_.Set("q", q) |
| return c |
| } |
| |
| // Sort sets the optional parameter "sort": |
| func (c *IssuesListCall) Sort(sort string) *IssuesListCall { |
| c.urlParams_.Set("sort", sort) |
| return c |
| } |
| |
| // StartIndex sets the optional parameter "startIndex": |
| func (c *IssuesListCall) StartIndex(startIndex int64) *IssuesListCall { |
| c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) |
| return c |
| } |
| |
| // Status sets the optional parameter "status": |
| func (c *IssuesListCall) Status(status string) *IssuesListCall { |
| c.urlParams_.Set("status", status) |
| return c |
| } |
| |
| // UpdatedMax sets the optional parameter "updatedMax": |
| func (c *IssuesListCall) UpdatedMax(updatedMax int64) *IssuesListCall { |
| c.urlParams_.Set("updatedMax", fmt.Sprint(updatedMax)) |
| return c |
| } |
| |
| // UpdatedMin sets the optional parameter "updatedMin": |
| func (c *IssuesListCall) UpdatedMin(updatedMin int64) *IssuesListCall { |
| c.urlParams_.Set("updatedMin", fmt.Sprint(updatedMin)) |
| 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 *IssuesListCall) Fields(s ...googleapi.Field) *IssuesListCall { |
| 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 *IssuesListCall) IfNoneMatch(entityTag string) *IssuesListCall { |
| 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 *IssuesListCall) Context(ctx context.Context) *IssuesListCall { |
| 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 *IssuesListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.list" call. |
| // Exactly one of *ProtoApiPb2V1IssuesListResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1IssuesListResponse.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 *IssuesListCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesListResponse, 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 := &ProtoApiPb2V1IssuesListResponse{ |
| 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": "List issues for projects.", |
| // "httpMethod": "GET", |
| // "id": "monorail.issues.list", |
| // "parameterOrder": [ |
| // "projectId" |
| // ], |
| // "parameters": { |
| // "additionalProject": { |
| // "location": "query", |
| // "repeated": true, |
| // "type": "string" |
| // }, |
| // "can": { |
| // "default": "all", |
| // "enum": [ |
| // "all", |
| // "new", |
| // "open", |
| // "owned", |
| // "reported", |
| // "starred", |
| // "to_verify" |
| // ], |
| // "enumDescriptions": [ |
| // "", |
| // "", |
| // "", |
| // "", |
| // "", |
| // "", |
| // "" |
| // ], |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "label": { |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "maxResults": { |
| // "default": "100", |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // }, |
| // "owner": { |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "publishedMax": { |
| // "format": "int64", |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "publishedMin": { |
| // "format": "int64", |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "q": { |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "sort": { |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "startIndex": { |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // }, |
| // "status": { |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "updatedMax": { |
| // "format": "int64", |
| // "location": "query", |
| // "type": "string" |
| // }, |
| // "updatedMin": { |
| // "format": "int64", |
| // "location": "query", |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesListResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.comments.delete": |
| |
| type IssuesCommentsDeleteCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| commentId int64 |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Delete a comment. |
| func (r *IssuesCommentsService) Delete(projectId string, issueId int64, commentId int64) *IssuesCommentsDeleteCall { |
| c := &IssuesCommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| c.commentId = commentId |
| 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 *IssuesCommentsDeleteCall) Fields(s ...googleapi.Field) *IssuesCommentsDeleteCall { |
| 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 *IssuesCommentsDeleteCall) Context(ctx context.Context) *IssuesCommentsDeleteCall { |
| 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 *IssuesCommentsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesCommentsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/comments/{commentId}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| "commentId": strconv.FormatInt(c.commentId, 10), |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.comments.delete" call. |
| // Exactly one of *ProtoApiPb2V1IssuesCommentsDeleteResponse or error |
| // will be non-nil. Any non-2xx status code is an error. Response |
| // headers are in either |
| // *ProtoApiPb2V1IssuesCommentsDeleteResponse.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 *IssuesCommentsDeleteCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesCommentsDeleteResponse, 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 := &ProtoApiPb2V1IssuesCommentsDeleteResponse{ |
| 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": "Delete a comment.", |
| // "httpMethod": "DELETE", |
| // "id": "monorail.issues.comments.delete", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId", |
| // "commentId" |
| // ], |
| // "parameters": { |
| // "commentId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/comments/{commentId}", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesCommentsDeleteResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.comments.insert": |
| |
| type IssuesCommentsInsertCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| protoapipb2v1issuecommentwrapper *ProtoApiPb2V1IssueCommentWrapper |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Insert: Add a comment. |
| func (r *IssuesCommentsService) Insert(projectId string, issueId int64, protoapipb2v1issuecommentwrapper *ProtoApiPb2V1IssueCommentWrapper) *IssuesCommentsInsertCall { |
| c := &IssuesCommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| c.protoapipb2v1issuecommentwrapper = protoapipb2v1issuecommentwrapper |
| return c |
| } |
| |
| // SendEmail sets the optional parameter "sendEmail": |
| func (c *IssuesCommentsInsertCall) SendEmail(sendEmail bool) *IssuesCommentsInsertCall { |
| c.urlParams_.Set("sendEmail", fmt.Sprint(sendEmail)) |
| 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 *IssuesCommentsInsertCall) Fields(s ...googleapi.Field) *IssuesCommentsInsertCall { |
| 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 *IssuesCommentsInsertCall) Context(ctx context.Context) *IssuesCommentsInsertCall { |
| 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 *IssuesCommentsInsertCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesCommentsInsertCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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.protoapipb2v1issuecommentwrapper) |
| if err != nil { |
| return nil, err |
| } |
| reqHeaders.Set("Content-Type", "application/json") |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/comments") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.comments.insert" call. |
| // Exactly one of *ProtoApiPb2V1IssuesCommentsInsertResponse or error |
| // will be non-nil. Any non-2xx status code is an error. Response |
| // headers are in either |
| // *ProtoApiPb2V1IssuesCommentsInsertResponse.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 *IssuesCommentsInsertCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesCommentsInsertResponse, 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 := &ProtoApiPb2V1IssuesCommentsInsertResponse{ |
| 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": "Add a comment.", |
| // "httpMethod": "POST", |
| // "id": "monorail.issues.comments.insert", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId" |
| // ], |
| // "parameters": { |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "sendEmail": { |
| // "location": "query", |
| // "type": "boolean" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/comments", |
| // "request": { |
| // "$ref": "ProtoApiPb2V1IssueCommentWrapper", |
| // "parameterName": "resource" |
| // }, |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesCommentsInsertResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.comments.list": |
| |
| type IssuesCommentsListCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: List all comments for an issue. |
| func (r *IssuesCommentsService) List(projectId string, issueId int64) *IssuesCommentsListCall { |
| c := &IssuesCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| return c |
| } |
| |
| // MaxResults sets the optional parameter "maxResults": |
| func (c *IssuesCommentsListCall) MaxResults(maxResults int64) *IssuesCommentsListCall { |
| c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) |
| return c |
| } |
| |
| // StartIndex sets the optional parameter "startIndex": |
| func (c *IssuesCommentsListCall) StartIndex(startIndex int64) *IssuesCommentsListCall { |
| c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) |
| 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 *IssuesCommentsListCall) Fields(s ...googleapi.Field) *IssuesCommentsListCall { |
| 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 *IssuesCommentsListCall) IfNoneMatch(entityTag string) *IssuesCommentsListCall { |
| 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 *IssuesCommentsListCall) Context(ctx context.Context) *IssuesCommentsListCall { |
| 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 *IssuesCommentsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesCommentsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/comments") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.comments.list" call. |
| // Exactly one of *ProtoApiPb2V1IssuesCommentsListResponse or error will |
| // be non-nil. Any non-2xx status code is an error. Response headers are |
| // in either |
| // *ProtoApiPb2V1IssuesCommentsListResponse.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 *IssuesCommentsListCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesCommentsListResponse, 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 := &ProtoApiPb2V1IssuesCommentsListResponse{ |
| 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": "List all comments for an issue.", |
| // "httpMethod": "GET", |
| // "id": "monorail.issues.comments.list", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId" |
| // ], |
| // "parameters": { |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "maxResults": { |
| // "default": "100", |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // }, |
| // "startIndex": { |
| // "format": "int32", |
| // "location": "query", |
| // "type": "integer" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/comments", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesCommentsListResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.issues.comments.undelete": |
| |
| type IssuesCommentsUndeleteCall struct { |
| s *Service |
| projectId string |
| issueId int64 |
| commentId int64 |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Undelete: Restore a deleted comment. |
| func (r *IssuesCommentsService) Undelete(projectId string, issueId int64, commentId int64) *IssuesCommentsUndeleteCall { |
| c := &IssuesCommentsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.projectId = projectId |
| c.issueId = issueId |
| c.commentId = commentId |
| 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 *IssuesCommentsUndeleteCall) Fields(s ...googleapi.Field) *IssuesCommentsUndeleteCall { |
| 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 *IssuesCommentsUndeleteCall) Context(ctx context.Context) *IssuesCommentsUndeleteCall { |
| 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 *IssuesCommentsUndeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *IssuesCommentsUndeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/issues/{issueId}/comments/{commentId}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "projectId": c.projectId, |
| "issueId": strconv.FormatInt(c.issueId, 10), |
| "commentId": strconv.FormatInt(c.commentId, 10), |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.issues.comments.undelete" call. |
| // Exactly one of *ProtoApiPb2V1IssuesCommentsDeleteResponse or error |
| // will be non-nil. Any non-2xx status code is an error. Response |
| // headers are in either |
| // *ProtoApiPb2V1IssuesCommentsDeleteResponse.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 *IssuesCommentsUndeleteCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1IssuesCommentsDeleteResponse, 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 := &ProtoApiPb2V1IssuesCommentsDeleteResponse{ |
| 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": "Restore a deleted comment.", |
| // "httpMethod": "POST", |
| // "id": "monorail.issues.comments.undelete", |
| // "parameterOrder": [ |
| // "projectId", |
| // "issueId", |
| // "commentId" |
| // ], |
| // "parameters": { |
| // "commentId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "issueId": { |
| // "format": "int32", |
| // "location": "path", |
| // "required": true, |
| // "type": "integer" |
| // }, |
| // "projectId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "projects/{projectId}/issues/{issueId}/comments/{commentId}", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1IssuesCommentsDeleteResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |
| |
| // method id "monorail.users.get": |
| |
| type UsersGetCall struct { |
| s *Service |
| userId string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Get a user. |
| func (r *UsersService) Get(userId string) *UsersGetCall { |
| c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.userId = userId |
| return c |
| } |
| |
| // OwnerProjectsOnly sets the optional parameter "ownerProjectsOnly": |
| func (c *UsersGetCall) OwnerProjectsOnly(ownerProjectsOnly bool) *UsersGetCall { |
| c.urlParams_.Set("ownerProjectsOnly", fmt.Sprint(ownerProjectsOnly)) |
| 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 *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { |
| 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 *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { |
| 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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall { |
| 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 *UsersGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := make(http.Header) |
| reqHeaders.Set("x-goog-api-client", "gl-go/1.13.5 gdcl/20190905") |
| 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) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "userId": c.userId, |
| }) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "monorail.users.get" call. |
| // Exactly one of *ProtoApiPb2V1UsersGetResponse or error will be |
| // non-nil. Any non-2xx status code is an error. Response headers are in |
| // either *ProtoApiPb2V1UsersGetResponse.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 *UsersGetCall) Do(opts ...googleapi.CallOption) (*ProtoApiPb2V1UsersGetResponse, 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 := &ProtoApiPb2V1UsersGetResponse{ |
| 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": "Get a user.", |
| // "httpMethod": "GET", |
| // "id": "monorail.users.get", |
| // "parameterOrder": [ |
| // "userId" |
| // ], |
| // "parameters": { |
| // "ownerProjectsOnly": { |
| // "location": "query", |
| // "type": "boolean" |
| // }, |
| // "userId": { |
| // "location": "path", |
| // "required": true, |
| // "type": "string" |
| // } |
| // }, |
| // "path": "users/{userId}", |
| // "response": { |
| // "$ref": "ProtoApiPb2V1UsersGetResponse" |
| // }, |
| // "scopes": [ |
| // "https://www.googleapis.com/auth/userinfo.email" |
| // ] |
| // } |
| |
| } |