...

Source file src/google.golang.org/api/chat/v1/chat-gen.go

Documentation: google.golang.org/api/chat/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package chat provides access to the Google Chat API.
     8  //
     9  // For product documentation, see: https://developers.google.com/hangouts/chat
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/chat/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	chatService, err := chat.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	chatService, err := chat.NewService(ctx, option.WithScopes(chat.ChatUsersReadstateReadonlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	chatService, err := chat.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	chatService, err := chat.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package chat // import "google.golang.org/api/chat/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "chat:v1"
    95  const apiName = "chat"
    96  const apiVersion = "v1"
    97  const basePath = "https://chat.googleapis.com/"
    98  const basePathTemplate = "https://chat.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://chat.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// Private Service: https://www.googleapis.com/auth/chat.bot
   104  	ChatBotScope = "https://www.googleapis.com/auth/chat.bot"
   105  
   106  	// Delete conversations and spaces & remove access to associated files in
   107  	// Google Chat
   108  	ChatDeleteScope = "https://www.googleapis.com/auth/chat.delete"
   109  
   110  	// Import spaces, messages, and memberships into Google Chat.
   111  	ChatImportScope = "https://www.googleapis.com/auth/chat.import"
   112  
   113  	// View, add, update, and remove members from conversations in Google Chat
   114  	ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships"
   115  
   116  	// Add and remove itself from conversations in Google Chat
   117  	ChatMembershipsAppScope = "https://www.googleapis.com/auth/chat.memberships.app"
   118  
   119  	// View members in Google Chat conversations.
   120  	ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly"
   121  
   122  	// View, compose, send, update, and delete messages, and add, view, and delete
   123  	// reactions to messages.
   124  	ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages"
   125  
   126  	// Compose and send messages in Google Chat
   127  	ChatMessagesCreateScope = "https://www.googleapis.com/auth/chat.messages.create"
   128  
   129  	// View, add, and delete reactions to messages in Google Chat
   130  	ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions"
   131  
   132  	// Add reactions to messages in Google Chat
   133  	ChatMessagesReactionsCreateScope = "https://www.googleapis.com/auth/chat.messages.reactions.create"
   134  
   135  	// View reactions to messages in Google Chat
   136  	ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly"
   137  
   138  	// View messages and reactions in Google Chat
   139  	ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly"
   140  
   141  	// Create conversations and spaces and see or edit metadata (including history
   142  	// settings and access settings) in Google Chat
   143  	ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces"
   144  
   145  	// Create new conversations in Google Chat
   146  	ChatSpacesCreateScope = "https://www.googleapis.com/auth/chat.spaces.create"
   147  
   148  	// View chat and spaces in Google Chat
   149  	ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly"
   150  
   151  	// View and modify last read time for Google Chat conversations
   152  	ChatUsersReadstateScope = "https://www.googleapis.com/auth/chat.users.readstate"
   153  
   154  	// View last read time for Google Chat conversations
   155  	ChatUsersReadstateReadonlyScope = "https://www.googleapis.com/auth/chat.users.readstate.readonly"
   156  )
   157  
   158  // NewService creates a new Service.
   159  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   160  	scopesOption := internaloption.WithDefaultScopes(
   161  		"https://www.googleapis.com/auth/chat.bot",
   162  		"https://www.googleapis.com/auth/chat.delete",
   163  		"https://www.googleapis.com/auth/chat.import",
   164  		"https://www.googleapis.com/auth/chat.memberships",
   165  		"https://www.googleapis.com/auth/chat.memberships.app",
   166  		"https://www.googleapis.com/auth/chat.memberships.readonly",
   167  		"https://www.googleapis.com/auth/chat.messages",
   168  		"https://www.googleapis.com/auth/chat.messages.create",
   169  		"https://www.googleapis.com/auth/chat.messages.reactions",
   170  		"https://www.googleapis.com/auth/chat.messages.reactions.create",
   171  		"https://www.googleapis.com/auth/chat.messages.reactions.readonly",
   172  		"https://www.googleapis.com/auth/chat.messages.readonly",
   173  		"https://www.googleapis.com/auth/chat.spaces",
   174  		"https://www.googleapis.com/auth/chat.spaces.create",
   175  		"https://www.googleapis.com/auth/chat.spaces.readonly",
   176  		"https://www.googleapis.com/auth/chat.users.readstate",
   177  		"https://www.googleapis.com/auth/chat.users.readstate.readonly",
   178  	)
   179  	// NOTE: prepend, so we don't override user-specified scopes.
   180  	opts = append([]option.ClientOption{scopesOption}, opts...)
   181  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   182  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   183  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   184  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   185  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   186  	if err != nil {
   187  		return nil, err
   188  	}
   189  	s, err := New(client)
   190  	if err != nil {
   191  		return nil, err
   192  	}
   193  	if endpoint != "" {
   194  		s.BasePath = endpoint
   195  	}
   196  	return s, nil
   197  }
   198  
   199  // New creates a new Service. It uses the provided http.Client for requests.
   200  //
   201  // Deprecated: please use NewService instead.
   202  // To provide a custom HTTP client, use option.WithHTTPClient.
   203  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   204  func New(client *http.Client) (*Service, error) {
   205  	if client == nil {
   206  		return nil, errors.New("client is nil")
   207  	}
   208  	s := &Service{client: client, BasePath: basePath}
   209  	s.Media = NewMediaService(s)
   210  	s.Spaces = NewSpacesService(s)
   211  	s.Users = NewUsersService(s)
   212  	return s, nil
   213  }
   214  
   215  type Service struct {
   216  	client    *http.Client
   217  	BasePath  string // API endpoint base URL
   218  	UserAgent string // optional additional User-Agent fragment
   219  
   220  	Media *MediaService
   221  
   222  	Spaces *SpacesService
   223  
   224  	Users *UsersService
   225  }
   226  
   227  func (s *Service) userAgent() string {
   228  	if s.UserAgent == "" {
   229  		return googleapi.UserAgent
   230  	}
   231  	return googleapi.UserAgent + " " + s.UserAgent
   232  }
   233  
   234  func NewMediaService(s *Service) *MediaService {
   235  	rs := &MediaService{s: s}
   236  	return rs
   237  }
   238  
   239  type MediaService struct {
   240  	s *Service
   241  }
   242  
   243  func NewSpacesService(s *Service) *SpacesService {
   244  	rs := &SpacesService{s: s}
   245  	rs.Members = NewSpacesMembersService(s)
   246  	rs.Messages = NewSpacesMessagesService(s)
   247  	rs.SpaceEvents = NewSpacesSpaceEventsService(s)
   248  	return rs
   249  }
   250  
   251  type SpacesService struct {
   252  	s *Service
   253  
   254  	Members *SpacesMembersService
   255  
   256  	Messages *SpacesMessagesService
   257  
   258  	SpaceEvents *SpacesSpaceEventsService
   259  }
   260  
   261  func NewSpacesMembersService(s *Service) *SpacesMembersService {
   262  	rs := &SpacesMembersService{s: s}
   263  	return rs
   264  }
   265  
   266  type SpacesMembersService struct {
   267  	s *Service
   268  }
   269  
   270  func NewSpacesMessagesService(s *Service) *SpacesMessagesService {
   271  	rs := &SpacesMessagesService{s: s}
   272  	rs.Attachments = NewSpacesMessagesAttachmentsService(s)
   273  	rs.Reactions = NewSpacesMessagesReactionsService(s)
   274  	return rs
   275  }
   276  
   277  type SpacesMessagesService struct {
   278  	s *Service
   279  
   280  	Attachments *SpacesMessagesAttachmentsService
   281  
   282  	Reactions *SpacesMessagesReactionsService
   283  }
   284  
   285  func NewSpacesMessagesAttachmentsService(s *Service) *SpacesMessagesAttachmentsService {
   286  	rs := &SpacesMessagesAttachmentsService{s: s}
   287  	return rs
   288  }
   289  
   290  type SpacesMessagesAttachmentsService struct {
   291  	s *Service
   292  }
   293  
   294  func NewSpacesMessagesReactionsService(s *Service) *SpacesMessagesReactionsService {
   295  	rs := &SpacesMessagesReactionsService{s: s}
   296  	return rs
   297  }
   298  
   299  type SpacesMessagesReactionsService struct {
   300  	s *Service
   301  }
   302  
   303  func NewSpacesSpaceEventsService(s *Service) *SpacesSpaceEventsService {
   304  	rs := &SpacesSpaceEventsService{s: s}
   305  	return rs
   306  }
   307  
   308  type SpacesSpaceEventsService struct {
   309  	s *Service
   310  }
   311  
   312  func NewUsersService(s *Service) *UsersService {
   313  	rs := &UsersService{s: s}
   314  	rs.Spaces = NewUsersSpacesService(s)
   315  	return rs
   316  }
   317  
   318  type UsersService struct {
   319  	s *Service
   320  
   321  	Spaces *UsersSpacesService
   322  }
   323  
   324  func NewUsersSpacesService(s *Service) *UsersSpacesService {
   325  	rs := &UsersSpacesService{s: s}
   326  	rs.Threads = NewUsersSpacesThreadsService(s)
   327  	return rs
   328  }
   329  
   330  type UsersSpacesService struct {
   331  	s *Service
   332  
   333  	Threads *UsersSpacesThreadsService
   334  }
   335  
   336  func NewUsersSpacesThreadsService(s *Service) *UsersSpacesThreadsService {
   337  	rs := &UsersSpacesThreadsService{s: s}
   338  	return rs
   339  }
   340  
   341  type UsersSpacesThreadsService struct {
   342  	s *Service
   343  }
   344  
   345  // AccessoryWidget: One or more interactive widgets that appear at the bottom
   346  // of a message. For details, see Add interactive widgets at the bottom of a
   347  // message
   348  // (https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
   349  type AccessoryWidget struct {
   350  	// ButtonList: A list of buttons.
   351  	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`
   352  	// ForceSendFields is a list of field names (e.g. "ButtonList") to
   353  	// unconditionally include in API requests. By default, fields with empty or
   354  	// default values are omitted from API requests. See
   355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   356  	// details.
   357  	ForceSendFields []string `json:"-"`
   358  	// NullFields is a list of field names (e.g. "ButtonList") to include in API
   359  	// requests with the JSON null value. By default, fields with empty values are
   360  	// omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   362  	NullFields []string `json:"-"`
   363  }
   364  
   365  func (s *AccessoryWidget) MarshalJSON() ([]byte, error) {
   366  	type NoMethod AccessoryWidget
   367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   368  }
   369  
   370  // ActionParameter: List of string parameters to supply when the action method
   371  // is invoked. For example, consider three snooze buttons: snooze now, snooze
   372  // one day, snooze next week. You might use `action method = snooze()`, passing
   373  // the snooze type and snooze time in the list of string parameters.
   374  type ActionParameter struct {
   375  	// Key: The name of the parameter for the action script.
   376  	Key string `json:"key,omitempty"`
   377  	// Value: The value of the parameter.
   378  	Value string `json:"value,omitempty"`
   379  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
   380  	// include in API requests. By default, fields with empty or default values are
   381  	// omitted from API requests. See
   382  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   383  	// details.
   384  	ForceSendFields []string `json:"-"`
   385  	// NullFields is a list of field names (e.g. "Key") to include in API requests
   386  	// with the JSON null value. By default, fields with empty values are omitted
   387  	// from API requests. See
   388  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   389  	NullFields []string `json:"-"`
   390  }
   391  
   392  func (s *ActionParameter) MarshalJSON() ([]byte, error) {
   393  	type NoMethod ActionParameter
   394  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   395  }
   396  
   397  // ActionResponse: Parameters that a Chat app can use to configure how its
   398  // response is posted.
   399  type ActionResponse struct {
   400  	// DialogAction: Input only. A response to an interaction event related to a
   401  	// dialog (https://developers.google.com/workspace/chat/dialogs). Must be
   402  	// accompanied by `ResponseType.Dialog`.
   403  	DialogAction *DialogAction `json:"dialogAction,omitempty"`
   404  	// Type: Input only. The type of Chat app response.
   405  	//
   406  	// Possible values:
   407  	//   "TYPE_UNSPECIFIED" - Default type that's handled as `NEW_MESSAGE`.
   408  	//   "NEW_MESSAGE" - Post as a new message in the topic.
   409  	//   "UPDATE_MESSAGE" - Update the Chat app's message. This is only permitted
   410  	// on a `CARD_CLICKED` event where the message sender type is `BOT`.
   411  	//   "UPDATE_USER_MESSAGE_CARDS" - Update the cards on a user's message. This
   412  	// is only permitted as a response to a `MESSAGE` event with a matched url, or
   413  	// a `CARD_CLICKED` event where the message sender type is `HUMAN`. Text is
   414  	// ignored.
   415  	//   "REQUEST_CONFIG" - Privately ask the user for additional authentication or
   416  	// configuration.
   417  	//   "DIALOG" - Presents a
   418  	// [dialog](https://developers.google.com/workspace/chat/dialogs).
   419  	//   "UPDATE_WIDGET" - Widget text autocomplete options query.
   420  	Type string `json:"type,omitempty"`
   421  	// UpdatedWidget: Input only. The response of the updated widget.
   422  	UpdatedWidget *UpdatedWidget `json:"updatedWidget,omitempty"`
   423  	// Url: Input only. URL for users to authenticate or configure. (Only for
   424  	// `REQUEST_CONFIG` response types.)
   425  	Url string `json:"url,omitempty"`
   426  	// ForceSendFields is a list of field names (e.g. "DialogAction") to
   427  	// unconditionally include in API requests. By default, fields with empty or
   428  	// default values are omitted from API requests. See
   429  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   430  	// details.
   431  	ForceSendFields []string `json:"-"`
   432  	// NullFields is a list of field names (e.g. "DialogAction") to include in API
   433  	// requests with the JSON null value. By default, fields with empty values are
   434  	// omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   436  	NullFields []string `json:"-"`
   437  }
   438  
   439  func (s *ActionResponse) MarshalJSON() ([]byte, error) {
   440  	type NoMethod ActionResponse
   441  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   442  }
   443  
   444  // ActionStatus: Represents the status for a request to either invoke or submit
   445  // a dialog (https://developers.google.com/workspace/chat/dialogs).
   446  type ActionStatus struct {
   447  	// StatusCode: The status code.
   448  	//
   449  	// Possible values:
   450  	//   "OK" - Not an error; returned on success. HTTP Mapping: 200 OK
   451  	//   "CANCELLED" - The operation was cancelled, typically by the caller. HTTP
   452  	// Mapping: 499 Client Closed Request
   453  	//   "UNKNOWN" - Unknown error. For example, this error may be returned when a
   454  	// `Status` value received from another address space belongs to an error space
   455  	// that is not known in this address space. Also errors raised by APIs that do
   456  	// not return enough error information may be converted to this error. HTTP
   457  	// Mapping: 500 Internal Server Error
   458  	//   "INVALID_ARGUMENT" - The client specified an invalid argument. Note that
   459  	// this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
   460  	// arguments that are problematic regardless of the state of the system (e.g.,
   461  	// a malformed file name). HTTP Mapping: 400 Bad Request
   462  	//   "DEADLINE_EXCEEDED" - The deadline expired before the operation could
   463  	// complete. For operations that change the state of the system, this error may
   464  	// be returned even if the operation has completed successfully. For example, a
   465  	// successful response from a server could have been delayed long enough for
   466  	// the deadline to expire. HTTP Mapping: 504 Gateway Timeout
   467  	//   "NOT_FOUND" - Some requested entity (e.g., file or directory) was not
   468  	// found. Note to server developers: if a request is denied for an entire class
   469  	// of users, such as gradual feature rollout or undocumented allowlist,
   470  	// `NOT_FOUND` may be used. If a request is denied for some users within a
   471  	// class of users, such as user-based access control, `PERMISSION_DENIED` must
   472  	// be used. HTTP Mapping: 404 Not Found
   473  	//   "ALREADY_EXISTS" - The entity that a client attempted to create (e.g.,
   474  	// file or directory) already exists. HTTP Mapping: 409 Conflict
   475  	//   "PERMISSION_DENIED" - The caller does not have permission to execute the
   476  	// specified operation. `PERMISSION_DENIED` must not be used for rejections
   477  	// caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for
   478  	// those errors). `PERMISSION_DENIED` must not be used if the caller can not be
   479  	// identified (use `UNAUTHENTICATED` instead for those errors). This error code
   480  	// does not imply the request is valid or the requested entity exists or
   481  	// satisfies other pre-conditions. HTTP Mapping: 403 Forbidden
   482  	//   "UNAUTHENTICATED" - The request does not have valid authentication
   483  	// credentials for the operation. HTTP Mapping: 401 Unauthorized
   484  	//   "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
   485  	// per-user quota, or perhaps the entire file system is out of space. HTTP
   486  	// Mapping: 429 Too Many Requests
   487  	//   "FAILED_PRECONDITION" - The operation was rejected because the system is
   488  	// not in a state required for the operation's execution. For example, the
   489  	// directory to be deleted is non-empty, an rmdir operation is applied to a
   490  	// non-directory, etc. Service implementors can use the following guidelines to
   491  	// decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use
   492  	// `UNAVAILABLE` if the client can retry just the failing call. (b) Use
   493  	// `ABORTED` if the client should retry at a higher level. For example, when a
   494  	// client-specified test-and-set fails, indicating the client should restart a
   495  	// read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client
   496  	// should not retry until the system state has been explicitly fixed. For
   497  	// example, if an "rmdir" fails because the directory is non-empty,
   498  	// `FAILED_PRECONDITION` should be returned since the client should not retry
   499  	// unless the files are deleted from the directory. HTTP Mapping: 400 Bad
   500  	// Request
   501  	//   "ABORTED" - The operation was aborted, typically due to a concurrency
   502  	// issue such as a sequencer check failure or transaction abort. See the
   503  	// guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and
   504  	// `UNAVAILABLE`. HTTP Mapping: 409 Conflict
   505  	//   "OUT_OF_RANGE" - The operation was attempted past the valid range. E.g.,
   506  	// seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error
   507  	// indicates a problem that may be fixed if the system state changes. For
   508  	// example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to
   509  	// read at an offset that is not in the range [0,2^32-1], but it will generate
   510  	// `OUT_OF_RANGE` if asked to read from an offset past the current file size.
   511  	// There is a fair bit of overlap between `FAILED_PRECONDITION` and
   512  	// `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error)
   513  	// when it applies so that callers who are iterating through a space can easily
   514  	// look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping:
   515  	// 400 Bad Request
   516  	//   "UNIMPLEMENTED" - The operation is not implemented or is not
   517  	// supported/enabled in this service. HTTP Mapping: 501 Not Implemented
   518  	//   "INTERNAL" - Internal errors. This means that some invariants expected by
   519  	// the underlying system have been broken. This error code is reserved for
   520  	// serious errors. HTTP Mapping: 500 Internal Server Error
   521  	//   "UNAVAILABLE" - The service is currently unavailable. This is most likely
   522  	// a transient condition, which can be corrected by retrying with a backoff.
   523  	// Note that it is not always safe to retry non-idempotent operations. See the
   524  	// guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and
   525  	// `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable
   526  	//   "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: 500
   527  	// Internal Server Error
   528  	StatusCode string `json:"statusCode,omitempty"`
   529  	// UserFacingMessage: The message to send users about the status of their
   530  	// request. If unset, a generic message based on the `status_code` is sent.
   531  	UserFacingMessage string `json:"userFacingMessage,omitempty"`
   532  	// ForceSendFields is a list of field names (e.g. "StatusCode") to
   533  	// unconditionally include in API requests. By default, fields with empty or
   534  	// default values are omitted from API requests. See
   535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   536  	// details.
   537  	ForceSendFields []string `json:"-"`
   538  	// NullFields is a list of field names (e.g. "StatusCode") to include in API
   539  	// requests with the JSON null value. By default, fields with empty values are
   540  	// omitted from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   542  	NullFields []string `json:"-"`
   543  }
   544  
   545  func (s *ActionStatus) MarshalJSON() ([]byte, error) {
   546  	type NoMethod ActionStatus
   547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   548  }
   549  
   550  // Annotation: Output only. Annotations associated with the plain-text body of
   551  // the message. To add basic formatting to a text message, see Format text
   552  // messages (https://developers.google.com/workspace/chat/format-messages).
   553  // Example plain-text message body: ``` Hello @FooBot how are you!" ``` The
   554  // corresponding annotations metadata: ``` "annotations":[{
   555  // "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user":
   556  // { "name":"users/{user}", "displayName":"FooBot",
   557  // "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }]
   558  // ```
   559  type Annotation struct {
   560  	// Length: Length of the substring in the plain-text message body this
   561  	// annotation corresponds to.
   562  	Length int64 `json:"length,omitempty"`
   563  	// RichLinkMetadata: The metadata for a rich link.
   564  	RichLinkMetadata *RichLinkMetadata `json:"richLinkMetadata,omitempty"`
   565  	// SlashCommand: The metadata for a slash command.
   566  	SlashCommand *SlashCommandMetadata `json:"slashCommand,omitempty"`
   567  	// StartIndex: Start index (0-based, inclusive) in the plain-text message body
   568  	// this annotation corresponds to.
   569  	StartIndex int64 `json:"startIndex,omitempty"`
   570  	// Type: The type of this annotation.
   571  	//
   572  	// Possible values:
   573  	//   "ANNOTATION_TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
   574  	//   "USER_MENTION" - A user is mentioned.
   575  	//   "SLASH_COMMAND" - A slash command is invoked.
   576  	//   "RICH_LINK" - A rich link annotation.
   577  	Type string `json:"type,omitempty"`
   578  	// UserMention: The metadata of user mention.
   579  	UserMention *UserMentionMetadata `json:"userMention,omitempty"`
   580  	// ForceSendFields is a list of field names (e.g. "Length") to unconditionally
   581  	// include in API requests. By default, fields with empty or default values are
   582  	// omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   584  	// details.
   585  	ForceSendFields []string `json:"-"`
   586  	// NullFields is a list of field names (e.g. "Length") to include in API
   587  	// requests with the JSON null value. By default, fields with empty values are
   588  	// omitted from API requests. See
   589  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   590  	NullFields []string `json:"-"`
   591  }
   592  
   593  func (s *Annotation) MarshalJSON() ([]byte, error) {
   594  	type NoMethod Annotation
   595  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   596  }
   597  
   598  // AttachedGif: A GIF image that's specified by a URL.
   599  type AttachedGif struct {
   600  	// Uri: Output only. The URL that hosts the GIF image.
   601  	Uri string `json:"uri,omitempty"`
   602  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
   603  	// include in API requests. By default, fields with empty or default values are
   604  	// omitted from API requests. See
   605  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   606  	// details.
   607  	ForceSendFields []string `json:"-"`
   608  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
   609  	// with the JSON null value. By default, fields with empty values are omitted
   610  	// from API requests. See
   611  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   612  	NullFields []string `json:"-"`
   613  }
   614  
   615  func (s *AttachedGif) MarshalJSON() ([]byte, error) {
   616  	type NoMethod AttachedGif
   617  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   618  }
   619  
   620  // Attachment: An attachment in Google Chat.
   621  type Attachment struct {
   622  	// AttachmentDataRef: A reference to the attachment data. This field is used
   623  	// with the media API to download the attachment data.
   624  	AttachmentDataRef *AttachmentDataRef `json:"attachmentDataRef,omitempty"`
   625  	// ContentName: Output only. The original file name for the content, not the
   626  	// full path.
   627  	ContentName string `json:"contentName,omitempty"`
   628  	// ContentType: Output only. The content type (MIME type) of the file.
   629  	ContentType string `json:"contentType,omitempty"`
   630  	// DownloadUri: Output only. The download URL which should be used to allow a
   631  	// human user to download the attachment. Chat apps shouldn't use this URL to
   632  	// download attachment content.
   633  	DownloadUri string `json:"downloadUri,omitempty"`
   634  	// DriveDataRef: Output only. A reference to the Google Drive attachment. This
   635  	// field is used with the Google Drive API.
   636  	DriveDataRef *DriveDataRef `json:"driveDataRef,omitempty"`
   637  	// Name: Resource name of the attachment, in the form
   638  	// `spaces/*/messages/*/attachments/*`.
   639  	Name string `json:"name,omitempty"`
   640  	// Source: Output only. The source of the attachment.
   641  	//
   642  	// Possible values:
   643  	//   "SOURCE_UNSPECIFIED" - Reserved.
   644  	//   "DRIVE_FILE" - The file is a Google Drive file.
   645  	//   "UPLOADED_CONTENT" - The file is uploaded to Chat.
   646  	Source string `json:"source,omitempty"`
   647  	// ThumbnailUri: Output only. The thumbnail URL which should be used to preview
   648  	// the attachment to a human user. Chat apps shouldn't use this URL to download
   649  	// attachment content.
   650  	ThumbnailUri string `json:"thumbnailUri,omitempty"`
   651  
   652  	// ServerResponse contains the HTTP response code and headers from the server.
   653  	googleapi.ServerResponse `json:"-"`
   654  	// ForceSendFields is a list of field names (e.g. "AttachmentDataRef") to
   655  	// unconditionally include in API requests. By default, fields with empty or
   656  	// default values are omitted from API requests. See
   657  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   658  	// details.
   659  	ForceSendFields []string `json:"-"`
   660  	// NullFields is a list of field names (e.g. "AttachmentDataRef") to include in
   661  	// API requests with the JSON null value. By default, fields with empty values
   662  	// are omitted from API requests. See
   663  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   664  	NullFields []string `json:"-"`
   665  }
   666  
   667  func (s *Attachment) MarshalJSON() ([]byte, error) {
   668  	type NoMethod Attachment
   669  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   670  }
   671  
   672  // AttachmentDataRef: A reference to the attachment data.
   673  type AttachmentDataRef struct {
   674  	// AttachmentUploadToken: Opaque token containing a reference to an uploaded
   675  	// attachment. Treated by clients as an opaque string and used to create or
   676  	// update Chat messages with attachments.
   677  	AttachmentUploadToken string `json:"attachmentUploadToken,omitempty"`
   678  	// ResourceName: The resource name of the attachment data. This field is used
   679  	// with the media API to download the attachment data.
   680  	ResourceName string `json:"resourceName,omitempty"`
   681  	// ForceSendFields is a list of field names (e.g. "AttachmentUploadToken") to
   682  	// unconditionally include in API requests. By default, fields with empty or
   683  	// default values are omitted from API requests. See
   684  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   685  	// details.
   686  	ForceSendFields []string `json:"-"`
   687  	// NullFields is a list of field names (e.g. "AttachmentUploadToken") to
   688  	// include in API requests with the JSON null value. By default, fields with
   689  	// empty values are omitted from API requests. See
   690  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   691  	NullFields []string `json:"-"`
   692  }
   693  
   694  func (s *AttachmentDataRef) MarshalJSON() ([]byte, error) {
   695  	type NoMethod AttachmentDataRef
   696  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   697  }
   698  
   699  // Button: A button. Can be a text button or an image button.
   700  type Button struct {
   701  	// ImageButton: A button with image and `onclick` action.
   702  	ImageButton *ImageButton `json:"imageButton,omitempty"`
   703  	// TextButton: A button with text and `onclick` action.
   704  	TextButton *TextButton `json:"textButton,omitempty"`
   705  	// ForceSendFields is a list of field names (e.g. "ImageButton") to
   706  	// unconditionally include in API requests. By default, fields with empty or
   707  	// default values are omitted from API requests. See
   708  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   709  	// details.
   710  	ForceSendFields []string `json:"-"`
   711  	// NullFields is a list of field names (e.g. "ImageButton") to include in API
   712  	// requests with the JSON null value. By default, fields with empty values are
   713  	// omitted from API requests. See
   714  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   715  	NullFields []string `json:"-"`
   716  }
   717  
   718  func (s *Button) MarshalJSON() ([]byte, error) {
   719  	type NoMethod Button
   720  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   721  }
   722  
   723  // Card: A card is a UI element that can contain UI widgets such as text and
   724  // images.
   725  type Card struct {
   726  	// CardActions: The actions of this card.
   727  	CardActions []*CardAction `json:"cardActions,omitempty"`
   728  	// Header: The header of the card. A header usually contains a title and an
   729  	// image.
   730  	Header *CardHeader `json:"header,omitempty"`
   731  	// Name: Name of the card.
   732  	Name string `json:"name,omitempty"`
   733  	// Sections: Sections are separated by a line divider.
   734  	Sections []*Section `json:"sections,omitempty"`
   735  	// ForceSendFields is a list of field names (e.g. "CardActions") to
   736  	// unconditionally include in API requests. By default, fields with empty or
   737  	// default values are omitted from API requests. See
   738  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   739  	// details.
   740  	ForceSendFields []string `json:"-"`
   741  	// NullFields is a list of field names (e.g. "CardActions") to include in API
   742  	// requests with the JSON null value. By default, fields with empty values are
   743  	// omitted from API requests. See
   744  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   745  	NullFields []string `json:"-"`
   746  }
   747  
   748  func (s *Card) MarshalJSON() ([]byte, error) {
   749  	type NoMethod Card
   750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   751  }
   752  
   753  // CardAction: A card action is the action associated with the card. For an
   754  // invoice card, a typical action would be: delete invoice, email invoice or
   755  // open the invoice in browser. Not supported by Google Chat apps.
   756  type CardAction struct {
   757  	// ActionLabel: The label used to be displayed in the action menu item.
   758  	ActionLabel string `json:"actionLabel,omitempty"`
   759  	// OnClick: The onclick action for this action item.
   760  	OnClick *OnClick `json:"onClick,omitempty"`
   761  	// ForceSendFields is a list of field names (e.g. "ActionLabel") to
   762  	// unconditionally include in API requests. By default, fields with empty or
   763  	// default values are omitted from API requests. See
   764  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   765  	// details.
   766  	ForceSendFields []string `json:"-"`
   767  	// NullFields is a list of field names (e.g. "ActionLabel") to include in API
   768  	// requests with the JSON null value. By default, fields with empty values are
   769  	// omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   771  	NullFields []string `json:"-"`
   772  }
   773  
   774  func (s *CardAction) MarshalJSON() ([]byte, error) {
   775  	type NoMethod CardAction
   776  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   777  }
   778  
   779  type CardHeader struct {
   780  	// ImageStyle: The image's type (for example, square border or circular
   781  	// border).
   782  	//
   783  	// Possible values:
   784  	//   "IMAGE_STYLE_UNSPECIFIED"
   785  	//   "IMAGE" - Square border.
   786  	//   "AVATAR" - Circular border.
   787  	ImageStyle string `json:"imageStyle,omitempty"`
   788  	// ImageUrl: The URL of the image in the card header.
   789  	ImageUrl string `json:"imageUrl,omitempty"`
   790  	// Subtitle: The subtitle of the card header.
   791  	Subtitle string `json:"subtitle,omitempty"`
   792  	// Title: The title must be specified. The header has a fixed height: if both a
   793  	// title and subtitle is specified, each takes up one line. If only the title
   794  	// is specified, it takes up both lines.
   795  	Title string `json:"title,omitempty"`
   796  	// ForceSendFields is a list of field names (e.g. "ImageStyle") to
   797  	// unconditionally include in API requests. By default, fields with empty or
   798  	// default values are omitted from API requests. See
   799  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   800  	// details.
   801  	ForceSendFields []string `json:"-"`
   802  	// NullFields is a list of field names (e.g. "ImageStyle") to include in API
   803  	// requests with the JSON null value. By default, fields with empty values are
   804  	// omitted from API requests. See
   805  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   806  	NullFields []string `json:"-"`
   807  }
   808  
   809  func (s *CardHeader) MarshalJSON() ([]byte, error) {
   810  	type NoMethod CardHeader
   811  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   812  }
   813  
   814  // CardWithId: A card
   815  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/cards)
   816  // in a Google Chat message. Only Chat apps can create cards. If your Chat app
   817  // authenticates as a user
   818  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
   819  // the message can't contain cards. Card builder
   820  // (https://addons.gsuite.google.com/uikit/builder)
   821  type CardWithId struct {
   822  	// Card: A card. Maximum size is 32 KB.
   823  	Card *GoogleAppsCardV1Card `json:"card,omitempty"`
   824  	// CardId: Required if the message contains multiple cards. A unique identifier
   825  	// for a card in a message.
   826  	CardId string `json:"cardId,omitempty"`
   827  	// ForceSendFields is a list of field names (e.g. "Card") to unconditionally
   828  	// include in API requests. By default, fields with empty or default values are
   829  	// omitted from API requests. See
   830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   831  	// details.
   832  	ForceSendFields []string `json:"-"`
   833  	// NullFields is a list of field names (e.g. "Card") to include in API requests
   834  	// with the JSON null value. By default, fields with empty values are omitted
   835  	// from API requests. See
   836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   837  	NullFields []string `json:"-"`
   838  }
   839  
   840  func (s *CardWithId) MarshalJSON() ([]byte, error) {
   841  	type NoMethod CardWithId
   842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   843  }
   844  
   845  // ChatAppLogEntry: JSON payload of error messages. If the Cloud Logging API is
   846  // enabled, these error messages are logged to Google Cloud Logging
   847  // (https://cloud.google.com/logging/docs).
   848  type ChatAppLogEntry struct {
   849  	// Deployment: The deployment that caused the error. For Chat apps built in
   850  	// Apps Script, this is the deployment ID defined by Apps Script.
   851  	Deployment string `json:"deployment,omitempty"`
   852  	// DeploymentFunction: The unencrypted `callback_method` name that was running
   853  	// when the error was encountered.
   854  	DeploymentFunction string `json:"deploymentFunction,omitempty"`
   855  	// Error: The error code and message.
   856  	Error *Status `json:"error,omitempty"`
   857  	// ForceSendFields is a list of field names (e.g. "Deployment") to
   858  	// unconditionally include in API requests. By default, fields with empty or
   859  	// default values are omitted from API requests. See
   860  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   861  	// details.
   862  	ForceSendFields []string `json:"-"`
   863  	// NullFields is a list of field names (e.g. "Deployment") to include in API
   864  	// requests with the JSON null value. By default, fields with empty values are
   865  	// omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   867  	NullFields []string `json:"-"`
   868  }
   869  
   870  func (s *ChatAppLogEntry) MarshalJSON() ([]byte, error) {
   871  	type NoMethod ChatAppLogEntry
   872  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   873  }
   874  
   875  // ChatClientDataSourceMarkup: For a `SelectionInput` widget that uses a
   876  // multiselect menu, a data source from Google Chat. The data source populates
   877  // selection items for the multiselect menu. For example, a user can select
   878  // Google Chat spaces that they're a member of. Google Chat apps
   879  // (https://developers.google.com/workspace/chat):
   880  type ChatClientDataSourceMarkup struct {
   881  	// SpaceDataSource: Google Chat spaces that the user is a member of.
   882  	SpaceDataSource *SpaceDataSource `json:"spaceDataSource,omitempty"`
   883  	// ForceSendFields is a list of field names (e.g. "SpaceDataSource") to
   884  	// unconditionally include in API requests. By default, fields with empty or
   885  	// default values are omitted from API requests. See
   886  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   887  	// details.
   888  	ForceSendFields []string `json:"-"`
   889  	// NullFields is a list of field names (e.g. "SpaceDataSource") to include in
   890  	// API requests with the JSON null value. By default, fields with empty values
   891  	// are omitted from API requests. See
   892  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   893  	NullFields []string `json:"-"`
   894  }
   895  
   896  func (s *ChatClientDataSourceMarkup) MarshalJSON() ([]byte, error) {
   897  	type NoMethod ChatClientDataSourceMarkup
   898  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   899  }
   900  
   901  // Color: Represents a color in the RGBA color space. This representation is
   902  // designed for simplicity of conversion to and from color representations in
   903  // various languages over compactness. For example, the fields of this
   904  // representation can be trivially provided to the constructor of
   905  // `java.awt.Color` in Java; it can also be trivially provided to UIColor's
   906  // `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little
   907  // work, it can be easily formatted into a CSS `rgba()` string in JavaScript.
   908  // This reference page doesn't have information about the absolute color space
   909  // that should be used to interpret the RGB value—for example, sRGB, Adobe
   910  // RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB
   911  // color space. When color equality needs to be decided, implementations,
   912  // unless documented otherwise, treat two colors as equal if all their red,
   913  // green, blue, and alpha values each differ by at most `1e-5`. Example (Java):
   914  // import com.google.type.Color; // ... public static java.awt.Color
   915  // fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ?
   916  // protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color(
   917  // protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); }
   918  // public static Color toProto(java.awt.Color color) { float red = (float)
   919  // color.getRed(); float green = (float) color.getGreen(); float blue = (float)
   920  // color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder =
   921  // Color .newBuilder() .setRed(red / denominator) .setGreen(green /
   922  // denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if
   923  // (alpha != 255) { result.setAlpha( FloatValue .newBuilder()
   924  // .setValue(((float) alpha) / denominator) .build()); } return
   925  // resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static
   926  // UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float
   927  // green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
   928  // alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
   929  // nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red
   930  // green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color)
   931  // { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green
   932  // blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc]
   933  // init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue];
   934  // if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; }
   935  // [result autorelease]; return result; } // ... Example (JavaScript): // ...
   936  // var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red ||
   937  // 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue
   938  // || 0.0; var red = Math.floor(redFrac * 255); var green =
   939  // Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if
   940  // (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var
   941  // alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green,
   942  // blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”);
   943  // }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new
   944  // Number((red << 16) | (green << 8) | blue); var hexString =
   945  // rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
   946  // resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) {
   947  // resultBuilder.push('0'); } resultBuilder.push(hexString); return
   948  // resultBuilder.join(”); }; // ...
   949  type Color struct {
   950  	// Alpha: The fraction of this color that should be applied to the pixel. That
   951  	// is, the final pixel color is defined by the equation: `pixel color = alpha *
   952  	// (this color) + (1.0 - alpha) * (background color)` This means that a value
   953  	// of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a
   954  	// completely transparent color. This uses a wrapper message rather than a
   955  	// simple float scalar so that it is possible to distinguish between a default
   956  	// value and the value being unset. If omitted, this color object is rendered
   957  	// as a solid color (as if the alpha value had been explicitly given a value of
   958  	// 1.0).
   959  	Alpha float64 `json:"alpha,omitempty"`
   960  	// Blue: The amount of blue in the color as a value in the interval [0, 1].
   961  	Blue float64 `json:"blue,omitempty"`
   962  	// Green: The amount of green in the color as a value in the interval [0, 1].
   963  	Green float64 `json:"green,omitempty"`
   964  	// Red: The amount of red in the color as a value in the interval [0, 1].
   965  	Red float64 `json:"red,omitempty"`
   966  	// ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally
   967  	// include in API requests. By default, fields with empty or default values are
   968  	// omitted from API requests. See
   969  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   970  	// details.
   971  	ForceSendFields []string `json:"-"`
   972  	// NullFields is a list of field names (e.g. "Alpha") to include in API
   973  	// requests with the JSON null value. By default, fields with empty values are
   974  	// omitted from API requests. See
   975  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   976  	NullFields []string `json:"-"`
   977  }
   978  
   979  func (s *Color) MarshalJSON() ([]byte, error) {
   980  	type NoMethod Color
   981  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   982  }
   983  
   984  func (s *Color) UnmarshalJSON(data []byte) error {
   985  	type NoMethod Color
   986  	var s1 struct {
   987  		Alpha gensupport.JSONFloat64 `json:"alpha"`
   988  		Blue  gensupport.JSONFloat64 `json:"blue"`
   989  		Green gensupport.JSONFloat64 `json:"green"`
   990  		Red   gensupport.JSONFloat64 `json:"red"`
   991  		*NoMethod
   992  	}
   993  	s1.NoMethod = (*NoMethod)(s)
   994  	if err := json.Unmarshal(data, &s1); err != nil {
   995  		return err
   996  	}
   997  	s.Alpha = float64(s1.Alpha)
   998  	s.Blue = float64(s1.Blue)
   999  	s.Green = float64(s1.Green)
  1000  	s.Red = float64(s1.Red)
  1001  	return nil
  1002  }
  1003  
  1004  // CommonEventObject: Represents information about the user's client, such as
  1005  // locale, host app, and platform. For Chat apps, `CommonEventObject` includes
  1006  // data submitted by users interacting with cards, like data entered in dialogs
  1007  // (https://developers.google.com/chat/how-tos/dialogs).
  1008  type CommonEventObject struct {
  1009  	// FormInputs: A map containing the values that a user inputs in a widget from
  1010  	// a card or dialog. The map keys are the string IDs assigned to each widget,
  1011  	// and the values represent inputs to the widget. For details, see Process
  1012  	// information inputted by users
  1013  	// (https://developers.google.com/chat/ui/read-form-data).
  1014  	FormInputs map[string]Inputs `json:"formInputs,omitempty"`
  1015  	// HostApp: The hostApp enum which indicates the app the add-on is invoked
  1016  	// from. Always `CHAT` for Chat apps.
  1017  	//
  1018  	// Possible values:
  1019  	//   "UNSPECIFIED_HOST_APP" - Google can't identify a host app.
  1020  	//   "GMAIL" - The add-on launches from Gmail.
  1021  	//   "CALENDAR" - The add-on launches from Google Calendar.
  1022  	//   "DRIVE" - The add-on launches from Google Drive.
  1023  	//   "DEMO" - Not used.
  1024  	//   "DOCS" - The add-on launches from Google Docs.
  1025  	//   "MEET" - The add-on launches from Google Meet.
  1026  	//   "SHEETS" - The add-on launches from Google Sheets.
  1027  	//   "SLIDES" - The add-on launches from Google Slides.
  1028  	//   "DRAWINGS" - The add-on launches from Google Drawings.
  1029  	//   "CHAT" - A Google Chat app. Not used for Google Workspace Add-ons.
  1030  	HostApp string `json:"hostApp,omitempty"`
  1031  	// InvokedFunction: Name of the invoked function associated with the widget.
  1032  	// Only set for Chat apps.
  1033  	InvokedFunction string `json:"invokedFunction,omitempty"`
  1034  	// Parameters: Custom parameters
  1035  	// (/chat/api/reference/rest/v1/cards#ActionParameter) passed to the invoked
  1036  	// function. Both keys and values must be strings.
  1037  	Parameters map[string]string `json:"parameters,omitempty"`
  1038  	// Platform: The platform enum which indicates the platform where the event
  1039  	// originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat apps.
  1040  	//
  1041  	// Possible values:
  1042  	//   "UNKNOWN_PLATFORM"
  1043  	//   "WEB"
  1044  	//   "IOS"
  1045  	//   "ANDROID"
  1046  	Platform string `json:"platform,omitempty"`
  1047  	// TimeZone: The timezone ID and offset from Coordinated Universal Time (UTC).
  1048  	// Only supported for the event types `CARD_CLICKED`
  1049  	// (https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED)
  1050  	// and `SUBMIT_DIALOG`
  1051  	// (https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
  1052  	TimeZone *TimeZone `json:"timeZone,omitempty"`
  1053  	// UserLocale: The full `locale.displayName` in the format of [ISO 639 language
  1054  	// code]-[ISO 3166 country/region code] such as "en-US".
  1055  	UserLocale string `json:"userLocale,omitempty"`
  1056  	// ForceSendFields is a list of field names (e.g. "FormInputs") to
  1057  	// unconditionally include in API requests. By default, fields with empty or
  1058  	// default values are omitted from API requests. See
  1059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1060  	// details.
  1061  	ForceSendFields []string `json:"-"`
  1062  	// NullFields is a list of field names (e.g. "FormInputs") to include in API
  1063  	// requests with the JSON null value. By default, fields with empty values are
  1064  	// omitted from API requests. See
  1065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1066  	NullFields []string `json:"-"`
  1067  }
  1068  
  1069  func (s *CommonEventObject) MarshalJSON() ([]byte, error) {
  1070  	type NoMethod CommonEventObject
  1071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1072  }
  1073  
  1074  // CompleteImportSpaceRequest: Request message for completing the import
  1075  // process for a space.
  1076  type CompleteImportSpaceRequest struct {
  1077  }
  1078  
  1079  // CompleteImportSpaceResponse: Response message for completing the import
  1080  // process for a space.
  1081  type CompleteImportSpaceResponse struct {
  1082  	// Space: The import mode space.
  1083  	Space *Space `json:"space,omitempty"`
  1084  
  1085  	// ServerResponse contains the HTTP response code and headers from the server.
  1086  	googleapi.ServerResponse `json:"-"`
  1087  	// ForceSendFields is a list of field names (e.g. "Space") to unconditionally
  1088  	// include in API requests. By default, fields with empty or default values are
  1089  	// omitted from API requests. See
  1090  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1091  	// details.
  1092  	ForceSendFields []string `json:"-"`
  1093  	// NullFields is a list of field names (e.g. "Space") to include in API
  1094  	// requests with the JSON null value. By default, fields with empty values are
  1095  	// omitted from API requests. See
  1096  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1097  	NullFields []string `json:"-"`
  1098  }
  1099  
  1100  func (s *CompleteImportSpaceResponse) MarshalJSON() ([]byte, error) {
  1101  	type NoMethod CompleteImportSpaceResponse
  1102  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1103  }
  1104  
  1105  // CustomEmoji: Represents a custom emoji.
  1106  type CustomEmoji struct {
  1107  	// Uid: Output only. Unique key for the custom emoji resource.
  1108  	Uid string `json:"uid,omitempty"`
  1109  	// ForceSendFields is a list of field names (e.g. "Uid") to unconditionally
  1110  	// include in API requests. By default, fields with empty or default values are
  1111  	// omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1113  	// details.
  1114  	ForceSendFields []string `json:"-"`
  1115  	// NullFields is a list of field names (e.g. "Uid") to include in API requests
  1116  	// with the JSON null value. By default, fields with empty values are omitted
  1117  	// from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *CustomEmoji) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod CustomEmoji
  1124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1125  }
  1126  
  1127  // DateInput: Date input values.
  1128  type DateInput struct {
  1129  	// MsSinceEpoch: Time since epoch time, in milliseconds.
  1130  	MsSinceEpoch int64 `json:"msSinceEpoch,omitempty,string"`
  1131  	// ForceSendFields is a list of field names (e.g. "MsSinceEpoch") to
  1132  	// unconditionally include in API requests. By default, fields with empty or
  1133  	// default values are omitted from API requests. See
  1134  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1135  	// details.
  1136  	ForceSendFields []string `json:"-"`
  1137  	// NullFields is a list of field names (e.g. "MsSinceEpoch") to include in API
  1138  	// requests with the JSON null value. By default, fields with empty values are
  1139  	// omitted from API requests. See
  1140  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1141  	NullFields []string `json:"-"`
  1142  }
  1143  
  1144  func (s *DateInput) MarshalJSON() ([]byte, error) {
  1145  	type NoMethod DateInput
  1146  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1147  }
  1148  
  1149  // DateTimeInput: Date and time input values.
  1150  type DateTimeInput struct {
  1151  	// HasDate: Whether the `datetime` input includes a calendar date.
  1152  	HasDate bool `json:"hasDate,omitempty"`
  1153  	// HasTime: Whether the `datetime` input includes a timestamp.
  1154  	HasTime bool `json:"hasTime,omitempty"`
  1155  	// MsSinceEpoch: Time since epoch time, in milliseconds.
  1156  	MsSinceEpoch int64 `json:"msSinceEpoch,omitempty,string"`
  1157  	// ForceSendFields is a list of field names (e.g. "HasDate") to unconditionally
  1158  	// include in API requests. By default, fields with empty or default values are
  1159  	// omitted from API requests. See
  1160  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1161  	// details.
  1162  	ForceSendFields []string `json:"-"`
  1163  	// NullFields is a list of field names (e.g. "HasDate") to include in API
  1164  	// requests with the JSON null value. By default, fields with empty values are
  1165  	// omitted from API requests. See
  1166  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1167  	NullFields []string `json:"-"`
  1168  }
  1169  
  1170  func (s *DateTimeInput) MarshalJSON() ([]byte, error) {
  1171  	type NoMethod DateTimeInput
  1172  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1173  }
  1174  
  1175  // DeletionMetadata: Information about a deleted message. A message is deleted
  1176  // when `delete_time` is set.
  1177  type DeletionMetadata struct {
  1178  	// DeletionType: Indicates who deleted the message.
  1179  	//
  1180  	// Possible values:
  1181  	//   "DELETION_TYPE_UNSPECIFIED" - This value is unused.
  1182  	//   "CREATOR" - User deleted their own message.
  1183  	//   "SPACE_OWNER" - The space owner deleted the message.
  1184  	//   "ADMIN" - A Google Workspace admin deleted the message.
  1185  	//   "APP_MESSAGE_EXPIRY" - A Chat app deleted its own message when it expired.
  1186  	//   "CREATOR_VIA_APP" - A Chat app deleted the message on behalf of the user.
  1187  	//   "SPACE_OWNER_VIA_APP" - A Chat app deleted the message on behalf of the
  1188  	// space owner.
  1189  	DeletionType string `json:"deletionType,omitempty"`
  1190  	// ForceSendFields is a list of field names (e.g. "DeletionType") to
  1191  	// unconditionally include in API requests. By default, fields with empty or
  1192  	// default values are omitted from API requests. See
  1193  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1194  	// details.
  1195  	ForceSendFields []string `json:"-"`
  1196  	// NullFields is a list of field names (e.g. "DeletionType") to include in API
  1197  	// requests with the JSON null value. By default, fields with empty values are
  1198  	// omitted from API requests. See
  1199  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1200  	NullFields []string `json:"-"`
  1201  }
  1202  
  1203  func (s *DeletionMetadata) MarshalJSON() ([]byte, error) {
  1204  	type NoMethod DeletionMetadata
  1205  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1206  }
  1207  
  1208  // DeprecatedEvent: A Google Chat app interaction event. To learn about
  1209  // interaction events, see Receive and respond to interactions with your Google
  1210  // Chat app
  1211  // (https://developers.google.com/workspace/chat/api/guides/message-formats).
  1212  // To learn about event types and for example event payloads, see Types of
  1213  // Google Chat app interaction events
  1214  // (https://developers.google.com/workspace/chat/events). In addition to
  1215  // receiving events from user interactions, Chat apps can receive events about
  1216  // changes to spaces, such as when a new member is added to a space. To learn
  1217  // about space events, see Work with events from Google Chat
  1218  // (https://developers.google.com/workspace/chat/events-overview).
  1219  type DeprecatedEvent struct {
  1220  	// Action: For `CARD_CLICKED` interaction events, the form action data
  1221  	// associated when a user clicks a card or dialog. To learn more, see Read form
  1222  	// data input by users on cards
  1223  	// (https://developers.google.com/workspace/chat/read-form-data).
  1224  	Action *FormAction `json:"action,omitempty"`
  1225  	// Common: Represents information about the user's client, such as locale, host
  1226  	// app, and platform. For Chat apps, `CommonEventObject` includes information
  1227  	// submitted by users interacting with dialogs
  1228  	// (https://developers.google.com/workspace/chat/dialogs), like data entered on
  1229  	// a card.
  1230  	Common *CommonEventObject `json:"common,omitempty"`
  1231  	// ConfigCompleteRedirectUrl: The URL the Chat app should redirect the user to
  1232  	// after they have completed an authorization or configuration flow outside of
  1233  	// Google Chat. For more information, see Connect a Chat app with other
  1234  	// services & tools
  1235  	// (https://developers.google.com/workspace/chat/connect-web-services-tools).
  1236  	ConfigCompleteRedirectUrl string `json:"configCompleteRedirectUrl,omitempty"`
  1237  	// DialogEventType: The type of dialog
  1238  	// (https://developers.google.com/workspace/chat/dialogs) interaction event
  1239  	// received.
  1240  	//
  1241  	// Possible values:
  1242  	//   "TYPE_UNSPECIFIED" - Default value. Unspecified.
  1243  	//   "REQUEST_DIALOG" - A user opens a dialog.
  1244  	//   "SUBMIT_DIALOG" - A user clicks an interactive element of a dialog. For
  1245  	// example, a user fills out information in a dialog and clicks a button to
  1246  	// submit the information.
  1247  	//   "CANCEL_DIALOG" - A user closes a dialog without submitting information,
  1248  	// or the dialog is canceled.
  1249  	DialogEventType string `json:"dialogEventType,omitempty"`
  1250  	// EventTime: The timestamp indicating when the interaction event occurred.
  1251  	EventTime string `json:"eventTime,omitempty"`
  1252  	// IsDialogEvent: For `CARD_CLICKED` and `MESSAGE` interaction events, whether
  1253  	// the user is interacting with or about to interact with a dialog
  1254  	// (https://developers.google.com/workspace/chat/dialogs).
  1255  	IsDialogEvent bool `json:"isDialogEvent,omitempty"`
  1256  	// Message: The message that triggered the interaction event, if applicable.
  1257  	Message *Message `json:"message,omitempty"`
  1258  	// Space: The space in which the interaction event occurred.
  1259  	Space *Space `json:"space,omitempty"`
  1260  	// ThreadKey: The Chat app-defined key for the thread related to the
  1261  	// interaction event. See `spaces.messages.thread.threadKey`
  1262  	// (/chat/api/reference/rest/v1/spaces.messages#Thread.FIELDS.thread_key) for
  1263  	// more information.
  1264  	ThreadKey string `json:"threadKey,omitempty"`
  1265  	// Token: A secret value that legacy Chat apps can use to verify if a request
  1266  	// is from Google. Google randomly generates the token, and its value remains
  1267  	// static. You can obtain, revoke, or regenerate the token from the Chat API
  1268  	// configuration page
  1269  	// (https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)
  1270  	// in the Google Cloud Console. Modern Chat apps don't use this field. It is
  1271  	// absent from API responses and the Chat API configuration page
  1272  	// (https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat).
  1273  	Token string `json:"token,omitempty"`
  1274  	// Type: The type of interaction event. For details, see Types of Google Chat
  1275  	// app interaction events
  1276  	// (https://developers.google.com/workspace/chat/events).
  1277  	//
  1278  	// Possible values:
  1279  	//   "UNSPECIFIED" - Default value for the enum. DO NOT USE.
  1280  	//   "MESSAGE" - A user sends the Chat app a message, or invokes the Chat app
  1281  	// in a space.
  1282  	//   "ADDED_TO_SPACE" - A user adds the Chat app to a space, or a Google
  1283  	// Workspace administrator installs the Chat app in direct message spaces for
  1284  	// users in their organization.
  1285  	//   "REMOVED_FROM_SPACE" - A user removes the Chat app from a space.
  1286  	//   "CARD_CLICKED" - A user clicks an interactive element of a card or dialog
  1287  	// from a Chat app, such as a button. If a user interacts with a dialog, the
  1288  	// `CARD_CLICKED` interaction event's `isDialogEvent` field is set to `true`
  1289  	// and includes a
  1290  	// [`DialogEventType`](https://developers.google.com/workspace/chat/api/referenc
  1291  	// e/rest/v1/DialogEventType).
  1292  	//   "WIDGET_UPDATED" - A user updates a widget in a card message or dialog.
  1293  	Type string `json:"type,omitempty"`
  1294  	// User: The user that triggered the interaction event.
  1295  	User *User `json:"user,omitempty"`
  1296  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1297  	// include in API requests. By default, fields with empty or default values are
  1298  	// omitted from API requests. See
  1299  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1300  	// details.
  1301  	ForceSendFields []string `json:"-"`
  1302  	// NullFields is a list of field names (e.g. "Action") to include in API
  1303  	// requests with the JSON null value. By default, fields with empty values are
  1304  	// omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1306  	NullFields []string `json:"-"`
  1307  }
  1308  
  1309  func (s *DeprecatedEvent) MarshalJSON() ([]byte, error) {
  1310  	type NoMethod DeprecatedEvent
  1311  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1312  }
  1313  
  1314  // Dialog: Wrapper around the card body of the dialog.
  1315  type Dialog struct {
  1316  	// Body: Input only. Body of the dialog, which is rendered in a modal. Google
  1317  	// Chat apps don't support the following card entities: `DateTimePicker`,
  1318  	// `OnChangeAction`.
  1319  	Body *GoogleAppsCardV1Card `json:"body,omitempty"`
  1320  	// ForceSendFields is a list of field names (e.g. "Body") to unconditionally
  1321  	// include in API requests. By default, fields with empty or default values are
  1322  	// omitted from API requests. See
  1323  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1324  	// details.
  1325  	ForceSendFields []string `json:"-"`
  1326  	// NullFields is a list of field names (e.g. "Body") to include in API requests
  1327  	// with the JSON null value. By default, fields with empty values are omitted
  1328  	// from API requests. See
  1329  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1330  	NullFields []string `json:"-"`
  1331  }
  1332  
  1333  func (s *Dialog) MarshalJSON() ([]byte, error) {
  1334  	type NoMethod Dialog
  1335  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1336  }
  1337  
  1338  // DialogAction: Contains a dialog
  1339  // (https://developers.google.com/workspace/chat/dialogs) and request status
  1340  // code.
  1341  type DialogAction struct {
  1342  	// ActionStatus: Input only. Status for a request to either invoke or submit a
  1343  	// dialog (https://developers.google.com/workspace/chat/dialogs). Displays a
  1344  	// status and message to users, if necessary. For example, in case of an error
  1345  	// or success.
  1346  	ActionStatus *ActionStatus `json:"actionStatus,omitempty"`
  1347  	// Dialog: Input only. Dialog
  1348  	// (https://developers.google.com/workspace/chat/dialogs) for the request.
  1349  	Dialog *Dialog `json:"dialog,omitempty"`
  1350  	// ForceSendFields is a list of field names (e.g. "ActionStatus") to
  1351  	// unconditionally include in API requests. By default, fields with empty or
  1352  	// default values are omitted from API requests. See
  1353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1354  	// details.
  1355  	ForceSendFields []string `json:"-"`
  1356  	// NullFields is a list of field names (e.g. "ActionStatus") to include in API
  1357  	// requests with the JSON null value. By default, fields with empty values are
  1358  	// omitted from API requests. See
  1359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1360  	NullFields []string `json:"-"`
  1361  }
  1362  
  1363  func (s *DialogAction) MarshalJSON() ([]byte, error) {
  1364  	type NoMethod DialogAction
  1365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1366  }
  1367  
  1368  // DriveDataRef: A reference to the data of a drive attachment.
  1369  type DriveDataRef struct {
  1370  	// DriveFileId: The ID for the drive file. Use with the Drive API.
  1371  	DriveFileId string `json:"driveFileId,omitempty"`
  1372  	// ForceSendFields is a list of field names (e.g. "DriveFileId") to
  1373  	// unconditionally include in API requests. By default, fields with empty or
  1374  	// default values are omitted from API requests. See
  1375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1376  	// details.
  1377  	ForceSendFields []string `json:"-"`
  1378  	// NullFields is a list of field names (e.g. "DriveFileId") to include in API
  1379  	// requests with the JSON null value. By default, fields with empty values are
  1380  	// omitted from API requests. See
  1381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1382  	NullFields []string `json:"-"`
  1383  }
  1384  
  1385  func (s *DriveDataRef) MarshalJSON() ([]byte, error) {
  1386  	type NoMethod DriveDataRef
  1387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1388  }
  1389  
  1390  // DriveLinkData: Data for Google Drive links.
  1391  type DriveLinkData struct {
  1392  	// DriveDataRef: A DriveDataRef
  1393  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
  1394  	// which references a Google Drive file.
  1395  	DriveDataRef *DriveDataRef `json:"driveDataRef,omitempty"`
  1396  	// MimeType: The mime type of the linked Google Drive resource.
  1397  	MimeType string `json:"mimeType,omitempty"`
  1398  	// ForceSendFields is a list of field names (e.g. "DriveDataRef") to
  1399  	// unconditionally include in API requests. By default, fields with empty or
  1400  	// default values are omitted from API requests. See
  1401  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1402  	// details.
  1403  	ForceSendFields []string `json:"-"`
  1404  	// NullFields is a list of field names (e.g. "DriveDataRef") to include in API
  1405  	// requests with the JSON null value. By default, fields with empty values are
  1406  	// omitted from API requests. See
  1407  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1408  	NullFields []string `json:"-"`
  1409  }
  1410  
  1411  func (s *DriveLinkData) MarshalJSON() ([]byte, error) {
  1412  	type NoMethod DriveLinkData
  1413  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1414  }
  1415  
  1416  // Emoji: An emoji that is used as a reaction to a message.
  1417  type Emoji struct {
  1418  	// CustomEmoji: Output only. A custom emoji.
  1419  	CustomEmoji *CustomEmoji `json:"customEmoji,omitempty"`
  1420  	// Unicode: A basic emoji represented by a unicode string.
  1421  	Unicode string `json:"unicode,omitempty"`
  1422  	// ForceSendFields is a list of field names (e.g. "CustomEmoji") to
  1423  	// unconditionally include in API requests. By default, fields with empty or
  1424  	// default values are omitted from API requests. See
  1425  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1426  	// details.
  1427  	ForceSendFields []string `json:"-"`
  1428  	// NullFields is a list of field names (e.g. "CustomEmoji") to include in API
  1429  	// requests with the JSON null value. By default, fields with empty values are
  1430  	// omitted from API requests. See
  1431  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1432  	NullFields []string `json:"-"`
  1433  }
  1434  
  1435  func (s *Emoji) MarshalJSON() ([]byte, error) {
  1436  	type NoMethod Emoji
  1437  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1438  }
  1439  
  1440  // EmojiReactionSummary: The number of people who reacted to a message with a
  1441  // specific emoji.
  1442  type EmojiReactionSummary struct {
  1443  	// Emoji: Emoji associated with the reactions.
  1444  	Emoji *Emoji `json:"emoji,omitempty"`
  1445  	// ReactionCount: The total number of reactions using the associated emoji.
  1446  	ReactionCount int64 `json:"reactionCount,omitempty"`
  1447  	// ForceSendFields is a list of field names (e.g. "Emoji") to unconditionally
  1448  	// include in API requests. By default, fields with empty or default values are
  1449  	// omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1451  	// details.
  1452  	ForceSendFields []string `json:"-"`
  1453  	// NullFields is a list of field names (e.g. "Emoji") to include in API
  1454  	// requests with the JSON null value. By default, fields with empty values are
  1455  	// omitted from API requests. See
  1456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1457  	NullFields []string `json:"-"`
  1458  }
  1459  
  1460  func (s *EmojiReactionSummary) MarshalJSON() ([]byte, error) {
  1461  	type NoMethod EmojiReactionSummary
  1462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1463  }
  1464  
  1465  // Empty: A generic empty message that you can re-use to avoid defining
  1466  // duplicated empty messages in your APIs. A typical example is to use it as
  1467  // the request or the response type of an API method. For instance: service Foo
  1468  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1469  type Empty struct {
  1470  	// ServerResponse contains the HTTP response code and headers from the server.
  1471  	googleapi.ServerResponse `json:"-"`
  1472  }
  1473  
  1474  // FormAction: A form action describes the behavior when the form is submitted.
  1475  // For example, you can invoke Apps Script to handle the form.
  1476  type FormAction struct {
  1477  	// ActionMethodName: The method name is used to identify which part of the form
  1478  	// triggered the form submission. This information is echoed back to the Chat
  1479  	// app as part of the card click event. You can use the same method name for
  1480  	// several elements that trigger a common behavior.
  1481  	ActionMethodName string `json:"actionMethodName,omitempty"`
  1482  	// Parameters: List of action parameters.
  1483  	Parameters []*ActionParameter `json:"parameters,omitempty"`
  1484  	// ForceSendFields is a list of field names (e.g. "ActionMethodName") to
  1485  	// unconditionally include in API requests. By default, fields with empty or
  1486  	// default values are omitted from API requests. See
  1487  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1488  	// details.
  1489  	ForceSendFields []string `json:"-"`
  1490  	// NullFields is a list of field names (e.g. "ActionMethodName") to include in
  1491  	// API requests with the JSON null value. By default, fields with empty values
  1492  	// are omitted from API requests. See
  1493  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1494  	NullFields []string `json:"-"`
  1495  }
  1496  
  1497  func (s *FormAction) MarshalJSON() ([]byte, error) {
  1498  	type NoMethod FormAction
  1499  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1500  }
  1501  
  1502  // GoogleAppsCardV1Action: An action that describes the behavior when the form
  1503  // is submitted. For example, you can invoke an Apps Script script to handle
  1504  // the form. If the action is triggered, the form values are sent to the
  1505  // server. Google Workspace Add-ons and Chat apps
  1506  // (https://developers.google.com/workspace/extend):
  1507  type GoogleAppsCardV1Action struct {
  1508  	// Function: A custom function to invoke when the containing element is clicked
  1509  	// or otherwise activated. For example usage, see Read form data
  1510  	// (https://developers.google.com/workspace/chat/read-form-data).
  1511  	Function string `json:"function,omitempty"`
  1512  	// Interaction: Optional. Required when opening a dialog
  1513  	// (https://developers.google.com/workspace/chat/dialogs). What to do in
  1514  	// response to an interaction with a user, such as a user clicking a button in
  1515  	// a card message. If unspecified, the app responds by executing an
  1516  	// `action`—like opening a link or running a function—as normal. By
  1517  	// specifying an `interaction`, the app can respond in special interactive
  1518  	// ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
  1519  	// open a dialog (https://developers.google.com/workspace/chat/dialogs). When
  1520  	// specified, a loading indicator isn't shown. If specified for an add-on, the
  1521  	// entire card is stripped and nothing is shown in the client. Google Chat apps
  1522  	// (https://developers.google.com/workspace/chat):
  1523  	//
  1524  	// Possible values:
  1525  	//   "INTERACTION_UNSPECIFIED" - Default value. The `action` executes as
  1526  	// normal.
  1527  	//   "OPEN_DIALOG" - Opens a
  1528  	// [dialog](https://developers.google.com/workspace/chat/dialogs), a windowed,
  1529  	// card-based interface that Chat apps use to interact with users. Only
  1530  	// supported by Chat apps in response to button-clicks on card messages. If
  1531  	// specified for an add-on, the entire card is stripped and nothing is shown in
  1532  	// the client. [Google Chat
  1533  	// apps](https://developers.google.com/workspace/chat):
  1534  	Interaction string `json:"interaction,omitempty"`
  1535  	// LoadIndicator: Specifies the loading indicator that the action displays
  1536  	// while making the call to the action.
  1537  	//
  1538  	// Possible values:
  1539  	//   "SPINNER" - Displays a spinner to indicate that content is loading.
  1540  	//   "NONE" - Nothing is displayed.
  1541  	LoadIndicator string `json:"loadIndicator,omitempty"`
  1542  	// Parameters: List of action parameters.
  1543  	Parameters []*GoogleAppsCardV1ActionParameter `json:"parameters,omitempty"`
  1544  	// PersistValues: Indicates whether form values persist after the action. The
  1545  	// default value is `false`. If `true`, form values remain after the action is
  1546  	// triggered. To let the user make changes while the action is being processed,
  1547  	// set `LoadIndicator`
  1548  	// (https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
  1549  	// to `NONE`. For card messages
  1550  	// (https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
  1551  	// in Chat apps, you must also set the action's `ResponseType`
  1552  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
  1553  	// to `UPDATE_MESSAGE` and use the same `card_id`
  1554  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
  1555  	// from the card that contained the action. If `false`, the form values are
  1556  	// cleared when the action is triggered. To prevent the user from making
  1557  	// changes while the action is being processed, set `LoadIndicator`
  1558  	// (https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
  1559  	// to `SPINNER`.
  1560  	PersistValues bool `json:"persistValues,omitempty"`
  1561  	// ForceSendFields is a list of field names (e.g. "Function") to
  1562  	// unconditionally include in API requests. By default, fields with empty or
  1563  	// default values are omitted from API requests. See
  1564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1565  	// details.
  1566  	ForceSendFields []string `json:"-"`
  1567  	// NullFields is a list of field names (e.g. "Function") to include in API
  1568  	// requests with the JSON null value. By default, fields with empty values are
  1569  	// omitted from API requests. See
  1570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1571  	NullFields []string `json:"-"`
  1572  }
  1573  
  1574  func (s *GoogleAppsCardV1Action) MarshalJSON() ([]byte, error) {
  1575  	type NoMethod GoogleAppsCardV1Action
  1576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1577  }
  1578  
  1579  // GoogleAppsCardV1ActionParameter: List of string parameters to supply when
  1580  // the action method is invoked. For example, consider three snooze buttons:
  1581  // snooze now, snooze one day, or snooze next week. You might use `action
  1582  // method = snooze()`, passing the snooze type and snooze time in the list of
  1583  // string parameters. To learn more, see `CommonEventObject`
  1584  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  1585  // Google Workspace Add-ons and Chat apps
  1586  // (https://developers.google.com/workspace/extend):
  1587  type GoogleAppsCardV1ActionParameter struct {
  1588  	// Key: The name of the parameter for the action script.
  1589  	Key string `json:"key,omitempty"`
  1590  	// Value: The value of the parameter.
  1591  	Value string `json:"value,omitempty"`
  1592  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  1593  	// include in API requests. By default, fields with empty or default values are
  1594  	// omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1596  	// details.
  1597  	ForceSendFields []string `json:"-"`
  1598  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  1599  	// with the JSON null value. By default, fields with empty values are omitted
  1600  	// from API requests. See
  1601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1602  	NullFields []string `json:"-"`
  1603  }
  1604  
  1605  func (s *GoogleAppsCardV1ActionParameter) MarshalJSON() ([]byte, error) {
  1606  	type NoMethod GoogleAppsCardV1ActionParameter
  1607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1608  }
  1609  
  1610  // GoogleAppsCardV1BorderStyle: The style options for the border of a card or
  1611  // widget, including the border type and color. Google Workspace Add-ons and
  1612  // Chat apps (https://developers.google.com/workspace/extend):
  1613  type GoogleAppsCardV1BorderStyle struct {
  1614  	// CornerRadius: The corner radius for the border.
  1615  	CornerRadius int64 `json:"cornerRadius,omitempty"`
  1616  	// StrokeColor: The colors to use when the type is `BORDER_TYPE_STROKE`.
  1617  	StrokeColor *Color `json:"strokeColor,omitempty"`
  1618  	// Type: The border type.
  1619  	//
  1620  	// Possible values:
  1621  	//   "BORDER_TYPE_UNSPECIFIED" - Don't use. Unspecified.
  1622  	//   "NO_BORDER" - Default value. No border.
  1623  	//   "STROKE" - Outline.
  1624  	Type string `json:"type,omitempty"`
  1625  	// ForceSendFields is a list of field names (e.g. "CornerRadius") to
  1626  	// unconditionally include in API requests. By default, fields with empty or
  1627  	// default values are omitted from API requests. See
  1628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1629  	// details.
  1630  	ForceSendFields []string `json:"-"`
  1631  	// NullFields is a list of field names (e.g. "CornerRadius") to include in API
  1632  	// requests with the JSON null value. By default, fields with empty values are
  1633  	// omitted from API requests. See
  1634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1635  	NullFields []string `json:"-"`
  1636  }
  1637  
  1638  func (s *GoogleAppsCardV1BorderStyle) MarshalJSON() ([]byte, error) {
  1639  	type NoMethod GoogleAppsCardV1BorderStyle
  1640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1641  }
  1642  
  1643  // GoogleAppsCardV1Button: A text, icon, or text and icon button that users can
  1644  // click. For an example in Google Chat apps, see Add a button
  1645  // (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
  1646  // To make an image a clickable button, specify an `Image` (not an
  1647  // `ImageComponent`) and set an `onClick` action. Google Workspace Add-ons and
  1648  // Chat apps (https://developers.google.com/workspace/extend):
  1649  type GoogleAppsCardV1Button struct {
  1650  	// AltText: The alternative text that's used for accessibility. Set descriptive
  1651  	// text that lets users know what the button does. For example, if a button
  1652  	// opens a hyperlink, you might write: "Opens a new browser tab and navigates
  1653  	// to the Google Chat developer documentation at
  1654  	// https://developers.google.com/workspace/chat".
  1655  	AltText string `json:"altText,omitempty"`
  1656  	// Color: If set, the button is filled with a solid background color and the
  1657  	// font color changes to maintain contrast with the background color. For
  1658  	// example, setting a blue background likely results in white text. If unset,
  1659  	// the image background is white and the font color is blue. For red, green,
  1660  	// and blue, the value of each field is a `float` number that you can express
  1661  	// in either of two ways: as a number between 0 and 255 divided by 255
  1662  	// (153/255), or as a value between 0 and 1 (0.6). 0 represents the absence of
  1663  	// a color and 1 or 255/255 represent the full presence of that color on the
  1664  	// RGB scale. Optionally set `alpha`, which sets a level of transparency using
  1665  	// this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) *
  1666  	// (background color) ``` For `alpha`, a value of `1` corresponds with a solid
  1667  	// color, and a value of `0` corresponds with a completely transparent color.
  1668  	// For example, the following color represents a half transparent red: ```
  1669  	// "color": { "red": 1, "green": 0, "blue": 0, "alpha": 0.5 } ```
  1670  	Color *Color `json:"color,omitempty"`
  1671  	// Disabled: If `true`, the button is displayed in an inactive state and
  1672  	// doesn't respond to user actions.
  1673  	Disabled bool `json:"disabled,omitempty"`
  1674  	// Icon: The icon image. If both `icon` and `text` are set, then the icon
  1675  	// appears before the text.
  1676  	Icon *GoogleAppsCardV1Icon `json:"icon,omitempty"`
  1677  	// OnClick: Required. The action to perform when a user clicks the button, such
  1678  	// as opening a hyperlink or running a custom function.
  1679  	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`
  1680  	// Text: The text displayed inside the button.
  1681  	Text string `json:"text,omitempty"`
  1682  	// ForceSendFields is a list of field names (e.g. "AltText") to unconditionally
  1683  	// include in API requests. By default, fields with empty or default values are
  1684  	// omitted from API requests. See
  1685  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1686  	// details.
  1687  	ForceSendFields []string `json:"-"`
  1688  	// NullFields is a list of field names (e.g. "AltText") to include in API
  1689  	// requests with the JSON null value. By default, fields with empty values are
  1690  	// omitted from API requests. See
  1691  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1692  	NullFields []string `json:"-"`
  1693  }
  1694  
  1695  func (s *GoogleAppsCardV1Button) MarshalJSON() ([]byte, error) {
  1696  	type NoMethod GoogleAppsCardV1Button
  1697  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1698  }
  1699  
  1700  // GoogleAppsCardV1ButtonList: A list of buttons layed out horizontally. For an
  1701  // example in Google Chat apps, see Add a button
  1702  // (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
  1703  // Google Workspace Add-ons and Chat apps
  1704  // (https://developers.google.com/workspace/extend):
  1705  type GoogleAppsCardV1ButtonList struct {
  1706  	// Buttons: An array of buttons.
  1707  	Buttons []*GoogleAppsCardV1Button `json:"buttons,omitempty"`
  1708  	// ForceSendFields is a list of field names (e.g. "Buttons") to unconditionally
  1709  	// include in API requests. By default, fields with empty or default values are
  1710  	// omitted from API requests. See
  1711  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1712  	// details.
  1713  	ForceSendFields []string `json:"-"`
  1714  	// NullFields is a list of field names (e.g. "Buttons") to include in API
  1715  	// requests with the JSON null value. By default, fields with empty values are
  1716  	// omitted from API requests. See
  1717  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1718  	NullFields []string `json:"-"`
  1719  }
  1720  
  1721  func (s *GoogleAppsCardV1ButtonList) MarshalJSON() ([]byte, error) {
  1722  	type NoMethod GoogleAppsCardV1ButtonList
  1723  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1724  }
  1725  
  1726  // GoogleAppsCardV1Card: A card interface displayed in a Google Chat message or
  1727  // Google Workspace Add-on. Cards support a defined layout, interactive UI
  1728  // elements like buttons, and rich media like images. Use cards to present
  1729  // detailed information, gather information from users, and guide users to take
  1730  // a next step. Card builder (https://addons.gsuite.google.com/uikit/builder)
  1731  // To learn how to build cards, see the following documentation: * For Google
  1732  // Chat apps, see Design the components of a card or dialog
  1733  // (https://developers.google.com/workspace/chat/design-components-card-dialog).
  1734  // * For Google Workspace Add-ons, see Card-based interfaces
  1735  // (https://developers.google.com/apps-script/add-ons/concepts/cards).
  1736  // **Example: Card message for a Google Chat app** !Example contact card
  1737  // (https://developers.google.com/workspace/chat/images/card_api_reference.png)
  1738  // To create the sample card message in Google Chat, use the following JSON:
  1739  // ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": {
  1740  // "title": "Sasha", "subtitle": "Software Engineer", "imageUrl":
  1741  // "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.pn
  1742  // g", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections":
  1743  // [ { "header": "Contact Info", "collapsible": true,
  1744  // "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": {
  1745  // "startIcon": { "knownIcon": "EMAIL" }, "text": "sasha@example.com" } }, {
  1746  // "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online"
  1747  // } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1
  1748  // (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share",
  1749  // "onClick": { "openLink": { "url": "https://example.com/share" } } }, {
  1750  // "text": "Edit", "onClick": { "action": { "function": "goToView",
  1751  // "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] }
  1752  // } ] } ```
  1753  type GoogleAppsCardV1Card struct {
  1754  	// CardActions: The card's actions. Actions are added to the card's toolbar
  1755  	// menu. Google Workspace Add-ons
  1756  	// (https://developers.google.com/workspace/add-ons): For example, the
  1757  	// following JSON constructs a card action menu with `Settings` and `Send
  1758  	// Feedback` options: ``` "card_actions": [ { "actionLabel": "Settings",
  1759  	// "onClick": { "action": { "functionName": "goToView", "parameters": [ {
  1760  	// "key": "viewType", "value": "SETTING" } ], "loadIndicator":
  1761  	// "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick":
  1762  	// { "openLink": { "url": "https://example.com/feedback" } } } ] ```
  1763  	CardActions []*GoogleAppsCardV1CardAction `json:"cardActions,omitempty"`
  1764  	// DisplayStyle: In Google Workspace Add-ons, sets the display properties of
  1765  	// the `peekCardHeader`. Google Workspace Add-ons
  1766  	// (https://developers.google.com/workspace/add-ons):
  1767  	//
  1768  	// Possible values:
  1769  	//   "DISPLAY_STYLE_UNSPECIFIED" - Don't use. Unspecified.
  1770  	//   "PEEK" - The header of the card appears at the bottom of the sidebar,
  1771  	// partially covering the current top card of the stack. Clicking the header
  1772  	// pops the card into the card stack. If the card has no header, a generated
  1773  	// header is used instead.
  1774  	//   "REPLACE" - Default value. The card is shown by replacing the view of the
  1775  	// top card in the card stack.
  1776  	DisplayStyle string `json:"displayStyle,omitempty"`
  1777  	// FixedFooter: The fixed footer shown at the bottom of this card. Setting
  1778  	// `fixedFooter` without specifying a `primaryButton` or a `secondaryButton`
  1779  	// causes an error. For Chat apps, you can use fixed footers in dialogs
  1780  	// (https://developers.google.com/workspace/chat/dialogs), but not card
  1781  	// messages
  1782  	// (https://developers.google.com/workspace/chat/create-messages#create).
  1783  	// Google Workspace Add-ons and Chat apps
  1784  	// (https://developers.google.com/workspace/extend):
  1785  	FixedFooter *GoogleAppsCardV1CardFixedFooter `json:"fixedFooter,omitempty"`
  1786  	// Header: The header of the card. A header usually contains a leading image
  1787  	// and a title. Headers always appear at the top of a card.
  1788  	Header *GoogleAppsCardV1CardHeader `json:"header,omitempty"`
  1789  	// Name: Name of the card. Used as a card identifier in card navigation. Google
  1790  	// Workspace Add-ons (https://developers.google.com/workspace/add-ons):
  1791  	Name string `json:"name,omitempty"`
  1792  	// PeekCardHeader: When displaying contextual content, the peek card header
  1793  	// acts as a placeholder so that the user can navigate forward between the
  1794  	// homepage cards and the contextual cards. Google Workspace Add-ons
  1795  	// (https://developers.google.com/workspace/add-ons):
  1796  	PeekCardHeader *GoogleAppsCardV1CardHeader `json:"peekCardHeader,omitempty"`
  1797  	// SectionDividerStyle: The divider style between sections.
  1798  	//
  1799  	// Possible values:
  1800  	//   "DIVIDER_STYLE_UNSPECIFIED" - Don't use. Unspecified.
  1801  	//   "SOLID_DIVIDER" - Default option. Render a solid divider between sections.
  1802  	//   "NO_DIVIDER" - If set, no divider is rendered between sections.
  1803  	SectionDividerStyle string `json:"sectionDividerStyle,omitempty"`
  1804  	// Sections: Contains a collection of widgets. Each section has its own,
  1805  	// optional header. Sections are visually separated by a line divider. For an
  1806  	// example in Google Chat apps, see Define a section of a card
  1807  	// (https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).
  1808  	Sections []*GoogleAppsCardV1Section `json:"sections,omitempty"`
  1809  	// ForceSendFields is a list of field names (e.g. "CardActions") to
  1810  	// unconditionally include in API requests. By default, fields with empty or
  1811  	// default values are omitted from API requests. See
  1812  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1813  	// details.
  1814  	ForceSendFields []string `json:"-"`
  1815  	// NullFields is a list of field names (e.g. "CardActions") to include in API
  1816  	// requests with the JSON null value. By default, fields with empty values are
  1817  	// omitted from API requests. See
  1818  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1819  	NullFields []string `json:"-"`
  1820  }
  1821  
  1822  func (s *GoogleAppsCardV1Card) MarshalJSON() ([]byte, error) {
  1823  	type NoMethod GoogleAppsCardV1Card
  1824  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1825  }
  1826  
  1827  // GoogleAppsCardV1CardAction: A card action is the action associated with the
  1828  // card. For example, an invoice card might include actions such as delete
  1829  // invoice, email invoice, or open the invoice in a browser. Google Workspace
  1830  // Add-ons (https://developers.google.com/workspace/add-ons):
  1831  type GoogleAppsCardV1CardAction struct {
  1832  	// ActionLabel: The label that displays as the action menu item.
  1833  	ActionLabel string `json:"actionLabel,omitempty"`
  1834  	// OnClick: The `onClick` action for this action item.
  1835  	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`
  1836  	// ForceSendFields is a list of field names (e.g. "ActionLabel") to
  1837  	// unconditionally include in API requests. By default, fields with empty or
  1838  	// default values are omitted from API requests. See
  1839  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1840  	// details.
  1841  	ForceSendFields []string `json:"-"`
  1842  	// NullFields is a list of field names (e.g. "ActionLabel") to include in API
  1843  	// requests with the JSON null value. By default, fields with empty values are
  1844  	// omitted from API requests. See
  1845  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1846  	NullFields []string `json:"-"`
  1847  }
  1848  
  1849  func (s *GoogleAppsCardV1CardAction) MarshalJSON() ([]byte, error) {
  1850  	type NoMethod GoogleAppsCardV1CardAction
  1851  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1852  }
  1853  
  1854  // GoogleAppsCardV1CardFixedFooter: A persistent (sticky) footer that that
  1855  // appears at the bottom of the card. Setting `fixedFooter` without specifying
  1856  // a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you
  1857  // can use fixed footers in dialogs
  1858  // (https://developers.google.com/workspace/chat/dialogs), but not card
  1859  // messages
  1860  // (https://developers.google.com/workspace/chat/create-messages#create). For
  1861  // an example in Google Chat apps, see Add a persistent footer
  1862  // (https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer).
  1863  // Google Workspace Add-ons and Chat apps
  1864  // (https://developers.google.com/workspace/extend):
  1865  type GoogleAppsCardV1CardFixedFooter struct {
  1866  	// PrimaryButton: The primary button of the fixed footer. The button must be a
  1867  	// text button with text and color set.
  1868  	PrimaryButton *GoogleAppsCardV1Button `json:"primaryButton,omitempty"`
  1869  	// SecondaryButton: The secondary button of the fixed footer. The button must
  1870  	// be a text button with text and color set. If `secondaryButton` is set, you
  1871  	// must also set `primaryButton`.
  1872  	SecondaryButton *GoogleAppsCardV1Button `json:"secondaryButton,omitempty"`
  1873  	// ForceSendFields is a list of field names (e.g. "PrimaryButton") to
  1874  	// unconditionally include in API requests. By default, fields with empty or
  1875  	// default values are omitted from API requests. See
  1876  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1877  	// details.
  1878  	ForceSendFields []string `json:"-"`
  1879  	// NullFields is a list of field names (e.g. "PrimaryButton") to include in API
  1880  	// requests with the JSON null value. By default, fields with empty values are
  1881  	// omitted from API requests. See
  1882  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1883  	NullFields []string `json:"-"`
  1884  }
  1885  
  1886  func (s *GoogleAppsCardV1CardFixedFooter) MarshalJSON() ([]byte, error) {
  1887  	type NoMethod GoogleAppsCardV1CardFixedFooter
  1888  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1889  }
  1890  
  1891  // GoogleAppsCardV1CardHeader: Represents a card header. For an example in
  1892  // Google Chat apps, see Add a header
  1893  // (https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header).
  1894  // Google Workspace Add-ons and Chat apps
  1895  // (https://developers.google.com/workspace/extend):
  1896  type GoogleAppsCardV1CardHeader struct {
  1897  	// ImageAltText: The alternative text of this image that's used for
  1898  	// accessibility.
  1899  	ImageAltText string `json:"imageAltText,omitempty"`
  1900  	// ImageType: The shape used to crop the image. Google Workspace Add-ons and
  1901  	// Chat apps (https://developers.google.com/workspace/extend):
  1902  	//
  1903  	// Possible values:
  1904  	//   "SQUARE" - Default value. Applies a square mask to the image. For example,
  1905  	// a 4x3 image becomes 3x3.
  1906  	//   "CIRCLE" - Applies a circular mask to the image. For example, a 4x3 image
  1907  	// becomes a circle with a diameter of 3.
  1908  	ImageType string `json:"imageType,omitempty"`
  1909  	// ImageUrl: The HTTPS URL of the image in the card header.
  1910  	ImageUrl string `json:"imageUrl,omitempty"`
  1911  	// Subtitle: The subtitle of the card header. If specified, appears on its own
  1912  	// line below the `title`.
  1913  	Subtitle string `json:"subtitle,omitempty"`
  1914  	// Title: Required. The title of the card header. The header has a fixed
  1915  	// height: if both a title and subtitle are specified, each takes up one line.
  1916  	// If only the title is specified, it takes up both lines.
  1917  	Title string `json:"title,omitempty"`
  1918  	// ForceSendFields is a list of field names (e.g. "ImageAltText") to
  1919  	// unconditionally include in API requests. By default, fields with empty or
  1920  	// default values are omitted from API requests. See
  1921  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1922  	// details.
  1923  	ForceSendFields []string `json:"-"`
  1924  	// NullFields is a list of field names (e.g. "ImageAltText") to include in API
  1925  	// requests with the JSON null value. By default, fields with empty values are
  1926  	// omitted from API requests. See
  1927  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1928  	NullFields []string `json:"-"`
  1929  }
  1930  
  1931  func (s *GoogleAppsCardV1CardHeader) MarshalJSON() ([]byte, error) {
  1932  	type NoMethod GoogleAppsCardV1CardHeader
  1933  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1934  }
  1935  
  1936  // GoogleAppsCardV1Column: A column. Google Workspace Add-ons and Chat apps
  1937  // (https://developers.google.com/workspace/extend): Columns for Google
  1938  // Workspace Add-ons are in Developer Preview.
  1939  type GoogleAppsCardV1Column struct {
  1940  	// HorizontalAlignment: Specifies whether widgets align to the left, right, or
  1941  	// center of a column.
  1942  	//
  1943  	// Possible values:
  1944  	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
  1945  	//   "START" - Default value. Aligns widgets to the start position of the
  1946  	// column. For left-to-right layouts, aligns to the left. For right-to-left
  1947  	// layouts, aligns to the right.
  1948  	//   "CENTER" - Aligns widgets to the center of the column.
  1949  	//   "END" - Aligns widgets to the end position of the column. For
  1950  	// left-to-right layouts, aligns widgets to the right. For right-to-left
  1951  	// layouts, aligns widgets to the left.
  1952  	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  1953  	// HorizontalSizeStyle: Specifies how a column fills the width of the card.
  1954  	//
  1955  	// Possible values:
  1956  	//   "HORIZONTAL_SIZE_STYLE_UNSPECIFIED" - Don't use. Unspecified.
  1957  	//   "FILL_AVAILABLE_SPACE" - Default value. Column fills the available space,
  1958  	// up to 70% of the card's width. If both columns are set to
  1959  	// `FILL_AVAILABLE_SPACE`, each column fills 50% of the space.
  1960  	//   "FILL_MINIMUM_SPACE" - Column fills the least amount of space possible and
  1961  	// no more than 30% of the card's width.
  1962  	HorizontalSizeStyle string `json:"horizontalSizeStyle,omitempty"`
  1963  	// VerticalAlignment: Specifies whether widgets align to the top, bottom, or
  1964  	// center of a column.
  1965  	//
  1966  	// Possible values:
  1967  	//   "VERTICAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
  1968  	//   "CENTER" - Default value. Aligns widgets to the center of a column.
  1969  	//   "TOP" - Aligns widgets to the top of a column.
  1970  	//   "BOTTOM" - Aligns widgets to the bottom of a column.
  1971  	VerticalAlignment string `json:"verticalAlignment,omitempty"`
  1972  	// Widgets: An array of widgets included in a column. Widgets appear in the
  1973  	// order that they are specified.
  1974  	Widgets []*GoogleAppsCardV1Widgets `json:"widgets,omitempty"`
  1975  	// ForceSendFields is a list of field names (e.g. "HorizontalAlignment") to
  1976  	// unconditionally include in API requests. By default, fields with empty or
  1977  	// default values are omitted from API requests. See
  1978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1979  	// details.
  1980  	ForceSendFields []string `json:"-"`
  1981  	// NullFields is a list of field names (e.g. "HorizontalAlignment") to include
  1982  	// in API requests with the JSON null value. By default, fields with empty
  1983  	// values are omitted from API requests. See
  1984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1985  	NullFields []string `json:"-"`
  1986  }
  1987  
  1988  func (s *GoogleAppsCardV1Column) MarshalJSON() ([]byte, error) {
  1989  	type NoMethod GoogleAppsCardV1Column
  1990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1991  }
  1992  
  1993  // GoogleAppsCardV1Columns: The `Columns` widget displays up to 2 columns in a
  1994  // card or dialog. You can add widgets to each column; the widgets appear in
  1995  // the order that they are specified. For an example in Google Chat apps, see
  1996  // Display cards and dialogs in columns
  1997  // (https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns).
  1998  // The height of each column is determined by the taller column. For example,
  1999  // if the first column is taller than the second column, both columns have the
  2000  // height of the first column. Because each column can contain a different
  2001  // number of widgets, you can't define rows or align widgets between the
  2002  // columns. Columns are displayed side-by-side. You can customize the width of
  2003  // each column using the `HorizontalSizeStyle` field. If the user's screen
  2004  // width is too narrow, the second column wraps below the first: * On web, the
  2005  // second column wraps if the screen width is less than or equal to 480 pixels.
  2006  // * On iOS devices, the second column wraps if the screen width is less than
  2007  // or equal to 300 pt. * On Android devices, the second column wraps if the
  2008  // screen width is less than or equal to 320 dp. To include more than 2
  2009  // columns, or to use rows, use the `Grid` widget. Google Workspace Add-ons and
  2010  // Chat apps (https://developers.google.com/workspace/extend): Columns for
  2011  // Google Workspace Add-ons are in Developer Preview.
  2012  type GoogleAppsCardV1Columns struct {
  2013  	// ColumnItems: An array of columns. You can include up to 2 columns in a card
  2014  	// or dialog.
  2015  	ColumnItems []*GoogleAppsCardV1Column `json:"columnItems,omitempty"`
  2016  	// ForceSendFields is a list of field names (e.g. "ColumnItems") to
  2017  	// unconditionally include in API requests. By default, fields with empty or
  2018  	// default values are omitted from API requests. See
  2019  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2020  	// details.
  2021  	ForceSendFields []string `json:"-"`
  2022  	// NullFields is a list of field names (e.g. "ColumnItems") to include in API
  2023  	// requests with the JSON null value. By default, fields with empty values are
  2024  	// omitted from API requests. See
  2025  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2026  	NullFields []string `json:"-"`
  2027  }
  2028  
  2029  func (s *GoogleAppsCardV1Columns) MarshalJSON() ([]byte, error) {
  2030  	type NoMethod GoogleAppsCardV1Columns
  2031  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2032  }
  2033  
  2034  // GoogleAppsCardV1DateTimePicker: Lets users input a date, a time, or both a
  2035  // date and a time. For an example in Google Chat apps, see Let a user pick a
  2036  // date and time
  2037  // (https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
  2038  // Users can input text or use the picker to select dates and times. If users
  2039  // input an invalid date or time, the picker shows an error that prompts users
  2040  // to input the information correctly. Google Workspace Add-ons and Chat apps
  2041  // (https://developers.google.com/workspace/extend):
  2042  type GoogleAppsCardV1DateTimePicker struct {
  2043  	// Label: The text that prompts users to input a date, a time, or a date and
  2044  	// time. For example, if users are scheduling an appointment, use a label such
  2045  	// as `Appointment date` or `Appointment date and time`.
  2046  	Label string `json:"label,omitempty"`
  2047  	// Name: The name by which the `DateTimePicker` is identified in a form input
  2048  	// event. For details about working with form inputs, see Receive form data
  2049  	// (https://developers.google.com/workspace/chat/read-form-data).
  2050  	Name string `json:"name,omitempty"`
  2051  	// OnChangeAction: Triggered when the user clicks **Save** or **Clear** from
  2052  	// the `DateTimePicker` interface.
  2053  	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`
  2054  	// TimezoneOffsetDate: The number representing the time zone offset from UTC,
  2055  	// in minutes. If set, the `value_ms_epoch` is displayed in the specified time
  2056  	// zone. If unset, the value defaults to the user's time zone setting.
  2057  	TimezoneOffsetDate int64 `json:"timezoneOffsetDate,omitempty"`
  2058  	// Type: Whether the widget supports inputting a date, a time, or the date and
  2059  	// time.
  2060  	//
  2061  	// Possible values:
  2062  	//   "DATE_AND_TIME" - Users input a date and time.
  2063  	//   "DATE_ONLY" - Users input a date.
  2064  	//   "TIME_ONLY" - Users input a time.
  2065  	Type string `json:"type,omitempty"`
  2066  	// ValueMsEpoch: The default value displayed in the widget, in milliseconds
  2067  	// since Unix epoch time (https://en.wikipedia.org/wiki/Unix_time). Specify the
  2068  	// value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`:
  2069  	// a calendar date and time in UTC. For example, to represent January 1, 2023
  2070  	// at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at
  2071  	// 00:00:00 UTC. For example, to represent January 1, 2023, use
  2072  	// `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent
  2073  	// 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).
  2074  	ValueMsEpoch int64 `json:"valueMsEpoch,omitempty,string"`
  2075  	// ForceSendFields is a list of field names (e.g. "Label") to unconditionally
  2076  	// include in API requests. By default, fields with empty or default values are
  2077  	// omitted from API requests. See
  2078  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2079  	// details.
  2080  	ForceSendFields []string `json:"-"`
  2081  	// NullFields is a list of field names (e.g. "Label") to include in API
  2082  	// requests with the JSON null value. By default, fields with empty values are
  2083  	// omitted from API requests. See
  2084  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2085  	NullFields []string `json:"-"`
  2086  }
  2087  
  2088  func (s *GoogleAppsCardV1DateTimePicker) MarshalJSON() ([]byte, error) {
  2089  	type NoMethod GoogleAppsCardV1DateTimePicker
  2090  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2091  }
  2092  
  2093  // GoogleAppsCardV1DecoratedText: A widget that displays text with optional
  2094  // decorations such as a label above or below the text, an icon in front of the
  2095  // text, a selection widget, or a button after the text. For an example in
  2096  // Google Chat apps, see Display text with decorative text
  2097  // (https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements).
  2098  // Google Workspace Add-ons and Chat apps
  2099  // (https://developers.google.com/workspace/extend):
  2100  type GoogleAppsCardV1DecoratedText struct {
  2101  	// BottomLabel: The text that appears below `text`. Always wraps.
  2102  	BottomLabel string `json:"bottomLabel,omitempty"`
  2103  	// Button: A button that a user can click to trigger an action.
  2104  	Button *GoogleAppsCardV1Button `json:"button,omitempty"`
  2105  	// EndIcon: An icon displayed after the text. Supports built-in
  2106  	// (https://developers.google.com/workspace/chat/format-messages#builtinicons)
  2107  	// and custom
  2108  	// (https://developers.google.com/workspace/chat/format-messages#customicons)
  2109  	// icons.
  2110  	EndIcon *GoogleAppsCardV1Icon `json:"endIcon,omitempty"`
  2111  	// Icon: Deprecated in favor of `startIcon`.
  2112  	Icon *GoogleAppsCardV1Icon `json:"icon,omitempty"`
  2113  	// OnClick: This action is triggered when users click `topLabel` or
  2114  	// `bottomLabel`.
  2115  	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`
  2116  	// StartIcon: The icon displayed in front of the text.
  2117  	StartIcon *GoogleAppsCardV1Icon `json:"startIcon,omitempty"`
  2118  	// SwitchControl: A switch widget that a user can click to change its state and
  2119  	// trigger an action.
  2120  	SwitchControl *GoogleAppsCardV1SwitchControl `json:"switchControl,omitempty"`
  2121  	// Text: Required. The primary text. Supports simple formatting. For more
  2122  	// information about formatting text, see Formatting text in Google Chat apps
  2123  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  2124  	// and Formatting text in Google Workspace Add-ons
  2125  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  2126  	Text string `json:"text,omitempty"`
  2127  	// TopLabel: The text that appears above `text`. Always truncates.
  2128  	TopLabel string `json:"topLabel,omitempty"`
  2129  	// WrapText: The wrap text setting. If `true`, the text wraps and displays on
  2130  	// multiple lines. Otherwise, the text is truncated. Only applies to `text`,
  2131  	// not `topLabel` and `bottomLabel`.
  2132  	WrapText bool `json:"wrapText,omitempty"`
  2133  	// ForceSendFields is a list of field names (e.g. "BottomLabel") to
  2134  	// unconditionally include in API requests. By default, fields with empty or
  2135  	// default values are omitted from API requests. See
  2136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2137  	// details.
  2138  	ForceSendFields []string `json:"-"`
  2139  	// NullFields is a list of field names (e.g. "BottomLabel") to include in API
  2140  	// requests with the JSON null value. By default, fields with empty values are
  2141  	// omitted from API requests. See
  2142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2143  	NullFields []string `json:"-"`
  2144  }
  2145  
  2146  func (s *GoogleAppsCardV1DecoratedText) MarshalJSON() ([]byte, error) {
  2147  	type NoMethod GoogleAppsCardV1DecoratedText
  2148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2149  }
  2150  
  2151  // GoogleAppsCardV1Divider: Displays a divider between widgets as a horizontal
  2152  // line. For an example in Google Chat apps, see Add a horizontal divider
  2153  // between widgets
  2154  // (https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets).
  2155  // Google Workspace Add-ons and Chat apps
  2156  // (https://developers.google.com/workspace/extend): For example, the following
  2157  // JSON creates a divider: ``` "divider": {} ```
  2158  type GoogleAppsCardV1Divider struct {
  2159  }
  2160  
  2161  // GoogleAppsCardV1Grid: Displays a grid with a collection of items. Items can
  2162  // only include text or images. For responsive columns, or to include more than
  2163  // text or images, use `Columns`. For an example in Google Chat apps, see
  2164  // Display a Grid with a collection of items
  2165  // (https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items).
  2166  // A grid supports any number of columns and items. The number of rows is
  2167  // determined by items divided by columns. A grid with 10 items and 2 columns
  2168  // has 5 rows. A grid with 11 items and 2 columns has 6 rows. Google Workspace
  2169  // Add-ons and Chat apps (https://developers.google.com/workspace/extend): For
  2170  // example, the following JSON creates a 2 column grid with a single item: ```
  2171  // "grid": { "title": "A fine collection of items", "columnCount": 2,
  2172  // "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ {
  2173  // "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": {
  2174  // "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An
  2175  // item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url":
  2176  // "https://www.example.com" } } } ```
  2177  type GoogleAppsCardV1Grid struct {
  2178  	// BorderStyle: The border style to apply to each grid item.
  2179  	BorderStyle *GoogleAppsCardV1BorderStyle `json:"borderStyle,omitempty"`
  2180  	// ColumnCount: The number of columns to display in the grid. A default value
  2181  	// is used if this field isn't specified, and that default value is different
  2182  	// depending on where the grid is shown (dialog versus companion).
  2183  	ColumnCount int64 `json:"columnCount,omitempty"`
  2184  	// Items: The items to display in the grid.
  2185  	Items []*GoogleAppsCardV1GridItem `json:"items,omitempty"`
  2186  	// OnClick: This callback is reused by each individual grid item, but with the
  2187  	// item's identifier and index in the items list added to the callback's
  2188  	// parameters.
  2189  	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`
  2190  	// Title: The text that displays in the grid header.
  2191  	Title string `json:"title,omitempty"`
  2192  	// ForceSendFields is a list of field names (e.g. "BorderStyle") to
  2193  	// unconditionally include in API requests. By default, fields with empty or
  2194  	// default values are omitted from API requests. See
  2195  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2196  	// details.
  2197  	ForceSendFields []string `json:"-"`
  2198  	// NullFields is a list of field names (e.g. "BorderStyle") to include in API
  2199  	// requests with the JSON null value. By default, fields with empty values are
  2200  	// omitted from API requests. See
  2201  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2202  	NullFields []string `json:"-"`
  2203  }
  2204  
  2205  func (s *GoogleAppsCardV1Grid) MarshalJSON() ([]byte, error) {
  2206  	type NoMethod GoogleAppsCardV1Grid
  2207  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2208  }
  2209  
  2210  // GoogleAppsCardV1GridItem: Represents an item in a grid layout. Items can
  2211  // contain text, an image, or both text and an image. Google Workspace Add-ons
  2212  // and Chat apps (https://developers.google.com/workspace/extend):
  2213  type GoogleAppsCardV1GridItem struct {
  2214  	// Id: A user-specified identifier for this grid item. This identifier is
  2215  	// returned in the parent grid's `onClick` callback parameters.
  2216  	Id string `json:"id,omitempty"`
  2217  	// Image: The image that displays in the grid item.
  2218  	Image *GoogleAppsCardV1ImageComponent `json:"image,omitempty"`
  2219  	// Layout: The layout to use for the grid item.
  2220  	//
  2221  	// Possible values:
  2222  	//   "GRID_ITEM_LAYOUT_UNSPECIFIED" - Don't use. Unspecified.
  2223  	//   "TEXT_BELOW" - The title and subtitle are shown below the grid item's
  2224  	// image.
  2225  	//   "TEXT_ABOVE" - The title and subtitle are shown above the grid item's
  2226  	// image.
  2227  	Layout string `json:"layout,omitempty"`
  2228  	// Subtitle: The grid item's subtitle.
  2229  	Subtitle string `json:"subtitle,omitempty"`
  2230  	// Title: The grid item's title.
  2231  	Title string `json:"title,omitempty"`
  2232  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2233  	// include in API requests. By default, fields with empty or default values are
  2234  	// omitted from API requests. See
  2235  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2236  	// details.
  2237  	ForceSendFields []string `json:"-"`
  2238  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2239  	// with the JSON null value. By default, fields with empty values are omitted
  2240  	// from API requests. See
  2241  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2242  	NullFields []string `json:"-"`
  2243  }
  2244  
  2245  func (s *GoogleAppsCardV1GridItem) MarshalJSON() ([]byte, error) {
  2246  	type NoMethod GoogleAppsCardV1GridItem
  2247  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2248  }
  2249  
  2250  // GoogleAppsCardV1Icon: An icon displayed in a widget on a card. For an
  2251  // example in Google Chat apps, see Add an icon
  2252  // (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon).
  2253  // Supports built-in
  2254  // (https://developers.google.com/workspace/chat/format-messages#builtinicons)
  2255  // and custom
  2256  // (https://developers.google.com/workspace/chat/format-messages#customicons)
  2257  // icons. Google Workspace Add-ons and Chat apps
  2258  // (https://developers.google.com/workspace/extend):
  2259  type GoogleAppsCardV1Icon struct {
  2260  	// AltText: Optional. A description of the icon used for accessibility. If
  2261  	// unspecified, the default value `Button` is provided. As a best practice, you
  2262  	// should set a helpful description for what the icon displays, and if
  2263  	// applicable, what it does. For example, `A user's account portrait`, or
  2264  	// `Opens a new browser tab and navigates to the Google Chat developer
  2265  	// documentation at https://developers.google.com/workspace/chat`. If the icon
  2266  	// is set in a `Button`, the `altText` appears as helper text when the user
  2267  	// hovers over the button. However, if the button also sets `text`, the icon's
  2268  	// `altText` is ignored.
  2269  	AltText string `json:"altText,omitempty"`
  2270  	// IconUrl: Display a custom icon hosted at an HTTPS URL. For example: ```
  2271  	// "iconUrl":
  2272  	// "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.pn
  2273  	// g" ``` Supported file types include `.png` and `.jpg`.
  2274  	IconUrl string `json:"iconUrl,omitempty"`
  2275  	// ImageType: The crop style applied to the image. In some cases, applying a
  2276  	// `CIRCLE` crop causes the image to be drawn larger than a built-in icon.
  2277  	//
  2278  	// Possible values:
  2279  	//   "SQUARE" - Default value. Applies a square mask to the image. For example,
  2280  	// a 4x3 image becomes 3x3.
  2281  	//   "CIRCLE" - Applies a circular mask to the image. For example, a 4x3 image
  2282  	// becomes a circle with a diameter of 3.
  2283  	ImageType string `json:"imageType,omitempty"`
  2284  	// KnownIcon: Display one of the built-in icons provided by Google Workspace.
  2285  	// For example, to display an airplane icon, specify `AIRPLANE`. For a bus,
  2286  	// specify `BUS`. For a full list of supported icons, see built-in icons
  2287  	// (https://developers.google.com/workspace/chat/format-messages#builtinicons).
  2288  	KnownIcon string `json:"knownIcon,omitempty"`
  2289  	// MaterialIcon: Display one of the Google Material Icons
  2290  	// (https://fonts.google.com/icons). For example, to display a checkbox icon
  2291  	// (https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048),
  2292  	// use ``` "material_icon": { "name": "check_box" } ``` Google Chat apps
  2293  	// (https://developers.google.com/workspace/chat):
  2294  	MaterialIcon *GoogleAppsCardV1MaterialIcon `json:"materialIcon,omitempty"`
  2295  	// ForceSendFields is a list of field names (e.g. "AltText") to unconditionally
  2296  	// include in API requests. By default, fields with empty or default values are
  2297  	// omitted from API requests. See
  2298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2299  	// details.
  2300  	ForceSendFields []string `json:"-"`
  2301  	// NullFields is a list of field names (e.g. "AltText") to include in API
  2302  	// requests with the JSON null value. By default, fields with empty values are
  2303  	// omitted from API requests. See
  2304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2305  	NullFields []string `json:"-"`
  2306  }
  2307  
  2308  func (s *GoogleAppsCardV1Icon) MarshalJSON() ([]byte, error) {
  2309  	type NoMethod GoogleAppsCardV1Icon
  2310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2311  }
  2312  
  2313  // GoogleAppsCardV1Image: An image that is specified by a URL and can have an
  2314  // `onClick` action. For an example, see Add an image
  2315  // (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image).
  2316  // Google Workspace Add-ons and Chat apps
  2317  // (https://developers.google.com/workspace/extend):
  2318  type GoogleAppsCardV1Image struct {
  2319  	// AltText: The alternative text of this image that's used for accessibility.
  2320  	AltText string `json:"altText,omitempty"`
  2321  	// ImageUrl: The HTTPS URL that hosts the image. For example: ```
  2322  	// https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
  2323  	// ```
  2324  	ImageUrl string `json:"imageUrl,omitempty"`
  2325  	// OnClick: When a user clicks the image, the click triggers this action.
  2326  	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`
  2327  	// ForceSendFields is a list of field names (e.g. "AltText") to unconditionally
  2328  	// include in API requests. By default, fields with empty or default values are
  2329  	// omitted from API requests. See
  2330  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2331  	// details.
  2332  	ForceSendFields []string `json:"-"`
  2333  	// NullFields is a list of field names (e.g. "AltText") to include in API
  2334  	// requests with the JSON null value. By default, fields with empty values are
  2335  	// omitted from API requests. See
  2336  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2337  	NullFields []string `json:"-"`
  2338  }
  2339  
  2340  func (s *GoogleAppsCardV1Image) MarshalJSON() ([]byte, error) {
  2341  	type NoMethod GoogleAppsCardV1Image
  2342  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2343  }
  2344  
  2345  // GoogleAppsCardV1ImageComponent: Represents an image. Google Workspace
  2346  // Add-ons and Chat apps (https://developers.google.com/workspace/extend):
  2347  type GoogleAppsCardV1ImageComponent struct {
  2348  	// AltText: The accessibility label for the image.
  2349  	AltText string `json:"altText,omitempty"`
  2350  	// BorderStyle: The border style to apply to the image.
  2351  	BorderStyle *GoogleAppsCardV1BorderStyle `json:"borderStyle,omitempty"`
  2352  	// CropStyle: The crop style to apply to the image.
  2353  	CropStyle *GoogleAppsCardV1ImageCropStyle `json:"cropStyle,omitempty"`
  2354  	// ImageUri: The image URL.
  2355  	ImageUri string `json:"imageUri,omitempty"`
  2356  	// ForceSendFields is a list of field names (e.g. "AltText") to unconditionally
  2357  	// include in API requests. By default, fields with empty or default values are
  2358  	// omitted from API requests. See
  2359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2360  	// details.
  2361  	ForceSendFields []string `json:"-"`
  2362  	// NullFields is a list of field names (e.g. "AltText") to include in API
  2363  	// requests with the JSON null value. By default, fields with empty values are
  2364  	// omitted from API requests. See
  2365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2366  	NullFields []string `json:"-"`
  2367  }
  2368  
  2369  func (s *GoogleAppsCardV1ImageComponent) MarshalJSON() ([]byte, error) {
  2370  	type NoMethod GoogleAppsCardV1ImageComponent
  2371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2372  }
  2373  
  2374  // GoogleAppsCardV1ImageCropStyle: Represents the crop style applied to an
  2375  // image. Google Workspace Add-ons and Chat apps
  2376  // (https://developers.google.com/workspace/extend): For example, here's how to
  2377  // apply a 16:9 aspect ratio: ``` cropStyle { "type": "RECTANGLE_CUSTOM",
  2378  // "aspectRatio": 16/9 } ```
  2379  type GoogleAppsCardV1ImageCropStyle struct {
  2380  	// AspectRatio: The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
  2381  	// For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle {
  2382  	// "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 } ```
  2383  	AspectRatio float64 `json:"aspectRatio,omitempty"`
  2384  	// Type: The crop type.
  2385  	//
  2386  	// Possible values:
  2387  	//   "IMAGE_CROP_TYPE_UNSPECIFIED" - Don't use. Unspecified.
  2388  	//   "SQUARE" - Default value. Applies a square crop.
  2389  	//   "CIRCLE" - Applies a circular crop.
  2390  	//   "RECTANGLE_CUSTOM" - Applies a rectangular crop with a custom aspect
  2391  	// ratio. Set the custom aspect ratio with `aspectRatio`.
  2392  	//   "RECTANGLE_4_3" - Applies a rectangular crop with a 4:3 aspect ratio.
  2393  	Type string `json:"type,omitempty"`
  2394  	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
  2395  	// unconditionally include in API requests. By default, fields with empty or
  2396  	// default values are omitted from API requests. See
  2397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2398  	// details.
  2399  	ForceSendFields []string `json:"-"`
  2400  	// NullFields is a list of field names (e.g. "AspectRatio") to include in API
  2401  	// requests with the JSON null value. By default, fields with empty values are
  2402  	// omitted from API requests. See
  2403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2404  	NullFields []string `json:"-"`
  2405  }
  2406  
  2407  func (s *GoogleAppsCardV1ImageCropStyle) MarshalJSON() ([]byte, error) {
  2408  	type NoMethod GoogleAppsCardV1ImageCropStyle
  2409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2410  }
  2411  
  2412  func (s *GoogleAppsCardV1ImageCropStyle) UnmarshalJSON(data []byte) error {
  2413  	type NoMethod GoogleAppsCardV1ImageCropStyle
  2414  	var s1 struct {
  2415  		AspectRatio gensupport.JSONFloat64 `json:"aspectRatio"`
  2416  		*NoMethod
  2417  	}
  2418  	s1.NoMethod = (*NoMethod)(s)
  2419  	if err := json.Unmarshal(data, &s1); err != nil {
  2420  		return err
  2421  	}
  2422  	s.AspectRatio = float64(s1.AspectRatio)
  2423  	return nil
  2424  }
  2425  
  2426  // GoogleAppsCardV1MaterialIcon: A Google Material Icon
  2427  // (https://fonts.google.com/icons), which includes over 2500+ options. For
  2428  // example, to display a checkbox icon
  2429  // (https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048)
  2430  // with customized weight and grade, write the following: ``` { "name":
  2431  // "check_box", "fill": true, "weight": 300, "grade": -25 } ``` Google Chat
  2432  // apps (https://developers.google.com/workspace/chat):
  2433  type GoogleAppsCardV1MaterialIcon struct {
  2434  	// Fill: Whether the icon renders as filled. Default value is false. To preview
  2435  	// different icon settings, go to Google Font Icons
  2436  	// (https://fonts.google.com/icons) and adjust the settings under
  2437  	// **Customize**.
  2438  	Fill bool `json:"fill,omitempty"`
  2439  	// Grade: Weight and grade affect a symbol’s thickness. Adjustments to grade
  2440  	// are more granular than adjustments to weight and have a small impact on the
  2441  	// size of the symbol. Choose from {-25, 0, 200}. If absent, default value is
  2442  	// 0. If any other value is specified, the default value is used. To preview
  2443  	// different icon settings, go to Google Font Icons
  2444  	// (https://fonts.google.com/icons) and adjust the settings under
  2445  	// **Customize**.
  2446  	Grade int64 `json:"grade,omitempty"`
  2447  	// Name: The icon name defined in the Google Material Icon
  2448  	// (https://fonts.google.com/icons), for example, `check_box`. Any invalid
  2449  	// names are abandoned and replaced with empty string and results in the icon
  2450  	// failing to render.
  2451  	Name string `json:"name,omitempty"`
  2452  	// Weight: The stroke weight of the icon. Choose from {100, 200, 300, 400, 500,
  2453  	// 600, 700}. If absent, default value is 400. If any other value is specified,
  2454  	// the default value is used. To preview different icon settings, go to Google
  2455  	// Font Icons (https://fonts.google.com/icons) and adjust the settings under
  2456  	// **Customize**.
  2457  	Weight int64 `json:"weight,omitempty"`
  2458  	// ForceSendFields is a list of field names (e.g. "Fill") to unconditionally
  2459  	// include in API requests. By default, fields with empty or default values are
  2460  	// omitted from API requests. See
  2461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2462  	// details.
  2463  	ForceSendFields []string `json:"-"`
  2464  	// NullFields is a list of field names (e.g. "Fill") to include in API requests
  2465  	// with the JSON null value. By default, fields with empty values are omitted
  2466  	// from API requests. See
  2467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2468  	NullFields []string `json:"-"`
  2469  }
  2470  
  2471  func (s *GoogleAppsCardV1MaterialIcon) MarshalJSON() ([]byte, error) {
  2472  	type NoMethod GoogleAppsCardV1MaterialIcon
  2473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2474  }
  2475  
  2476  // GoogleAppsCardV1OnClick: Represents how to respond when users click an
  2477  // interactive element on a card, such as a button. Google Workspace Add-ons
  2478  // and Chat apps (https://developers.google.com/workspace/extend):
  2479  type GoogleAppsCardV1OnClick struct {
  2480  	// Action: If specified, an action is triggered by this `onClick`.
  2481  	Action *GoogleAppsCardV1Action `json:"action,omitempty"`
  2482  	// Card: A new card is pushed to the card stack after clicking if specified.
  2483  	// Google Workspace Add-ons (https://developers.google.com/workspace/add-ons):
  2484  	Card *GoogleAppsCardV1Card `json:"card,omitempty"`
  2485  	// OpenDynamicLinkAction: An add-on triggers this action when the action needs
  2486  	// to open a link. This differs from the `open_link` above in that this needs
  2487  	// to talk to server to get the link. Thus some preparation work is required
  2488  	// for web client to do before the open link action response comes back. Google
  2489  	// Workspace Add-ons (https://developers.google.com/workspace/add-ons):
  2490  	OpenDynamicLinkAction *GoogleAppsCardV1Action `json:"openDynamicLinkAction,omitempty"`
  2491  	// OpenLink: If specified, this `onClick` triggers an open link action.
  2492  	OpenLink *GoogleAppsCardV1OpenLink `json:"openLink,omitempty"`
  2493  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  2494  	// include in API requests. By default, fields with empty or default values are
  2495  	// omitted from API requests. See
  2496  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2497  	// details.
  2498  	ForceSendFields []string `json:"-"`
  2499  	// NullFields is a list of field names (e.g. "Action") to include in API
  2500  	// requests with the JSON null value. By default, fields with empty values are
  2501  	// omitted from API requests. See
  2502  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2503  	NullFields []string `json:"-"`
  2504  }
  2505  
  2506  func (s *GoogleAppsCardV1OnClick) MarshalJSON() ([]byte, error) {
  2507  	type NoMethod GoogleAppsCardV1OnClick
  2508  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2509  }
  2510  
  2511  // GoogleAppsCardV1OpenLink: Represents an `onClick` event that opens a
  2512  // hyperlink. Google Workspace Add-ons and Chat apps
  2513  // (https://developers.google.com/workspace/extend):
  2514  type GoogleAppsCardV1OpenLink struct {
  2515  	// OnClose: Whether the client forgets about a link after opening it, or
  2516  	// observes it until the window closes. Google Workspace Add-ons
  2517  	// (https://developers.google.com/workspace/add-ons):
  2518  	//
  2519  	// Possible values:
  2520  	//   "NOTHING" - Default value. The card doesn't reload; nothing happens.
  2521  	//   "RELOAD" - Reloads the card after the child window closes. If used in
  2522  	// conjunction with
  2523  	// [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/
  2524  	// rpc/google.apps.card.v1#openas), the child window acts as a modal dialog and
  2525  	// the parent card is blocked until the child window closes.
  2526  	OnClose string `json:"onClose,omitempty"`
  2527  	// OpenAs: How to open a link. Google Workspace Add-ons
  2528  	// (https://developers.google.com/workspace/add-ons):
  2529  	//
  2530  	// Possible values:
  2531  	//   "FULL_SIZE" - The link opens as a full-size window (if that's the frame
  2532  	// used by the client).
  2533  	//   "OVERLAY" - The link opens as an overlay, such as a pop-up.
  2534  	OpenAs string `json:"openAs,omitempty"`
  2535  	// Url: The URL to open.
  2536  	Url string `json:"url,omitempty"`
  2537  	// ForceSendFields is a list of field names (e.g. "OnClose") to unconditionally
  2538  	// include in API requests. By default, fields with empty or default values are
  2539  	// omitted from API requests. See
  2540  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2541  	// details.
  2542  	ForceSendFields []string `json:"-"`
  2543  	// NullFields is a list of field names (e.g. "OnClose") to include in API
  2544  	// requests with the JSON null value. By default, fields with empty values are
  2545  	// omitted from API requests. See
  2546  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2547  	NullFields []string `json:"-"`
  2548  }
  2549  
  2550  func (s *GoogleAppsCardV1OpenLink) MarshalJSON() ([]byte, error) {
  2551  	type NoMethod GoogleAppsCardV1OpenLink
  2552  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2553  }
  2554  
  2555  // GoogleAppsCardV1PlatformDataSource: For a `SelectionInput` widget that uses
  2556  // a multiselect menu, a data source from Google Workspace. Used to populate
  2557  // items in a multiselect menu. Google Chat apps
  2558  // (https://developers.google.com/workspace/chat):
  2559  type GoogleAppsCardV1PlatformDataSource struct {
  2560  	// CommonDataSource: A data source shared by all Google Workspace applications,
  2561  	// such as users in a Google Workspace organization.
  2562  	//
  2563  	// Possible values:
  2564  	//   "UNKNOWN" - Default value. Don't use.
  2565  	//   "USER" - Google Workspace users. The user can only view and select users
  2566  	// from their Google Workspace organization.
  2567  	CommonDataSource string `json:"commonDataSource,omitempty"`
  2568  	// HostAppDataSource: A data source that's unique to a Google Workspace host
  2569  	// application, such spaces in Google Chat.
  2570  	HostAppDataSource *HostAppDataSourceMarkup `json:"hostAppDataSource,omitempty"`
  2571  	// ForceSendFields is a list of field names (e.g. "CommonDataSource") to
  2572  	// unconditionally include in API requests. By default, fields with empty or
  2573  	// default values are omitted from API requests. See
  2574  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2575  	// details.
  2576  	ForceSendFields []string `json:"-"`
  2577  	// NullFields is a list of field names (e.g. "CommonDataSource") to include in
  2578  	// API requests with the JSON null value. By default, fields with empty values
  2579  	// are omitted from API requests. See
  2580  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2581  	NullFields []string `json:"-"`
  2582  }
  2583  
  2584  func (s *GoogleAppsCardV1PlatformDataSource) MarshalJSON() ([]byte, error) {
  2585  	type NoMethod GoogleAppsCardV1PlatformDataSource
  2586  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2587  }
  2588  
  2589  // GoogleAppsCardV1Section: A section contains a collection of widgets that are
  2590  // rendered vertically in the order that they're specified. Google Workspace
  2591  // Add-ons and Chat apps (https://developers.google.com/workspace/extend):
  2592  type GoogleAppsCardV1Section struct {
  2593  	// Collapsible: Indicates whether this section is collapsible. Collapsible
  2594  	// sections hide some or all widgets, but users can expand the section to
  2595  	// reveal the hidden widgets by clicking **Show more**. Users can hide the
  2596  	// widgets again by clicking **Show less**. To determine which widgets are
  2597  	// hidden, specify `uncollapsibleWidgetsCount`.
  2598  	Collapsible bool `json:"collapsible,omitempty"`
  2599  	// Header: Text that appears at the top of a section. Supports simple HTML
  2600  	// formatted text. For more information about formatting text, see Formatting
  2601  	// text in Google Chat apps
  2602  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  2603  	// and Formatting text in Google Workspace Add-ons
  2604  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  2605  	Header string `json:"header,omitempty"`
  2606  	// UncollapsibleWidgetsCount: The number of uncollapsible widgets which remain
  2607  	// visible even when a section is collapsed. For example, when a section
  2608  	// contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the
  2609  	// first two widgets are always shown and the last three are collapsed by
  2610  	// default. The `uncollapsibleWidgetsCount` is taken into account only when
  2611  	// `collapsible` is `true`.
  2612  	UncollapsibleWidgetsCount int64 `json:"uncollapsibleWidgetsCount,omitempty"`
  2613  	// Widgets: All the widgets in the section. Must contain at least one widget.
  2614  	Widgets []*GoogleAppsCardV1Widget `json:"widgets,omitempty"`
  2615  	// ForceSendFields is a list of field names (e.g. "Collapsible") to
  2616  	// unconditionally include in API requests. By default, fields with empty or
  2617  	// default values are omitted from API requests. See
  2618  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2619  	// details.
  2620  	ForceSendFields []string `json:"-"`
  2621  	// NullFields is a list of field names (e.g. "Collapsible") to include in API
  2622  	// requests with the JSON null value. By default, fields with empty values are
  2623  	// omitted from API requests. See
  2624  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2625  	NullFields []string `json:"-"`
  2626  }
  2627  
  2628  func (s *GoogleAppsCardV1Section) MarshalJSON() ([]byte, error) {
  2629  	type NoMethod GoogleAppsCardV1Section
  2630  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2631  }
  2632  
  2633  // GoogleAppsCardV1SelectionInput: A widget that creates one or more UI items
  2634  // that users can select. For example, a dropdown menu or checkboxes. You can
  2635  // use this widget to collect data that can be predicted or enumerated. For an
  2636  // example in Google Chat apps, see Add selectable UI elements
  2637  // (/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
  2638  // Chat apps can process the value of items that users select or input. For
  2639  // details about working with form inputs, see Receive form data
  2640  // (https://developers.google.com/workspace/chat/read-form-data). To collect
  2641  // undefined or abstract data from users, use the TextInput widget. Google
  2642  // Workspace Add-ons and Chat apps
  2643  // (https://developers.google.com/workspace/extend):
  2644  type GoogleAppsCardV1SelectionInput struct {
  2645  	// ExternalDataSource: An external data source, such as a relational data base.
  2646  	ExternalDataSource *GoogleAppsCardV1Action `json:"externalDataSource,omitempty"`
  2647  	// Items: An array of selectable items. For example, an array of radio buttons
  2648  	// or checkboxes. Supports up to 100 items.
  2649  	Items []*GoogleAppsCardV1SelectionItem `json:"items,omitempty"`
  2650  	// Label: The text that appears above the selection input field in the user
  2651  	// interface. Specify text that helps the user enter the information your app
  2652  	// needs. For example, if users are selecting the urgency of a work ticket from
  2653  	// a drop-down menu, the label might be "Urgency" or "Select urgency".
  2654  	Label string `json:"label,omitempty"`
  2655  	// MultiSelectMaxSelectedItems: For multiselect menus, the maximum number of
  2656  	// items that a user can select. Minimum value is 1 item. If unspecified,
  2657  	// defaults to 3 items.
  2658  	MultiSelectMaxSelectedItems int64 `json:"multiSelectMaxSelectedItems,omitempty"`
  2659  	// MultiSelectMinQueryLength: For multiselect menus, the number of text
  2660  	// characters that a user inputs before the app queries autocomplete and
  2661  	// displays suggested items in the menu. If unspecified, defaults to 0
  2662  	// characters for static data sources and 3 characters for external data
  2663  	// sources.
  2664  	MultiSelectMinQueryLength int64 `json:"multiSelectMinQueryLength,omitempty"`
  2665  	// Name: The name that identifies the selection input in a form input event.
  2666  	// For details about working with form inputs, see Receive form data
  2667  	// (https://developers.google.com/workspace/chat/read-form-data).
  2668  	Name string `json:"name,omitempty"`
  2669  	// OnChangeAction: If specified, the form is submitted when the selection
  2670  	// changes. If not specified, you must specify a separate button that submits
  2671  	// the form. For details about working with form inputs, see Receive form data
  2672  	// (https://developers.google.com/workspace/chat/read-form-data).
  2673  	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`
  2674  	// PlatformDataSource: A data source from Google Workspace.
  2675  	PlatformDataSource *GoogleAppsCardV1PlatformDataSource `json:"platformDataSource,omitempty"`
  2676  	// Type: The type of items that are displayed to users in a `SelectionInput`
  2677  	// widget. Selection types support different types of interactions. For
  2678  	// example, users can select one or more checkboxes, but they can only select
  2679  	// one value from a dropdown menu.
  2680  	//
  2681  	// Possible values:
  2682  	//   "CHECK_BOX" - A set of checkboxes. Users can select one or more
  2683  	// checkboxes.
  2684  	//   "RADIO_BUTTON" - A set of radio buttons. Users can select one radio
  2685  	// button.
  2686  	//   "SWITCH" - A set of switches. Users can turn on one or more switches.
  2687  	//   "DROPDOWN" - A dropdown menu. Users can select one item from the menu.
  2688  	//   "MULTI_SELECT" - A multiselect menu for static or dynamic data. From the
  2689  	// menu bar, users select one or more items. Users can also input values to
  2690  	// populate dynamic data. For example, users can start typing the name of a
  2691  	// Google Chat space and the widget autosuggests the space. To populate items
  2692  	// for a multiselect menu, you can use one of the following types of data
  2693  	// sources: * Static data: Items are specified as `SelectionItem` objects in
  2694  	// the widget. Up to 100 items. * Google Workspace data: Items are populated
  2695  	// using data from Google Workspace, such as Google Workspace users or Google
  2696  	// Chat spaces. * External data: Items are populated from an external data
  2697  	// source outside of Google Workspace. For examples of how to implement
  2698  	// multiselect menus, see [Add a multiselect
  2699  	// menu](https://developers.google.com/workspace/chat/design-interactive-card-di
  2700  	// alog#multiselect-menu). [Google Workspace Add-ons and Chat
  2701  	// apps](https://developers.google.com/workspace/extend): Multiselect for
  2702  	// Google Workspace Add-ons are in Developer Preview.
  2703  	Type string `json:"type,omitempty"`
  2704  	// ForceSendFields is a list of field names (e.g. "ExternalDataSource") to
  2705  	// unconditionally include in API requests. By default, fields with empty or
  2706  	// default values are omitted from API requests. See
  2707  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2708  	// details.
  2709  	ForceSendFields []string `json:"-"`
  2710  	// NullFields is a list of field names (e.g. "ExternalDataSource") to include
  2711  	// in API requests with the JSON null value. By default, fields with empty
  2712  	// values are omitted from API requests. See
  2713  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2714  	NullFields []string `json:"-"`
  2715  }
  2716  
  2717  func (s *GoogleAppsCardV1SelectionInput) MarshalJSON() ([]byte, error) {
  2718  	type NoMethod GoogleAppsCardV1SelectionInput
  2719  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2720  }
  2721  
  2722  // GoogleAppsCardV1SelectionItem: An item that users can select in a selection
  2723  // input, such as a checkbox or switch. Google Workspace Add-ons and Chat apps
  2724  // (https://developers.google.com/workspace/extend):
  2725  type GoogleAppsCardV1SelectionItem struct {
  2726  	// BottomText: For multiselect menus, a text description or label that's
  2727  	// displayed below the item's `text` field.
  2728  	BottomText string `json:"bottomText,omitempty"`
  2729  	// Selected: Whether the item is selected by default. If the selection input
  2730  	// only accepts one value (such as for radio buttons or a dropdown menu), only
  2731  	// set this field for one item.
  2732  	Selected bool `json:"selected,omitempty"`
  2733  	// StartIconUri: For multiselect menus, the URL for the icon displayed next to
  2734  	// the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
  2735  	// URL. For example,
  2736  	// `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.pn
  2737  	// g`.
  2738  	StartIconUri string `json:"startIconUri,omitempty"`
  2739  	// Text: The text that identifies or describes the item to users.
  2740  	Text string `json:"text,omitempty"`
  2741  	// Value: The value associated with this item. The client should use this as a
  2742  	// form input value. For details about working with form inputs, see Receive
  2743  	// form data (https://developers.google.com/workspace/chat/read-form-data).
  2744  	Value string `json:"value,omitempty"`
  2745  	// ForceSendFields is a list of field names (e.g. "BottomText") to
  2746  	// unconditionally include in API requests. By default, fields with empty or
  2747  	// default values are omitted from API requests. See
  2748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2749  	// details.
  2750  	ForceSendFields []string `json:"-"`
  2751  	// NullFields is a list of field names (e.g. "BottomText") to include in API
  2752  	// requests with the JSON null value. By default, fields with empty values are
  2753  	// omitted from API requests. See
  2754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2755  	NullFields []string `json:"-"`
  2756  }
  2757  
  2758  func (s *GoogleAppsCardV1SelectionItem) MarshalJSON() ([]byte, error) {
  2759  	type NoMethod GoogleAppsCardV1SelectionItem
  2760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2761  }
  2762  
  2763  // GoogleAppsCardV1SuggestionItem: One suggested value that users can enter in
  2764  // a text input field. Google Workspace Add-ons and Chat apps
  2765  // (https://developers.google.com/workspace/extend):
  2766  type GoogleAppsCardV1SuggestionItem struct {
  2767  	// Text: The value of a suggested input to a text input field. This is
  2768  	// equivalent to what users enter themselves.
  2769  	Text string `json:"text,omitempty"`
  2770  	// ForceSendFields is a list of field names (e.g. "Text") to unconditionally
  2771  	// include in API requests. By default, fields with empty or default values are
  2772  	// omitted from API requests. See
  2773  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2774  	// details.
  2775  	ForceSendFields []string `json:"-"`
  2776  	// NullFields is a list of field names (e.g. "Text") to include in API requests
  2777  	// with the JSON null value. By default, fields with empty values are omitted
  2778  	// from API requests. See
  2779  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2780  	NullFields []string `json:"-"`
  2781  }
  2782  
  2783  func (s *GoogleAppsCardV1SuggestionItem) MarshalJSON() ([]byte, error) {
  2784  	type NoMethod GoogleAppsCardV1SuggestionItem
  2785  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2786  }
  2787  
  2788  // GoogleAppsCardV1Suggestions: Suggested values that users can enter. These
  2789  // values appear when users click inside the text input field. As users type,
  2790  // the suggested values dynamically filter to match what the users have typed.
  2791  // For example, a text input field for programming language might suggest Java,
  2792  // JavaScript, Python, and C++. When users start typing `Jav`, the list of
  2793  // suggestions filters to show `Java` and `JavaScript`. Suggested values help
  2794  // guide users to enter values that your app can make sense of. When referring
  2795  // to JavaScript, some users might enter `javascript` and others `java script`.
  2796  // Suggesting `JavaScript` can standardize how users interact with your app.
  2797  // When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set
  2798  // to `MULTIPLE_LINE`. Google Workspace Add-ons and Chat apps
  2799  // (https://developers.google.com/workspace/extend):
  2800  type GoogleAppsCardV1Suggestions struct {
  2801  	// Items: A list of suggestions used for autocomplete recommendations in text
  2802  	// input fields.
  2803  	Items []*GoogleAppsCardV1SuggestionItem `json:"items,omitempty"`
  2804  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2805  	// include in API requests. By default, fields with empty or default values are
  2806  	// omitted from API requests. See
  2807  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2808  	// details.
  2809  	ForceSendFields []string `json:"-"`
  2810  	// NullFields is a list of field names (e.g. "Items") to include in API
  2811  	// requests with the JSON null value. By default, fields with empty values are
  2812  	// omitted from API requests. See
  2813  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2814  	NullFields []string `json:"-"`
  2815  }
  2816  
  2817  func (s *GoogleAppsCardV1Suggestions) MarshalJSON() ([]byte, error) {
  2818  	type NoMethod GoogleAppsCardV1Suggestions
  2819  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2820  }
  2821  
  2822  // GoogleAppsCardV1SwitchControl: Either a toggle-style switch or a checkbox
  2823  // inside a `decoratedText` widget. Google Workspace Add-ons and Chat apps
  2824  // (https://developers.google.com/workspace/extend): Only supported in the
  2825  // `decoratedText` widget.
  2826  type GoogleAppsCardV1SwitchControl struct {
  2827  	// ControlType: How the switch appears in the user interface. Google Workspace
  2828  	// Add-ons and Chat apps (https://developers.google.com/workspace/extend):
  2829  	//
  2830  	// Possible values:
  2831  	//   "SWITCH" - A toggle-style switch.
  2832  	//   "CHECKBOX" - Deprecated in favor of `CHECK_BOX`.
  2833  	//   "CHECK_BOX" - A checkbox.
  2834  	ControlType string `json:"controlType,omitempty"`
  2835  	// Name: The name by which the switch widget is identified in a form input
  2836  	// event. For details about working with form inputs, see Receive form data
  2837  	// (https://developers.google.com/workspace/chat/read-form-data).
  2838  	Name string `json:"name,omitempty"`
  2839  	// OnChangeAction: The action to perform when the switch state is changed, such
  2840  	// as what function to run.
  2841  	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`
  2842  	// Selected: When `true`, the switch is selected.
  2843  	Selected bool `json:"selected,omitempty"`
  2844  	// Value: The value entered by a user, returned as part of a form input event.
  2845  	// For details about working with form inputs, see Receive form data
  2846  	// (https://developers.google.com/workspace/chat/read-form-data).
  2847  	Value string `json:"value,omitempty"`
  2848  	// ForceSendFields is a list of field names (e.g. "ControlType") to
  2849  	// unconditionally include in API requests. By default, fields with empty or
  2850  	// default values are omitted from API requests. See
  2851  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2852  	// details.
  2853  	ForceSendFields []string `json:"-"`
  2854  	// NullFields is a list of field names (e.g. "ControlType") to include in API
  2855  	// requests with the JSON null value. By default, fields with empty values are
  2856  	// omitted from API requests. See
  2857  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2858  	NullFields []string `json:"-"`
  2859  }
  2860  
  2861  func (s *GoogleAppsCardV1SwitchControl) MarshalJSON() ([]byte, error) {
  2862  	type NoMethod GoogleAppsCardV1SwitchControl
  2863  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2864  }
  2865  
  2866  // GoogleAppsCardV1TextInput: A field in which users can enter text. Supports
  2867  // suggestions and on-change actions. For an example in Google Chat apps, see
  2868  // Add a field in which a user can enter text
  2869  // (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
  2870  // Chat apps receive and can process the value of entered text during form
  2871  // input events. For details about working with form inputs, see Receive form
  2872  // data (https://developers.google.com/workspace/chat/read-form-data). When you
  2873  // need to collect undefined or abstract data from users, use a text input. To
  2874  // collect defined or enumerated data from users, use the SelectionInput
  2875  // widget. Google Workspace Add-ons and Chat apps
  2876  // (https://developers.google.com/workspace/extend):
  2877  type GoogleAppsCardV1TextInput struct {
  2878  	// AutoCompleteAction: Optional. Specify what action to take when the text
  2879  	// input field provides suggestions to users who interact with it. If
  2880  	// unspecified, the suggestions are set by `initialSuggestions` and are
  2881  	// processed by the client. If specified, the app takes the action specified
  2882  	// here, such as running a custom function. Google Workspace Add-ons
  2883  	// (https://developers.google.com/workspace/add-ons):
  2884  	AutoCompleteAction *GoogleAppsCardV1Action `json:"autoCompleteAction,omitempty"`
  2885  	// HintText: Text that appears below the text input field meant to assist users
  2886  	// by prompting them to enter a certain value. This text is always visible.
  2887  	// Required if `label` is unspecified. Otherwise, optional.
  2888  	HintText string `json:"hintText,omitempty"`
  2889  	// InitialSuggestions: Suggested values that users can enter. These values
  2890  	// appear when users click inside the text input field. As users type, the
  2891  	// suggested values dynamically filter to match what the users have typed. For
  2892  	// example, a text input field for programming language might suggest Java,
  2893  	// JavaScript, Python, and C++. When users start typing `Jav`, the list of
  2894  	// suggestions filters to show just `Java` and `JavaScript`. Suggested values
  2895  	// help guide users to enter values that your app can make sense of. When
  2896  	// referring to JavaScript, some users might enter `javascript` and others
  2897  	// `java script`. Suggesting `JavaScript` can standardize how users interact
  2898  	// with your app. When specified, `TextInput.type` is always `SINGLE_LINE`,
  2899  	// even if it's set to `MULTIPLE_LINE`. Google Workspace Add-ons and Chat apps
  2900  	// (https://developers.google.com/workspace/extend):
  2901  	InitialSuggestions *GoogleAppsCardV1Suggestions `json:"initialSuggestions,omitempty"`
  2902  	// Label: The text that appears above the text input field in the user
  2903  	// interface. Specify text that helps the user enter the information your app
  2904  	// needs. For example, if you are asking someone's name, but specifically need
  2905  	// their surname, write `surname` instead of `name`. Required if `hintText` is
  2906  	// unspecified. Otherwise, optional.
  2907  	Label string `json:"label,omitempty"`
  2908  	// Name: The name by which the text input is identified in a form input event.
  2909  	// For details about working with form inputs, see Receive form data
  2910  	// (https://developers.google.com/workspace/chat/read-form-data).
  2911  	Name string `json:"name,omitempty"`
  2912  	// OnChangeAction: What to do when a change occurs in the text input field. For
  2913  	// example, a user adding to the field or deleting text. Examples of actions to
  2914  	// take include running a custom function or opening a dialog
  2915  	// (https://developers.google.com/workspace/chat/dialogs) in Google Chat.
  2916  	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`
  2917  	// PlaceholderText: Text that appears in the text input field when the field is
  2918  	// empty. Use this text to prompt users to enter a value. For example, `Enter a
  2919  	// number from 0 to 100`. Google Chat apps
  2920  	// (https://developers.google.com/workspace/chat):
  2921  	PlaceholderText string `json:"placeholderText,omitempty"`
  2922  	// Type: How a text input field appears in the user interface. For example,
  2923  	// whether the field is single or multi-line.
  2924  	//
  2925  	// Possible values:
  2926  	//   "SINGLE_LINE" - The text input field has a fixed height of one line.
  2927  	//   "MULTIPLE_LINE" - The text input field has a fixed height of multiple
  2928  	// lines.
  2929  	Type string `json:"type,omitempty"`
  2930  	// Value: The value entered by a user, returned as part of a form input event.
  2931  	// For details about working with form inputs, see Receive form data
  2932  	// (https://developers.google.com/workspace/chat/read-form-data).
  2933  	Value string `json:"value,omitempty"`
  2934  	// ForceSendFields is a list of field names (e.g. "AutoCompleteAction") to
  2935  	// unconditionally include in API requests. By default, fields with empty or
  2936  	// default values are omitted from API requests. See
  2937  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2938  	// details.
  2939  	ForceSendFields []string `json:"-"`
  2940  	// NullFields is a list of field names (e.g. "AutoCompleteAction") to include
  2941  	// in API requests with the JSON null value. By default, fields with empty
  2942  	// values are omitted from API requests. See
  2943  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2944  	NullFields []string `json:"-"`
  2945  }
  2946  
  2947  func (s *GoogleAppsCardV1TextInput) MarshalJSON() ([]byte, error) {
  2948  	type NoMethod GoogleAppsCardV1TextInput
  2949  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2950  }
  2951  
  2952  // GoogleAppsCardV1TextParagraph: A paragraph of text that supports formatting.
  2953  // For an example in Google Chat apps, see Add a paragraph of formatted text
  2954  // (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text).
  2955  // For more information about formatting text, see Formatting text in Google
  2956  // Chat apps
  2957  // (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  2958  // and Formatting text in Google Workspace Add-ons
  2959  // (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  2960  // Google Workspace Add-ons and Chat apps
  2961  // (https://developers.google.com/workspace/extend):
  2962  type GoogleAppsCardV1TextParagraph struct {
  2963  	// Text: The text that's shown in the widget.
  2964  	Text string `json:"text,omitempty"`
  2965  	// ForceSendFields is a list of field names (e.g. "Text") to unconditionally
  2966  	// include in API requests. By default, fields with empty or default values are
  2967  	// omitted from API requests. See
  2968  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2969  	// details.
  2970  	ForceSendFields []string `json:"-"`
  2971  	// NullFields is a list of field names (e.g. "Text") to include in API requests
  2972  	// with the JSON null value. By default, fields with empty values are omitted
  2973  	// from API requests. See
  2974  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2975  	NullFields []string `json:"-"`
  2976  }
  2977  
  2978  func (s *GoogleAppsCardV1TextParagraph) MarshalJSON() ([]byte, error) {
  2979  	type NoMethod GoogleAppsCardV1TextParagraph
  2980  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2981  }
  2982  
  2983  // GoogleAppsCardV1Widget: Each card is made up of widgets. A widget is a
  2984  // composite object that can represent one of text, images, buttons, and other
  2985  // object types.
  2986  type GoogleAppsCardV1Widget struct {
  2987  	// ButtonList: A list of buttons. For example, the following JSON creates two
  2988  	// buttons. The first is a blue text button and the second is an image button
  2989  	// that opens a link: ``` "buttonList": { "buttons": [ { "text": "Edit",
  2990  	// "color": { "red": 0, "green": 0, "blue": 1, "alpha": 1 }, "disabled": true,
  2991  	// }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" },
  2992  	// "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] }
  2993  	// ```
  2994  	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`
  2995  	// Columns: Displays up to 2 columns. To include more than 2 columns, or to use
  2996  	// rows, use the `Grid` widget. For example, the following JSON creates 2
  2997  	// columns that each contain text paragraphs: ``` "columns": { "columnItems": [
  2998  	// { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment":
  2999  	// "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": {
  3000  	// "text": "First column text paragraph" } } ] }, { "horizontalSizeStyle":
  3001  	// "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER",
  3002  	// "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text":
  3003  	// "Second column text paragraph" } } ] } ] } ```
  3004  	Columns *GoogleAppsCardV1Columns `json:"columns,omitempty"`
  3005  	// DateTimePicker: Displays a widget that lets users input a date, time, or
  3006  	// date and time. For example, the following JSON creates a date time picker to
  3007  	// schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time",
  3008  	// "label": "Book your appointment at:", "type": "DATE_AND_TIME",
  3009  	// "valueMsEpoch": "796435200000" } ```
  3010  	DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"`
  3011  	// DecoratedText: Displays a decorated text item. For example, the following
  3012  	// JSON creates a decorated text widget showing email address: ```
  3013  	// "decoratedText": { "icon": { "knownIcon": "EMAIL" }, "topLabel": "Email
  3014  	// Address", "text": "sasha@example.com", "bottomLabel": "This is a new Email
  3015  	// address!", "switchControl": { "name": "has_send_welcome_email_to_sasha",
  3016  	// "selected": false, "controlType": "CHECKBOX" } } ```
  3017  	DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"`
  3018  	// Divider: Displays a horizontal line divider between widgets. For example,
  3019  	// the following JSON creates a divider: ``` "divider": { } ```
  3020  	Divider *GoogleAppsCardV1Divider `json:"divider,omitempty"`
  3021  	// Grid: Displays a grid with a collection of items. A grid supports any number
  3022  	// of columns and items. The number of rows is determined by the upper bounds
  3023  	// of the number items divided by the number of columns. A grid with 10 items
  3024  	// and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows.
  3025  	// Google Workspace Add-ons and Chat apps
  3026  	// (https://developers.google.com/workspace/extend): For example, the following
  3027  	// JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A
  3028  	// fine collection of items", "columnCount": 2, "borderStyle": { "type":
  3029  	// "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri":
  3030  	// "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" },
  3031  	// "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment":
  3032  	// "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" }
  3033  	// } } ```
  3034  	Grid *GoogleAppsCardV1Grid `json:"grid,omitempty"`
  3035  	// HorizontalAlignment: Specifies whether widgets align to the left, right, or
  3036  	// center of a column.
  3037  	//
  3038  	// Possible values:
  3039  	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
  3040  	//   "START" - Default value. Aligns widgets to the start position of the
  3041  	// column. For left-to-right layouts, aligns to the left. For right-to-left
  3042  	// layouts, aligns to the right.
  3043  	//   "CENTER" - Aligns widgets to the center of the column.
  3044  	//   "END" - Aligns widgets to the end position of the column. For
  3045  	// left-to-right layouts, aligns widgets to the right. For right-to-left
  3046  	// layouts, aligns widgets to the left.
  3047  	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  3048  	// Image: Displays an image. For example, the following JSON creates an image
  3049  	// with alternative text: ``` "image": { "imageUrl":
  3050  	// "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.pn
  3051  	// g", "altText": "Chat app avatar" } ```
  3052  	Image *GoogleAppsCardV1Image `json:"image,omitempty"`
  3053  	// SelectionInput: Displays a selection control that lets users select items.
  3054  	// Selection controls can be checkboxes, radio buttons, switches, or dropdown
  3055  	// menus. For example, the following JSON creates a dropdown menu that lets
  3056  	// users choose a size: ``` "selectionInput": { "name": "size", "label": "Size"
  3057  	// "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected":
  3058  	// false }, { "text": "M", "value": "medium", "selected": true }, { "text":
  3059  	// "L", "value": "large", "selected": false }, { "text": "XL", "value":
  3060  	// "extra_large", "selected": false } ] } ```
  3061  	SelectionInput *GoogleAppsCardV1SelectionInput `json:"selectionInput,omitempty"`
  3062  	// TextInput: Displays a text box that users can type into. For example, the
  3063  	// following JSON creates a text input for an email address: ``` "textInput": {
  3064  	// "name": "mailing_address", "label": "Mailing Address" } ``` As another
  3065  	// example, the following JSON creates a text input for a programming language
  3066  	// with static suggestions: ``` "textInput": { "name":
  3067  	// "preferred_programing_language", "label": "Preferred Language",
  3068  	// "initialSuggestions": { "items": [ { "text": "C++" }, { "text": "Java" }, {
  3069  	// "text": "JavaScript" }, { "text": "Python" } ] } } ```
  3070  	TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"`
  3071  	// TextParagraph: Displays a text paragraph. Supports simple HTML formatted
  3072  	// text. For more information about formatting text, see Formatting text in
  3073  	// Google Chat apps
  3074  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  3075  	// and Formatting text in Google Workspace Add-ons
  3076  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  3077  	// For example, the following JSON creates a bolded text: ``` "textParagraph":
  3078  	// { "text": " *bold text*" } ```
  3079  	TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"`
  3080  	// ForceSendFields is a list of field names (e.g. "ButtonList") to
  3081  	// unconditionally include in API requests. By default, fields with empty or
  3082  	// default values are omitted from API requests. See
  3083  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3084  	// details.
  3085  	ForceSendFields []string `json:"-"`
  3086  	// NullFields is a list of field names (e.g. "ButtonList") to include in API
  3087  	// requests with the JSON null value. By default, fields with empty values are
  3088  	// omitted from API requests. See
  3089  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3090  	NullFields []string `json:"-"`
  3091  }
  3092  
  3093  func (s *GoogleAppsCardV1Widget) MarshalJSON() ([]byte, error) {
  3094  	type NoMethod GoogleAppsCardV1Widget
  3095  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3096  }
  3097  
  3098  // GoogleAppsCardV1Widgets: The supported widgets that you can include in a
  3099  // column. Google Workspace Add-ons and Chat apps
  3100  // (https://developers.google.com/workspace/extend): Columns for Google
  3101  // Workspace Add-ons are in Developer Preview.
  3102  type GoogleAppsCardV1Widgets struct {
  3103  	// ButtonList: ButtonList widget.
  3104  	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`
  3105  	// DateTimePicker: DateTimePicker widget.
  3106  	DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"`
  3107  	// DecoratedText: DecoratedText widget.
  3108  	DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"`
  3109  	// Image: Image widget.
  3110  	Image *GoogleAppsCardV1Image `json:"image,omitempty"`
  3111  	// SelectionInput: SelectionInput widget.
  3112  	SelectionInput *GoogleAppsCardV1SelectionInput `json:"selectionInput,omitempty"`
  3113  	// TextInput: TextInput widget.
  3114  	TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"`
  3115  	// TextParagraph: TextParagraph widget.
  3116  	TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"`
  3117  	// ForceSendFields is a list of field names (e.g. "ButtonList") to
  3118  	// unconditionally include in API requests. By default, fields with empty or
  3119  	// default values are omitted from API requests. See
  3120  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3121  	// details.
  3122  	ForceSendFields []string `json:"-"`
  3123  	// NullFields is a list of field names (e.g. "ButtonList") to include in API
  3124  	// requests with the JSON null value. By default, fields with empty values are
  3125  	// omitted from API requests. See
  3126  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3127  	NullFields []string `json:"-"`
  3128  }
  3129  
  3130  func (s *GoogleAppsCardV1Widgets) MarshalJSON() ([]byte, error) {
  3131  	type NoMethod GoogleAppsCardV1Widgets
  3132  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3133  }
  3134  
  3135  // Group: A Google Group in Google Chat.
  3136  type Group struct {
  3137  	// Name: Resource name for a Google Group. Represents a group
  3138  	// (https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud
  3139  	// Identity Groups API. Format: groups/{group}
  3140  	Name string `json:"name,omitempty"`
  3141  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  3142  	// include in API requests. By default, fields with empty or default values are
  3143  	// omitted from API requests. See
  3144  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3145  	// details.
  3146  	ForceSendFields []string `json:"-"`
  3147  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  3148  	// with the JSON null value. By default, fields with empty values are omitted
  3149  	// from API requests. See
  3150  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3151  	NullFields []string `json:"-"`
  3152  }
  3153  
  3154  func (s *Group) MarshalJSON() ([]byte, error) {
  3155  	type NoMethod Group
  3156  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3157  }
  3158  
  3159  // HostAppDataSourceMarkup: For a `SelectionInput` widget that uses a
  3160  // multiselect menu, a data source from a Google Workspace application. The
  3161  // data source populates selection items for the multiselect menu. Google Chat
  3162  // apps (https://developers.google.com/workspace/chat):
  3163  type HostAppDataSourceMarkup struct {
  3164  	// ChatDataSource: A data source from Google Chat.
  3165  	ChatDataSource *ChatClientDataSourceMarkup `json:"chatDataSource,omitempty"`
  3166  	// ForceSendFields is a list of field names (e.g. "ChatDataSource") to
  3167  	// unconditionally include in API requests. By default, fields with empty or
  3168  	// default values are omitted from API requests. See
  3169  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3170  	// details.
  3171  	ForceSendFields []string `json:"-"`
  3172  	// NullFields is a list of field names (e.g. "ChatDataSource") to include in
  3173  	// API requests with the JSON null value. By default, fields with empty values
  3174  	// are omitted from API requests. See
  3175  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3176  	NullFields []string `json:"-"`
  3177  }
  3178  
  3179  func (s *HostAppDataSourceMarkup) MarshalJSON() ([]byte, error) {
  3180  	type NoMethod HostAppDataSourceMarkup
  3181  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3182  }
  3183  
  3184  // Image: An image that's specified by a URL and can have an `onclick` action.
  3185  type Image struct {
  3186  	// AspectRatio: The aspect ratio of this image (width and height). This field
  3187  	// lets you reserve the right height for the image while waiting for it to
  3188  	// load. It's not meant to override the built-in aspect ratio of the image. If
  3189  	// unset, the server fills it by prefetching the image.
  3190  	AspectRatio float64 `json:"aspectRatio,omitempty"`
  3191  	// ImageUrl: The URL of the image.
  3192  	ImageUrl string `json:"imageUrl,omitempty"`
  3193  	// OnClick: The `onclick` action.
  3194  	OnClick *OnClick `json:"onClick,omitempty"`
  3195  	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
  3196  	// unconditionally include in API requests. By default, fields with empty or
  3197  	// default values are omitted from API requests. See
  3198  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3199  	// details.
  3200  	ForceSendFields []string `json:"-"`
  3201  	// NullFields is a list of field names (e.g. "AspectRatio") to include in API
  3202  	// requests with the JSON null value. By default, fields with empty values are
  3203  	// omitted from API requests. See
  3204  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3205  	NullFields []string `json:"-"`
  3206  }
  3207  
  3208  func (s *Image) MarshalJSON() ([]byte, error) {
  3209  	type NoMethod Image
  3210  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3211  }
  3212  
  3213  func (s *Image) UnmarshalJSON(data []byte) error {
  3214  	type NoMethod Image
  3215  	var s1 struct {
  3216  		AspectRatio gensupport.JSONFloat64 `json:"aspectRatio"`
  3217  		*NoMethod
  3218  	}
  3219  	s1.NoMethod = (*NoMethod)(s)
  3220  	if err := json.Unmarshal(data, &s1); err != nil {
  3221  		return err
  3222  	}
  3223  	s.AspectRatio = float64(s1.AspectRatio)
  3224  	return nil
  3225  }
  3226  
  3227  // ImageButton: An image button with an `onclick` action.
  3228  type ImageButton struct {
  3229  	// Icon: The icon specified by an `enum` that indices to an icon provided by
  3230  	// Chat API.
  3231  	//
  3232  	// Possible values:
  3233  	//   "ICON_UNSPECIFIED"
  3234  	//   "AIRPLANE"
  3235  	//   "BOOKMARK"
  3236  	//   "BUS"
  3237  	//   "CAR"
  3238  	//   "CLOCK"
  3239  	//   "CONFIRMATION_NUMBER_ICON"
  3240  	//   "DOLLAR"
  3241  	//   "DESCRIPTION"
  3242  	//   "EMAIL"
  3243  	//   "EVENT_PERFORMER"
  3244  	//   "EVENT_SEAT"
  3245  	//   "FLIGHT_ARRIVAL"
  3246  	//   "FLIGHT_DEPARTURE"
  3247  	//   "HOTEL"
  3248  	//   "HOTEL_ROOM_TYPE"
  3249  	//   "INVITE"
  3250  	//   "MAP_PIN"
  3251  	//   "MEMBERSHIP"
  3252  	//   "MULTIPLE_PEOPLE"
  3253  	//   "OFFER"
  3254  	//   "PERSON"
  3255  	//   "PHONE"
  3256  	//   "RESTAURANT_ICON"
  3257  	//   "SHOPPING_CART"
  3258  	//   "STAR"
  3259  	//   "STORE"
  3260  	//   "TICKET"
  3261  	//   "TRAIN"
  3262  	//   "VIDEO_CAMERA"
  3263  	//   "VIDEO_PLAY"
  3264  	Icon string `json:"icon,omitempty"`
  3265  	// IconUrl: The icon specified by a URL.
  3266  	IconUrl string `json:"iconUrl,omitempty"`
  3267  	// Name: The name of this `image_button` that's used for accessibility. Default
  3268  	// value is provided if this name isn't specified.
  3269  	Name string `json:"name,omitempty"`
  3270  	// OnClick: The `onclick` action.
  3271  	OnClick *OnClick `json:"onClick,omitempty"`
  3272  	// ForceSendFields is a list of field names (e.g. "Icon") to unconditionally
  3273  	// include in API requests. By default, fields with empty or default values are
  3274  	// omitted from API requests. See
  3275  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3276  	// details.
  3277  	ForceSendFields []string `json:"-"`
  3278  	// NullFields is a list of field names (e.g. "Icon") to include in API requests
  3279  	// with the JSON null value. By default, fields with empty values are omitted
  3280  	// from API requests. See
  3281  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3282  	NullFields []string `json:"-"`
  3283  }
  3284  
  3285  func (s *ImageButton) MarshalJSON() ([]byte, error) {
  3286  	type NoMethod ImageButton
  3287  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3288  }
  3289  
  3290  // Inputs: Types of data that users can input on cards or dialogs
  3291  // (https://developers.google.com/chat/ui/read-form-data). The input type
  3292  // depends on the type of values that the widget accepts.
  3293  type Inputs struct {
  3294  	// DateInput: Date input values from a `DateTimePicker`
  3295  	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
  3296  	// widget that only accepts date values.
  3297  	DateInput *DateInput `json:"dateInput,omitempty"`
  3298  	// DateTimeInput: Date and time input values from a `DateTimePicker`
  3299  	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
  3300  	// widget that accepts both a date and time.
  3301  	DateTimeInput *DateTimeInput `json:"dateTimeInput,omitempty"`
  3302  	// StringInputs: A list of strings that represent the values that the user
  3303  	// inputs in a widget. If the widget only accepts one value, such as a
  3304  	// `TextInput`
  3305  	// (https://developers.google.com/chat/api/reference/rest/v1/cards#TextInput)
  3306  	// widget, the list contains one string object. If the widget accepts multiple
  3307  	// values, such as a `SelectionInput`
  3308  	// (https://developers.google.com/chat/api/reference/rest/v1/cards#selectioninput)
  3309  	// widget of checkboxes, the list contains a string object for each value that
  3310  	// the user inputs or selects.
  3311  	StringInputs *StringInputs `json:"stringInputs,omitempty"`
  3312  	// TimeInput: Time input values from a `DateTimePicker`
  3313  	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
  3314  	// widget that only accepts time values.
  3315  	TimeInput *TimeInput `json:"timeInput,omitempty"`
  3316  	// ForceSendFields is a list of field names (e.g. "DateInput") to
  3317  	// unconditionally include in API requests. By default, fields with empty or
  3318  	// default values are omitted from API requests. See
  3319  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3320  	// details.
  3321  	ForceSendFields []string `json:"-"`
  3322  	// NullFields is a list of field names (e.g. "DateInput") to include in API
  3323  	// requests with the JSON null value. By default, fields with empty values are
  3324  	// omitted from API requests. See
  3325  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3326  	NullFields []string `json:"-"`
  3327  }
  3328  
  3329  func (s *Inputs) MarshalJSON() ([]byte, error) {
  3330  	type NoMethod Inputs
  3331  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3332  }
  3333  
  3334  // KeyValue: A UI element contains a key (label) and a value (content). This
  3335  // element can also contain some actions such as `onclick` button.
  3336  type KeyValue struct {
  3337  	// BottomLabel: The text of the bottom label. Formatted text supported. For
  3338  	// more information about formatting text, see Formatting text in Google Chat
  3339  	// apps
  3340  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  3341  	// and Formatting text in Google Workspace Add-ons
  3342  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  3343  	BottomLabel string `json:"bottomLabel,omitempty"`
  3344  	// Button: A button that can be clicked to trigger an action.
  3345  	Button *Button `json:"button,omitempty"`
  3346  	// Content: The text of the content. Formatted text supported and always
  3347  	// required. For more information about formatting text, see Formatting text in
  3348  	// Google Chat apps
  3349  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  3350  	// and Formatting text in Google Workspace Add-ons
  3351  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  3352  	Content string `json:"content,omitempty"`
  3353  	// ContentMultiline: If the content should be multiline.
  3354  	ContentMultiline bool `json:"contentMultiline,omitempty"`
  3355  	// Icon: An enum value that's replaced by the Chat API with the corresponding
  3356  	// icon image.
  3357  	//
  3358  	// Possible values:
  3359  	//   "ICON_UNSPECIFIED"
  3360  	//   "AIRPLANE"
  3361  	//   "BOOKMARK"
  3362  	//   "BUS"
  3363  	//   "CAR"
  3364  	//   "CLOCK"
  3365  	//   "CONFIRMATION_NUMBER_ICON"
  3366  	//   "DOLLAR"
  3367  	//   "DESCRIPTION"
  3368  	//   "EMAIL"
  3369  	//   "EVENT_PERFORMER"
  3370  	//   "EVENT_SEAT"
  3371  	//   "FLIGHT_ARRIVAL"
  3372  	//   "FLIGHT_DEPARTURE"
  3373  	//   "HOTEL"
  3374  	//   "HOTEL_ROOM_TYPE"
  3375  	//   "INVITE"
  3376  	//   "MAP_PIN"
  3377  	//   "MEMBERSHIP"
  3378  	//   "MULTIPLE_PEOPLE"
  3379  	//   "OFFER"
  3380  	//   "PERSON"
  3381  	//   "PHONE"
  3382  	//   "RESTAURANT_ICON"
  3383  	//   "SHOPPING_CART"
  3384  	//   "STAR"
  3385  	//   "STORE"
  3386  	//   "TICKET"
  3387  	//   "TRAIN"
  3388  	//   "VIDEO_CAMERA"
  3389  	//   "VIDEO_PLAY"
  3390  	Icon string `json:"icon,omitempty"`
  3391  	// IconUrl: The icon specified by a URL.
  3392  	IconUrl string `json:"iconUrl,omitempty"`
  3393  	// OnClick: The `onclick` action. Only the top label, bottom label, and content
  3394  	// region are clickable.
  3395  	OnClick *OnClick `json:"onClick,omitempty"`
  3396  	// TopLabel: The text of the top label. Formatted text supported. For more
  3397  	// information about formatting text, see Formatting text in Google Chat apps
  3398  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  3399  	// and Formatting text in Google Workspace Add-ons
  3400  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  3401  	TopLabel string `json:"topLabel,omitempty"`
  3402  	// ForceSendFields is a list of field names (e.g. "BottomLabel") to
  3403  	// unconditionally include in API requests. By default, fields with empty or
  3404  	// default values are omitted from API requests. See
  3405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3406  	// details.
  3407  	ForceSendFields []string `json:"-"`
  3408  	// NullFields is a list of field names (e.g. "BottomLabel") to include in API
  3409  	// requests with the JSON null value. By default, fields with empty values are
  3410  	// omitted from API requests. See
  3411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3412  	NullFields []string `json:"-"`
  3413  }
  3414  
  3415  func (s *KeyValue) MarshalJSON() ([]byte, error) {
  3416  	type NoMethod KeyValue
  3417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3418  }
  3419  
  3420  // ListMembershipsResponse: Response to list memberships of the space.
  3421  type ListMembershipsResponse struct {
  3422  	// Memberships: Unordered list. List of memberships in the requested (or first)
  3423  	// page.
  3424  	Memberships []*Membership `json:"memberships,omitempty"`
  3425  	// NextPageToken: A token that you can send as `pageToken` to retrieve the next
  3426  	// page of results. If empty, there are no subsequent pages.
  3427  	NextPageToken string `json:"nextPageToken,omitempty"`
  3428  
  3429  	// ServerResponse contains the HTTP response code and headers from the server.
  3430  	googleapi.ServerResponse `json:"-"`
  3431  	// ForceSendFields is a list of field names (e.g. "Memberships") to
  3432  	// unconditionally include in API requests. By default, fields with empty or
  3433  	// default values are omitted from API requests. See
  3434  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3435  	// details.
  3436  	ForceSendFields []string `json:"-"`
  3437  	// NullFields is a list of field names (e.g. "Memberships") to include in API
  3438  	// requests with the JSON null value. By default, fields with empty values are
  3439  	// omitted from API requests. See
  3440  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3441  	NullFields []string `json:"-"`
  3442  }
  3443  
  3444  func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error) {
  3445  	type NoMethod ListMembershipsResponse
  3446  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3447  }
  3448  
  3449  // ListMessagesResponse: Response message for listing messages.
  3450  type ListMessagesResponse struct {
  3451  	// Messages: List of messages.
  3452  	Messages []*Message `json:"messages,omitempty"`
  3453  	// NextPageToken: You can send a token as `pageToken` to retrieve the next page
  3454  	// of results. If empty, there are no subsequent pages.
  3455  	NextPageToken string `json:"nextPageToken,omitempty"`
  3456  
  3457  	// ServerResponse contains the HTTP response code and headers from the server.
  3458  	googleapi.ServerResponse `json:"-"`
  3459  	// ForceSendFields is a list of field names (e.g. "Messages") to
  3460  	// unconditionally include in API requests. By default, fields with empty or
  3461  	// default values are omitted from API requests. See
  3462  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3463  	// details.
  3464  	ForceSendFields []string `json:"-"`
  3465  	// NullFields is a list of field names (e.g. "Messages") to include in API
  3466  	// requests with the JSON null value. By default, fields with empty values are
  3467  	// omitted from API requests. See
  3468  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3469  	NullFields []string `json:"-"`
  3470  }
  3471  
  3472  func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) {
  3473  	type NoMethod ListMessagesResponse
  3474  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3475  }
  3476  
  3477  // ListReactionsResponse: Response to a list reactions request.
  3478  type ListReactionsResponse struct {
  3479  	// NextPageToken: Continuation token to retrieve the next page of results. It's
  3480  	// empty for the last page of results.
  3481  	NextPageToken string `json:"nextPageToken,omitempty"`
  3482  	// Reactions: List of reactions in the requested (or first) page.
  3483  	Reactions []*Reaction `json:"reactions,omitempty"`
  3484  
  3485  	// ServerResponse contains the HTTP response code and headers from the server.
  3486  	googleapi.ServerResponse `json:"-"`
  3487  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3488  	// unconditionally include in API requests. By default, fields with empty or
  3489  	// default values are omitted from API requests. See
  3490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3491  	// details.
  3492  	ForceSendFields []string `json:"-"`
  3493  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3494  	// requests with the JSON null value. By default, fields with empty values are
  3495  	// omitted from API requests. See
  3496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3497  	NullFields []string `json:"-"`
  3498  }
  3499  
  3500  func (s *ListReactionsResponse) MarshalJSON() ([]byte, error) {
  3501  	type NoMethod ListReactionsResponse
  3502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3503  }
  3504  
  3505  // ListSpaceEventsResponse: Response message for listing space events.
  3506  type ListSpaceEventsResponse struct {
  3507  	// NextPageToken: Continuation token used to fetch more events. If this field
  3508  	// is omitted, there are no subsequent pages.
  3509  	NextPageToken string `json:"nextPageToken,omitempty"`
  3510  	// SpaceEvents: Results are returned in chronological order (oldest event
  3511  	// first).
  3512  	SpaceEvents []*SpaceEvent `json:"spaceEvents,omitempty"`
  3513  
  3514  	// ServerResponse contains the HTTP response code and headers from the server.
  3515  	googleapi.ServerResponse `json:"-"`
  3516  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3517  	// unconditionally include in API requests. By default, fields with empty or
  3518  	// default values are omitted from API requests. See
  3519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3520  	// details.
  3521  	ForceSendFields []string `json:"-"`
  3522  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3523  	// requests with the JSON null value. By default, fields with empty values are
  3524  	// omitted from API requests. See
  3525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3526  	NullFields []string `json:"-"`
  3527  }
  3528  
  3529  func (s *ListSpaceEventsResponse) MarshalJSON() ([]byte, error) {
  3530  	type NoMethod ListSpaceEventsResponse
  3531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3532  }
  3533  
  3534  // ListSpacesResponse: The response for a list spaces request.
  3535  type ListSpacesResponse struct {
  3536  	// NextPageToken: You can send a token as `pageToken` to retrieve the next page
  3537  	// of results. If empty, there are no subsequent pages.
  3538  	NextPageToken string `json:"nextPageToken,omitempty"`
  3539  	// Spaces: List of spaces in the requested (or first) page.
  3540  	Spaces []*Space `json:"spaces,omitempty"`
  3541  
  3542  	// ServerResponse contains the HTTP response code and headers from the server.
  3543  	googleapi.ServerResponse `json:"-"`
  3544  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3545  	// unconditionally include in API requests. By default, fields with empty or
  3546  	// default values are omitted from API requests. See
  3547  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3548  	// details.
  3549  	ForceSendFields []string `json:"-"`
  3550  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3551  	// requests with the JSON null value. By default, fields with empty values are
  3552  	// omitted from API requests. See
  3553  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3554  	NullFields []string `json:"-"`
  3555  }
  3556  
  3557  func (s *ListSpacesResponse) MarshalJSON() ([]byte, error) {
  3558  	type NoMethod ListSpacesResponse
  3559  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3560  }
  3561  
  3562  // MatchedUrl: A matched URL in a Chat message. Chat apps can preview matched
  3563  // URLs. For more information, see Preview links
  3564  // (https://developers.google.com/chat/how-tos/preview-links).
  3565  type MatchedUrl struct {
  3566  	// Url: Output only. The URL that was matched.
  3567  	Url string `json:"url,omitempty"`
  3568  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
  3569  	// include in API requests. By default, fields with empty or default values are
  3570  	// omitted from API requests. See
  3571  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3572  	// details.
  3573  	ForceSendFields []string `json:"-"`
  3574  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  3575  	// with the JSON null value. By default, fields with empty values are omitted
  3576  	// from API requests. See
  3577  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3578  	NullFields []string `json:"-"`
  3579  }
  3580  
  3581  func (s *MatchedUrl) MarshalJSON() ([]byte, error) {
  3582  	type NoMethod MatchedUrl
  3583  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3584  }
  3585  
  3586  // Media: Media resource.
  3587  type Media struct {
  3588  	// ResourceName: Name of the media resource.
  3589  	ResourceName string `json:"resourceName,omitempty"`
  3590  
  3591  	// ServerResponse contains the HTTP response code and headers from the server.
  3592  	googleapi.ServerResponse `json:"-"`
  3593  	// ForceSendFields is a list of field names (e.g. "ResourceName") to
  3594  	// unconditionally include in API requests. By default, fields with empty or
  3595  	// default values are omitted from API requests. See
  3596  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3597  	// details.
  3598  	ForceSendFields []string `json:"-"`
  3599  	// NullFields is a list of field names (e.g. "ResourceName") to include in API
  3600  	// requests with the JSON null value. By default, fields with empty values are
  3601  	// omitted from API requests. See
  3602  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3603  	NullFields []string `json:"-"`
  3604  }
  3605  
  3606  func (s *Media) MarshalJSON() ([]byte, error) {
  3607  	type NoMethod Media
  3608  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3609  }
  3610  
  3611  // Membership: Represents a membership relation in Google Chat, such as whether
  3612  // a user or Chat app is invited to, part of, or absent from a space.
  3613  type Membership struct {
  3614  	// CreateTime: Optional. Immutable. The creation time of the membership, such
  3615  	// as when a member joined or was invited to join a space. This field is output
  3616  	// only, except when used to import historical memberships in import mode
  3617  	// spaces.
  3618  	CreateTime string `json:"createTime,omitempty"`
  3619  	// DeleteTime: Optional. Immutable. The deletion time of the membership, such
  3620  	// as when a member left or was removed from a space. This field is output
  3621  	// only, except when used to import historical memberships in import mode
  3622  	// spaces.
  3623  	DeleteTime string `json:"deleteTime,omitempty"`
  3624  	// GroupMember: The Google Group the membership corresponds to. Only supports
  3625  	// read operations. Other operations, like creating or updating a membership,
  3626  	// aren't currently supported.
  3627  	GroupMember *Group `json:"groupMember,omitempty"`
  3628  	// Member: The Google Chat user or app the membership corresponds to. If your
  3629  	// Chat app authenticates as a user
  3630  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  3631  	// the output populates the user
  3632  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
  3633  	// `name` and `type`.
  3634  	Member *User `json:"member,omitempty"`
  3635  	// Name: Resource name of the membership, assigned by the server. Format:
  3636  	// `spaces/{space}/members/{member}`
  3637  	Name string `json:"name,omitempty"`
  3638  	// Role: Optional. User's role within a Chat space, which determines their
  3639  	// permitted actions in the space. This field can only be used as input in
  3640  	// `UpdateMembership`.
  3641  	//
  3642  	// Possible values:
  3643  	//   "MEMBERSHIP_ROLE_UNSPECIFIED" - Default value. For users: they aren't a
  3644  	// member of the space, but can be invited. For Google Groups: they're always
  3645  	// assigned this role (other enum values might be used in the future).
  3646  	//   "ROLE_MEMBER" - A member of the space. The user has basic permissions,
  3647  	// like sending messages to the space. In 1:1 and unnamed group conversations,
  3648  	// everyone has this role.
  3649  	//   "ROLE_MANAGER" - A space manager. The user has all basic permissions plus
  3650  	// administrative permissions that let them manage the space, like adding or
  3651  	// removing members. Only supported in SpaceType.SPACE.
  3652  	Role string `json:"role,omitempty"`
  3653  	// State: Output only. State of the membership.
  3654  	//
  3655  	// Possible values:
  3656  	//   "MEMBERSHIP_STATE_UNSPECIFIED" - Default value. Don't use.
  3657  	//   "JOINED" - The user is added to the space, and can participate in the
  3658  	// space.
  3659  	//   "INVITED" - The user is invited to join the space, but hasn't joined it.
  3660  	//   "NOT_A_MEMBER" - The user doesn't belong to the space and doesn't have a
  3661  	// pending invitation to join the space.
  3662  	State string `json:"state,omitempty"`
  3663  
  3664  	// ServerResponse contains the HTTP response code and headers from the server.
  3665  	googleapi.ServerResponse `json:"-"`
  3666  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3667  	// unconditionally include in API requests. By default, fields with empty or
  3668  	// default values are omitted from API requests. See
  3669  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3670  	// details.
  3671  	ForceSendFields []string `json:"-"`
  3672  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3673  	// requests with the JSON null value. By default, fields with empty values are
  3674  	// omitted from API requests. See
  3675  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3676  	NullFields []string `json:"-"`
  3677  }
  3678  
  3679  func (s *Membership) MarshalJSON() ([]byte, error) {
  3680  	type NoMethod Membership
  3681  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3682  }
  3683  
  3684  // MembershipBatchCreatedEventData: Event payload for multiple new memberships.
  3685  // Event type: `google.workspace.chat.membership.v1.batchCreated`
  3686  type MembershipBatchCreatedEventData struct {
  3687  	// Memberships: A list of new memberships.
  3688  	Memberships []*MembershipCreatedEventData `json:"memberships,omitempty"`
  3689  	// ForceSendFields is a list of field names (e.g. "Memberships") to
  3690  	// unconditionally include in API requests. By default, fields with empty or
  3691  	// default values are omitted from API requests. See
  3692  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3693  	// details.
  3694  	ForceSendFields []string `json:"-"`
  3695  	// NullFields is a list of field names (e.g. "Memberships") to include in API
  3696  	// requests with the JSON null value. By default, fields with empty values are
  3697  	// omitted from API requests. See
  3698  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3699  	NullFields []string `json:"-"`
  3700  }
  3701  
  3702  func (s *MembershipBatchCreatedEventData) MarshalJSON() ([]byte, error) {
  3703  	type NoMethod MembershipBatchCreatedEventData
  3704  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3705  }
  3706  
  3707  // MembershipBatchDeletedEventData: Event payload for multiple deleted
  3708  // memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`
  3709  type MembershipBatchDeletedEventData struct {
  3710  	// Memberships: A list of deleted memberships.
  3711  	Memberships []*MembershipDeletedEventData `json:"memberships,omitempty"`
  3712  	// ForceSendFields is a list of field names (e.g. "Memberships") to
  3713  	// unconditionally include in API requests. By default, fields with empty or
  3714  	// default values are omitted from API requests. See
  3715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3716  	// details.
  3717  	ForceSendFields []string `json:"-"`
  3718  	// NullFields is a list of field names (e.g. "Memberships") to include in API
  3719  	// requests with the JSON null value. By default, fields with empty values are
  3720  	// omitted from API requests. See
  3721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3722  	NullFields []string `json:"-"`
  3723  }
  3724  
  3725  func (s *MembershipBatchDeletedEventData) MarshalJSON() ([]byte, error) {
  3726  	type NoMethod MembershipBatchDeletedEventData
  3727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3728  }
  3729  
  3730  // MembershipBatchUpdatedEventData: Event payload for multiple updated
  3731  // memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`
  3732  type MembershipBatchUpdatedEventData struct {
  3733  	// Memberships: A list of updated memberships.
  3734  	Memberships []*MembershipUpdatedEventData `json:"memberships,omitempty"`
  3735  	// ForceSendFields is a list of field names (e.g. "Memberships") to
  3736  	// unconditionally include in API requests. By default, fields with empty or
  3737  	// default values are omitted from API requests. See
  3738  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3739  	// details.
  3740  	ForceSendFields []string `json:"-"`
  3741  	// NullFields is a list of field names (e.g. "Memberships") to include in API
  3742  	// requests with the JSON null value. By default, fields with empty values are
  3743  	// omitted from API requests. See
  3744  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3745  	NullFields []string `json:"-"`
  3746  }
  3747  
  3748  func (s *MembershipBatchUpdatedEventData) MarshalJSON() ([]byte, error) {
  3749  	type NoMethod MembershipBatchUpdatedEventData
  3750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3751  }
  3752  
  3753  // MembershipCreatedEventData: Event payload for a new membership. Event type:
  3754  // `google.workspace.chat.membership.v1.created`.
  3755  type MembershipCreatedEventData struct {
  3756  	// Membership: The new membership.
  3757  	Membership *Membership `json:"membership,omitempty"`
  3758  	// ForceSendFields is a list of field names (e.g. "Membership") to
  3759  	// unconditionally include in API requests. By default, fields with empty or
  3760  	// default values are omitted from API requests. See
  3761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3762  	// details.
  3763  	ForceSendFields []string `json:"-"`
  3764  	// NullFields is a list of field names (e.g. "Membership") to include in API
  3765  	// requests with the JSON null value. By default, fields with empty values are
  3766  	// omitted from API requests. See
  3767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3768  	NullFields []string `json:"-"`
  3769  }
  3770  
  3771  func (s *MembershipCreatedEventData) MarshalJSON() ([]byte, error) {
  3772  	type NoMethod MembershipCreatedEventData
  3773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3774  }
  3775  
  3776  // MembershipDeletedEventData: Event payload for a deleted membership. Event
  3777  // type: `google.workspace.chat.membership.v1.deleted`
  3778  type MembershipDeletedEventData struct {
  3779  	// Membership: The deleted membership. Only the `name` and `state` fields are
  3780  	// populated.
  3781  	Membership *Membership `json:"membership,omitempty"`
  3782  	// ForceSendFields is a list of field names (e.g. "Membership") to
  3783  	// unconditionally include in API requests. By default, fields with empty or
  3784  	// default values are omitted from API requests. See
  3785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3786  	// details.
  3787  	ForceSendFields []string `json:"-"`
  3788  	// NullFields is a list of field names (e.g. "Membership") to include in API
  3789  	// requests with the JSON null value. By default, fields with empty values are
  3790  	// omitted from API requests. See
  3791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3792  	NullFields []string `json:"-"`
  3793  }
  3794  
  3795  func (s *MembershipDeletedEventData) MarshalJSON() ([]byte, error) {
  3796  	type NoMethod MembershipDeletedEventData
  3797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3798  }
  3799  
  3800  // MembershipUpdatedEventData: Event payload for an updated membership. Event
  3801  // type: `google.workspace.chat.membership.v1.updated`
  3802  type MembershipUpdatedEventData struct {
  3803  	// Membership: The updated membership.
  3804  	Membership *Membership `json:"membership,omitempty"`
  3805  	// ForceSendFields is a list of field names (e.g. "Membership") to
  3806  	// unconditionally include in API requests. By default, fields with empty or
  3807  	// default values are omitted from API requests. See
  3808  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3809  	// details.
  3810  	ForceSendFields []string `json:"-"`
  3811  	// NullFields is a list of field names (e.g. "Membership") to include in API
  3812  	// requests with the JSON null value. By default, fields with empty values are
  3813  	// omitted from API requests. See
  3814  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3815  	NullFields []string `json:"-"`
  3816  }
  3817  
  3818  func (s *MembershipUpdatedEventData) MarshalJSON() ([]byte, error) {
  3819  	type NoMethod MembershipUpdatedEventData
  3820  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3821  }
  3822  
  3823  // Message: A message in a Google Chat space.
  3824  type Message struct {
  3825  	// AccessoryWidgets: One or more interactive widgets that appear at the bottom
  3826  	// of a message. You can add accessory widgets to messages that contain text,
  3827  	// cards, or both text and cards. Not supported for messages that contain
  3828  	// dialogs. For details, see Add interactive widgets at the bottom of a message
  3829  	// (https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
  3830  	// Creating a message with accessory widgets requires [app authentication]
  3831  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  3832  	AccessoryWidgets []*AccessoryWidget `json:"accessoryWidgets,omitempty"`
  3833  	// ActionResponse: Input only. Parameters that a Chat app can use to configure
  3834  	// how its response is posted.
  3835  	ActionResponse *ActionResponse `json:"actionResponse,omitempty"`
  3836  	// Annotations: Output only. Annotations associated with the `text` in this
  3837  	// message.
  3838  	Annotations []*Annotation `json:"annotations,omitempty"`
  3839  	// ArgumentText: Output only. Plain-text body of the message with all Chat app
  3840  	// mentions stripped out.
  3841  	ArgumentText string `json:"argumentText,omitempty"`
  3842  	// AttachedGifs: Output only. GIF images that are attached to the message.
  3843  	AttachedGifs []*AttachedGif `json:"attachedGifs,omitempty"`
  3844  	// Attachment: User-uploaded attachment.
  3845  	Attachment []*Attachment `json:"attachment,omitempty"`
  3846  	// Cards: Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive
  3847  	// cards that you can use to display UI elements such as: formatted texts,
  3848  	// buttons, and clickable images. Cards are normally displayed below the
  3849  	// plain-text body of the message. `cards` and `cards_v2` can have a maximum
  3850  	// size of 32 KB.
  3851  	Cards []*Card `json:"cards,omitempty"`
  3852  	// CardsV2: An array of cards
  3853  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).
  3854  	// Only Chat apps can create cards. If your Chat app authenticates as a user
  3855  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  3856  	// the messages can't contain cards. To learn about cards and how to create
  3857  	// them, see Send card messages
  3858  	// (https://developers.google.com/workspace/chat/create-messages#create). Card
  3859  	// builder (https://addons.gsuite.google.com/uikit/builder)
  3860  	CardsV2 []*CardWithId `json:"cardsV2,omitempty"`
  3861  	// ClientAssignedMessageId: Optional. A custom ID for the message. You can use
  3862  	// field to identify a message, or to get, delete, or update a message. To set
  3863  	// a custom ID, specify the `messageId`
  3864  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
  3865  	// field when you create the message. For details, see Name a message
  3866  	// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  3867  	ClientAssignedMessageId string `json:"clientAssignedMessageId,omitempty"`
  3868  	// CreateTime: Optional. Immutable. For spaces created in Chat, the time at
  3869  	// which the message was created. This field is output only, except when used
  3870  	// in import mode spaces. For import mode spaces, set this field to the
  3871  	// historical timestamp at which the message was created in the source in order
  3872  	// to preserve the original creation time.
  3873  	CreateTime string `json:"createTime,omitempty"`
  3874  	// DeleteTime: Output only. The time at which the message was deleted in Google
  3875  	// Chat. If the message is never deleted, this field is empty.
  3876  	DeleteTime string `json:"deleteTime,omitempty"`
  3877  	// DeletionMetadata: Output only. Information about a deleted message. A
  3878  	// message is deleted when `delete_time` is set.
  3879  	DeletionMetadata *DeletionMetadata `json:"deletionMetadata,omitempty"`
  3880  	// EmojiReactionSummaries: Output only. The list of emoji reaction summaries on
  3881  	// the message.
  3882  	EmojiReactionSummaries []*EmojiReactionSummary `json:"emojiReactionSummaries,omitempty"`
  3883  	// FallbackText: A plain-text description of the message's cards, used when the
  3884  	// actual cards can't be displayed—for example, mobile notifications.
  3885  	FallbackText string `json:"fallbackText,omitempty"`
  3886  	// FormattedText: Output only. Contains the message `text` with markups added
  3887  	// to communicate formatting. This field might not capture all formatting
  3888  	// visible in the UI, but includes the following: * Markup syntax
  3889  	// (https://developers.google.com/workspace/chat/format-messages) for bold,
  3890  	// italic, strikethrough, monospace, monospace block, and bulleted list. * User
  3891  	// mentions
  3892  	// (https://developers.google.com/workspace/chat/format-messages#messages-@mention)
  3893  	// using the format ``. * Custom hyperlinks using the format
  3894  	// `<{url}|{rendered_text}>` where the first string is the URL and the second
  3895  	// is the rendered text—for example, ``. * Custom emoji using the format
  3896  	// `:{emoji_name}:`—for example, `:smile:`. This doesn't apply to Unicode
  3897  	// emoji, such as `U+1F600` for a grinning face emoji. For more information,
  3898  	// see View text formatting sent in a message
  3899  	// (https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)
  3900  	FormattedText string `json:"formattedText,omitempty"`
  3901  	// LastUpdateTime: Output only. The time at which the message was last edited
  3902  	// by a user. If the message has never been edited, this field is empty.
  3903  	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
  3904  	// MatchedUrl: Output only. A URL in `spaces.messages.text` that matches a link
  3905  	// preview pattern. For more information, see Preview links
  3906  	// (https://developers.google.com/workspace/chat/preview-links).
  3907  	MatchedUrl *MatchedUrl `json:"matchedUrl,omitempty"`
  3908  	// Name: Resource name of the message. Format:
  3909  	// `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space
  3910  	// where the message is posted and `{message}` is a system-assigned ID for the
  3911  	// message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`.
  3912  	// If you set a custom ID when you create a message, you can use this ID to
  3913  	// specify the message in a request by replacing `{message}` with the value
  3914  	// from the `clientAssignedMessageId` field. For example,
  3915  	// `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see Name a
  3916  	// message
  3917  	// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  3918  	Name string `json:"name,omitempty"`
  3919  	// PrivateMessageViewer: Immutable. Input for creating a message, otherwise
  3920  	// output only. The user that can view the message. When set, the message is
  3921  	// private and only visible to the specified user and the Chat app. Link
  3922  	// previews and attachments aren't supported for private messages. Only Chat
  3923  	// apps can send private messages. If your Chat app authenticates as a user
  3924  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  3925  	// to send a message, the message can't be private and must omit this field.
  3926  	// For details, see Send private messages to Google Chat users
  3927  	// (https://developers.google.com/workspace/chat/private-messages).
  3928  	PrivateMessageViewer *User `json:"privateMessageViewer,omitempty"`
  3929  	// QuotedMessageMetadata: Output only. Information about a message that's
  3930  	// quoted by a Google Chat user in a space. Google Chat users can quote a
  3931  	// message to reply to it.
  3932  	QuotedMessageMetadata *QuotedMessageMetadata `json:"quotedMessageMetadata,omitempty"`
  3933  	// Sender: Output only. The user who created the message. If your Chat app
  3934  	// authenticates as a user
  3935  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  3936  	// the output populates the user
  3937  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
  3938  	// `name` and `type`.
  3939  	Sender *User `json:"sender,omitempty"`
  3940  	// SlashCommand: Output only. Slash command information, if applicable.
  3941  	SlashCommand *SlashCommand `json:"slashCommand,omitempty"`
  3942  	// Space: If your Chat app authenticates as a user
  3943  	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  3944  	// the output populates the space
  3945  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
  3946  	// `name`.
  3947  	Space *Space `json:"space,omitempty"`
  3948  	// Text: Plain-text body of the message. The first link to an image, video, or
  3949  	// web page generates a preview chip
  3950  	// (https://developers.google.com/workspace/chat/preview-links). You can also
  3951  	// @mention a Google Chat user
  3952  	// (https://developers.google.com/workspace/chat/format-messages#messages-@mention),
  3953  	// or everyone in the space. To learn about creating text messages, see Send a
  3954  	// text message
  3955  	// (https://developers.google.com/workspace/chat/create-messages#create-text-messages).
  3956  	Text string `json:"text,omitempty"`
  3957  	// Thread: The thread the message belongs to. For example usage, see Start or
  3958  	// reply to a message thread
  3959  	// (https://developers.google.com/workspace/chat/create-messages#create-message-thread).
  3960  	Thread *Thread `json:"thread,omitempty"`
  3961  	// ThreadReply: Output only. When `true`, the message is a response in a reply
  3962  	// thread. When `false`, the message is visible in the space's top-level
  3963  	// conversation as either the first message of a thread or a message with no
  3964  	// threaded replies. If the space doesn't support reply in threads, this field
  3965  	// is always `false`.
  3966  	ThreadReply bool `json:"threadReply,omitempty"`
  3967  
  3968  	// ServerResponse contains the HTTP response code and headers from the server.
  3969  	googleapi.ServerResponse `json:"-"`
  3970  	// ForceSendFields is a list of field names (e.g. "AccessoryWidgets") to
  3971  	// unconditionally include in API requests. By default, fields with empty or
  3972  	// default values are omitted from API requests. See
  3973  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3974  	// details.
  3975  	ForceSendFields []string `json:"-"`
  3976  	// NullFields is a list of field names (e.g. "AccessoryWidgets") to include in
  3977  	// API requests with the JSON null value. By default, fields with empty values
  3978  	// are omitted from API requests. See
  3979  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3980  	NullFields []string `json:"-"`
  3981  }
  3982  
  3983  func (s *Message) MarshalJSON() ([]byte, error) {
  3984  	type NoMethod Message
  3985  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3986  }
  3987  
  3988  // MessageBatchCreatedEventData: Event payload for multiple new messages. Event
  3989  // type: `google.workspace.chat.message.v1.batchCreated`
  3990  type MessageBatchCreatedEventData struct {
  3991  	// Messages: A list of new messages.
  3992  	Messages []*MessageCreatedEventData `json:"messages,omitempty"`
  3993  	// ForceSendFields is a list of field names (e.g. "Messages") to
  3994  	// unconditionally include in API requests. By default, fields with empty or
  3995  	// default values are omitted from API requests. See
  3996  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3997  	// details.
  3998  	ForceSendFields []string `json:"-"`
  3999  	// NullFields is a list of field names (e.g. "Messages") to include in API
  4000  	// requests with the JSON null value. By default, fields with empty values are
  4001  	// omitted from API requests. See
  4002  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4003  	NullFields []string `json:"-"`
  4004  }
  4005  
  4006  func (s *MessageBatchCreatedEventData) MarshalJSON() ([]byte, error) {
  4007  	type NoMethod MessageBatchCreatedEventData
  4008  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4009  }
  4010  
  4011  // MessageBatchDeletedEventData: Event payload for multiple deleted messages.
  4012  // Event type: `google.workspace.chat.message.v1.batchDeleted`
  4013  type MessageBatchDeletedEventData struct {
  4014  	// Messages: A list of deleted messages.
  4015  	Messages []*MessageDeletedEventData `json:"messages,omitempty"`
  4016  	// ForceSendFields is a list of field names (e.g. "Messages") to
  4017  	// unconditionally include in API requests. By default, fields with empty or
  4018  	// default values are omitted from API requests. See
  4019  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4020  	// details.
  4021  	ForceSendFields []string `json:"-"`
  4022  	// NullFields is a list of field names (e.g. "Messages") to include in API
  4023  	// requests with the JSON null value. By default, fields with empty values are
  4024  	// omitted from API requests. See
  4025  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4026  	NullFields []string `json:"-"`
  4027  }
  4028  
  4029  func (s *MessageBatchDeletedEventData) MarshalJSON() ([]byte, error) {
  4030  	type NoMethod MessageBatchDeletedEventData
  4031  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4032  }
  4033  
  4034  // MessageBatchUpdatedEventData: Event payload for multiple updated messages.
  4035  // Event type: `google.workspace.chat.message.v1.batchUpdated`
  4036  type MessageBatchUpdatedEventData struct {
  4037  	// Messages: A list of updated messages.
  4038  	Messages []*MessageUpdatedEventData `json:"messages,omitempty"`
  4039  	// ForceSendFields is a list of field names (e.g. "Messages") to
  4040  	// unconditionally include in API requests. By default, fields with empty or
  4041  	// default values are omitted from API requests. See
  4042  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4043  	// details.
  4044  	ForceSendFields []string `json:"-"`
  4045  	// NullFields is a list of field names (e.g. "Messages") to include in API
  4046  	// requests with the JSON null value. By default, fields with empty values are
  4047  	// omitted from API requests. See
  4048  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4049  	NullFields []string `json:"-"`
  4050  }
  4051  
  4052  func (s *MessageBatchUpdatedEventData) MarshalJSON() ([]byte, error) {
  4053  	type NoMethod MessageBatchUpdatedEventData
  4054  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4055  }
  4056  
  4057  // MessageCreatedEventData: Event payload for a new message. Event type:
  4058  // `google.workspace.chat.message.v1.created`
  4059  type MessageCreatedEventData struct {
  4060  	// Message: The new message.
  4061  	Message *Message `json:"message,omitempty"`
  4062  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
  4063  	// include in API requests. By default, fields with empty or default values are
  4064  	// omitted from API requests. See
  4065  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4066  	// details.
  4067  	ForceSendFields []string `json:"-"`
  4068  	// NullFields is a list of field names (e.g. "Message") to include in API
  4069  	// requests with the JSON null value. By default, fields with empty values are
  4070  	// omitted from API requests. See
  4071  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4072  	NullFields []string `json:"-"`
  4073  }
  4074  
  4075  func (s *MessageCreatedEventData) MarshalJSON() ([]byte, error) {
  4076  	type NoMethod MessageCreatedEventData
  4077  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4078  }
  4079  
  4080  // MessageDeletedEventData: Event payload for a deleted message. Event type:
  4081  // `google.workspace.chat.message.v1.deleted`
  4082  type MessageDeletedEventData struct {
  4083  	// Message: The deleted message. Only the `name`, `createTime`, `deleteTime`,
  4084  	// and `deletionMetadata` fields are populated.
  4085  	Message *Message `json:"message,omitempty"`
  4086  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
  4087  	// include in API requests. By default, fields with empty or default values are
  4088  	// omitted from API requests. See
  4089  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4090  	// details.
  4091  	ForceSendFields []string `json:"-"`
  4092  	// NullFields is a list of field names (e.g. "Message") to include in API
  4093  	// requests with the JSON null value. By default, fields with empty values are
  4094  	// omitted from API requests. See
  4095  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4096  	NullFields []string `json:"-"`
  4097  }
  4098  
  4099  func (s *MessageDeletedEventData) MarshalJSON() ([]byte, error) {
  4100  	type NoMethod MessageDeletedEventData
  4101  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4102  }
  4103  
  4104  // MessageUpdatedEventData: Event payload for an updated message. Event type:
  4105  // `google.workspace.chat.message.v1.updated`
  4106  type MessageUpdatedEventData struct {
  4107  	// Message: The updated message.
  4108  	Message *Message `json:"message,omitempty"`
  4109  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
  4110  	// include in API requests. By default, fields with empty or default values are
  4111  	// omitted from API requests. See
  4112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4113  	// details.
  4114  	ForceSendFields []string `json:"-"`
  4115  	// NullFields is a list of field names (e.g. "Message") to include in API
  4116  	// requests with the JSON null value. By default, fields with empty values are
  4117  	// omitted from API requests. See
  4118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4119  	NullFields []string `json:"-"`
  4120  }
  4121  
  4122  func (s *MessageUpdatedEventData) MarshalJSON() ([]byte, error) {
  4123  	type NoMethod MessageUpdatedEventData
  4124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4125  }
  4126  
  4127  // OnClick: An `onclick` action (for example, open a link).
  4128  type OnClick struct {
  4129  	// Action: A form action is triggered by this `onclick` action if specified.
  4130  	Action *FormAction `json:"action,omitempty"`
  4131  	// OpenLink: This `onclick` action triggers an open link action if specified.
  4132  	OpenLink *OpenLink `json:"openLink,omitempty"`
  4133  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  4134  	// include in API requests. By default, fields with empty or default values are
  4135  	// omitted from API requests. See
  4136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4137  	// details.
  4138  	ForceSendFields []string `json:"-"`
  4139  	// NullFields is a list of field names (e.g. "Action") to include in API
  4140  	// requests with the JSON null value. By default, fields with empty values are
  4141  	// omitted from API requests. See
  4142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4143  	NullFields []string `json:"-"`
  4144  }
  4145  
  4146  func (s *OnClick) MarshalJSON() ([]byte, error) {
  4147  	type NoMethod OnClick
  4148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4149  }
  4150  
  4151  // OpenLink: A link that opens a new window.
  4152  type OpenLink struct {
  4153  	// Url: The URL to open.
  4154  	Url string `json:"url,omitempty"`
  4155  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
  4156  	// include in API requests. By default, fields with empty or default values are
  4157  	// omitted from API requests. See
  4158  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4159  	// details.
  4160  	ForceSendFields []string `json:"-"`
  4161  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  4162  	// with the JSON null value. By default, fields with empty values are omitted
  4163  	// from API requests. See
  4164  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4165  	NullFields []string `json:"-"`
  4166  }
  4167  
  4168  func (s *OpenLink) MarshalJSON() ([]byte, error) {
  4169  	type NoMethod OpenLink
  4170  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4171  }
  4172  
  4173  // QuotedMessageMetadata: Information about a quoted message.
  4174  type QuotedMessageMetadata struct {
  4175  	// LastUpdateTime: Output only. The timestamp when the quoted message was
  4176  	// created or when the quoted message was last updated.
  4177  	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
  4178  	// Name: Output only. Resource name of the quoted message. Format:
  4179  	// `spaces/{space}/messages/{message}`
  4180  	Name string `json:"name,omitempty"`
  4181  	// ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
  4182  	// unconditionally include in API requests. By default, fields with empty or
  4183  	// default values are omitted from API requests. See
  4184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4185  	// details.
  4186  	ForceSendFields []string `json:"-"`
  4187  	// NullFields is a list of field names (e.g. "LastUpdateTime") to include in
  4188  	// API requests with the JSON null value. By default, fields with empty values
  4189  	// are omitted from API requests. See
  4190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4191  	NullFields []string `json:"-"`
  4192  }
  4193  
  4194  func (s *QuotedMessageMetadata) MarshalJSON() ([]byte, error) {
  4195  	type NoMethod QuotedMessageMetadata
  4196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4197  }
  4198  
  4199  // Reaction: A reaction to a message.
  4200  type Reaction struct {
  4201  	// Emoji: The emoji used in the reaction.
  4202  	Emoji *Emoji `json:"emoji,omitempty"`
  4203  	// Name: The resource name of the reaction. Format:
  4204  	// `spaces/{space}/messages/{message}/reactions/{reaction}`
  4205  	Name string `json:"name,omitempty"`
  4206  	// User: Output only. The user who created the reaction.
  4207  	User *User `json:"user,omitempty"`
  4208  
  4209  	// ServerResponse contains the HTTP response code and headers from the server.
  4210  	googleapi.ServerResponse `json:"-"`
  4211  	// ForceSendFields is a list of field names (e.g. "Emoji") to unconditionally
  4212  	// include in API requests. By default, fields with empty or default values are
  4213  	// omitted from API requests. See
  4214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4215  	// details.
  4216  	ForceSendFields []string `json:"-"`
  4217  	// NullFields is a list of field names (e.g. "Emoji") to include in API
  4218  	// requests with the JSON null value. By default, fields with empty values are
  4219  	// omitted from API requests. See
  4220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4221  	NullFields []string `json:"-"`
  4222  }
  4223  
  4224  func (s *Reaction) MarshalJSON() ([]byte, error) {
  4225  	type NoMethod Reaction
  4226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4227  }
  4228  
  4229  // ReactionBatchCreatedEventData: Event payload for multiple new reactions.
  4230  // Event type: `google.workspace.chat.reaction.v1.batchCreated`
  4231  type ReactionBatchCreatedEventData struct {
  4232  	// Reactions: A list of new reactions.
  4233  	Reactions []*ReactionCreatedEventData `json:"reactions,omitempty"`
  4234  	// ForceSendFields is a list of field names (e.g. "Reactions") to
  4235  	// unconditionally include in API requests. By default, fields with empty or
  4236  	// default values are omitted from API requests. See
  4237  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4238  	// details.
  4239  	ForceSendFields []string `json:"-"`
  4240  	// NullFields is a list of field names (e.g. "Reactions") to include in API
  4241  	// requests with the JSON null value. By default, fields with empty values are
  4242  	// omitted from API requests. See
  4243  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4244  	NullFields []string `json:"-"`
  4245  }
  4246  
  4247  func (s *ReactionBatchCreatedEventData) MarshalJSON() ([]byte, error) {
  4248  	type NoMethod ReactionBatchCreatedEventData
  4249  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4250  }
  4251  
  4252  // ReactionBatchDeletedEventData: Event payload for multiple deleted reactions.
  4253  // Event type: `google.workspace.chat.reaction.v1.batchDeleted`
  4254  type ReactionBatchDeletedEventData struct {
  4255  	// Reactions: A list of deleted reactions.
  4256  	Reactions []*ReactionDeletedEventData `json:"reactions,omitempty"`
  4257  	// ForceSendFields is a list of field names (e.g. "Reactions") to
  4258  	// unconditionally include in API requests. By default, fields with empty or
  4259  	// default values are omitted from API requests. See
  4260  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4261  	// details.
  4262  	ForceSendFields []string `json:"-"`
  4263  	// NullFields is a list of field names (e.g. "Reactions") to include in API
  4264  	// requests with the JSON null value. By default, fields with empty values are
  4265  	// omitted from API requests. See
  4266  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4267  	NullFields []string `json:"-"`
  4268  }
  4269  
  4270  func (s *ReactionBatchDeletedEventData) MarshalJSON() ([]byte, error) {
  4271  	type NoMethod ReactionBatchDeletedEventData
  4272  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4273  }
  4274  
  4275  // ReactionCreatedEventData: Event payload for a new reaction. Event type:
  4276  // `google.workspace.chat.reaction.v1.created`
  4277  type ReactionCreatedEventData struct {
  4278  	// Reaction: The new reaction.
  4279  	Reaction *Reaction `json:"reaction,omitempty"`
  4280  	// ForceSendFields is a list of field names (e.g. "Reaction") to
  4281  	// unconditionally include in API requests. By default, fields with empty or
  4282  	// default values are omitted from API requests. See
  4283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4284  	// details.
  4285  	ForceSendFields []string `json:"-"`
  4286  	// NullFields is a list of field names (e.g. "Reaction") to include in API
  4287  	// requests with the JSON null value. By default, fields with empty values are
  4288  	// omitted from API requests. See
  4289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4290  	NullFields []string `json:"-"`
  4291  }
  4292  
  4293  func (s *ReactionCreatedEventData) MarshalJSON() ([]byte, error) {
  4294  	type NoMethod ReactionCreatedEventData
  4295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4296  }
  4297  
  4298  // ReactionDeletedEventData: Event payload for a deleted reaction. Type:
  4299  // `google.workspace.chat.reaction.v1.deleted`
  4300  type ReactionDeletedEventData struct {
  4301  	// Reaction: The deleted reaction.
  4302  	Reaction *Reaction `json:"reaction,omitempty"`
  4303  	// ForceSendFields is a list of field names (e.g. "Reaction") to
  4304  	// unconditionally include in API requests. By default, fields with empty or
  4305  	// default values are omitted from API requests. See
  4306  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4307  	// details.
  4308  	ForceSendFields []string `json:"-"`
  4309  	// NullFields is a list of field names (e.g. "Reaction") to include in API
  4310  	// requests with the JSON null value. By default, fields with empty values are
  4311  	// omitted from API requests. See
  4312  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4313  	NullFields []string `json:"-"`
  4314  }
  4315  
  4316  func (s *ReactionDeletedEventData) MarshalJSON() ([]byte, error) {
  4317  	type NoMethod ReactionDeletedEventData
  4318  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4319  }
  4320  
  4321  // RichLinkMetadata: A rich link to a resource.
  4322  type RichLinkMetadata struct {
  4323  	// DriveLinkData: Data for a drive link.
  4324  	DriveLinkData *DriveLinkData `json:"driveLinkData,omitempty"`
  4325  	// RichLinkType: The rich link type.
  4326  	//
  4327  	// Possible values:
  4328  	//   "RICH_LINK_TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
  4329  	//   "DRIVE_FILE" - A Google Drive rich link type.
  4330  	RichLinkType string `json:"richLinkType,omitempty"`
  4331  	// Uri: The URI of this link.
  4332  	Uri string `json:"uri,omitempty"`
  4333  	// ForceSendFields is a list of field names (e.g. "DriveLinkData") to
  4334  	// unconditionally include in API requests. By default, fields with empty or
  4335  	// default values are omitted from API requests. See
  4336  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4337  	// details.
  4338  	ForceSendFields []string `json:"-"`
  4339  	// NullFields is a list of field names (e.g. "DriveLinkData") to include in API
  4340  	// requests with the JSON null value. By default, fields with empty values are
  4341  	// omitted from API requests. See
  4342  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4343  	NullFields []string `json:"-"`
  4344  }
  4345  
  4346  func (s *RichLinkMetadata) MarshalJSON() ([]byte, error) {
  4347  	type NoMethod RichLinkMetadata
  4348  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4349  }
  4350  
  4351  // Section: A section contains a collection of widgets that are rendered
  4352  // (vertically) in the order that they are specified. Across all platforms,
  4353  // cards have a narrow fixed width, so there's currently no need for layout
  4354  // properties (for example, float).
  4355  type Section struct {
  4356  	// Header: The header of the section. Formatted text is supported. For more
  4357  	// information about formatting text, see Formatting text in Google Chat apps
  4358  	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  4359  	// and Formatting text in Google Workspace Add-ons
  4360  	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  4361  	Header string `json:"header,omitempty"`
  4362  	// Widgets: A section must contain at least one widget.
  4363  	Widgets []*WidgetMarkup `json:"widgets,omitempty"`
  4364  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  4365  	// include in API requests. By default, fields with empty or default values are
  4366  	// omitted from API requests. See
  4367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4368  	// details.
  4369  	ForceSendFields []string `json:"-"`
  4370  	// NullFields is a list of field names (e.g. "Header") to include in API
  4371  	// requests with the JSON null value. By default, fields with empty values are
  4372  	// omitted from API requests. See
  4373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4374  	NullFields []string `json:"-"`
  4375  }
  4376  
  4377  func (s *Section) MarshalJSON() ([]byte, error) {
  4378  	type NoMethod Section
  4379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4380  }
  4381  
  4382  // SelectionItems: List of widget autocomplete results.
  4383  type SelectionItems struct {
  4384  	// Items: An array of the SelectionItem objects.
  4385  	Items []*GoogleAppsCardV1SelectionItem `json:"items,omitempty"`
  4386  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  4387  	// include in API requests. By default, fields with empty or default values are
  4388  	// omitted from API requests. See
  4389  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4390  	// details.
  4391  	ForceSendFields []string `json:"-"`
  4392  	// NullFields is a list of field names (e.g. "Items") to include in API
  4393  	// requests with the JSON null value. By default, fields with empty values are
  4394  	// omitted from API requests. See
  4395  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4396  	NullFields []string `json:"-"`
  4397  }
  4398  
  4399  func (s *SelectionItems) MarshalJSON() ([]byte, error) {
  4400  	type NoMethod SelectionItems
  4401  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4402  }
  4403  
  4404  // SetUpSpaceRequest: Request to create a space and add specified users to it.
  4405  type SetUpSpaceRequest struct {
  4406  	// Memberships: Optional. The Google Chat users to invite to join the space.
  4407  	// Omit the calling user, as they are added automatically. The set currently
  4408  	// allows up to 20 memberships (in addition to the caller). The
  4409  	// `Membership.member` field must contain a `user` with `name` populated
  4410  	// (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only
  4411  	// add human users when setting up a space (adding Chat apps is only supported
  4412  	// for direct message setup with the calling app). You can also add members
  4413  	// using the user's email as an alias for {user}. For example, the `user.name`
  4414  	// can be `users/example@gmail.com`." To invite Gmail users or users from
  4415  	// external Google Workspace domains, user's email must be used for `{user}`.
  4416  	// Optional when setting `Space.spaceType` to `SPACE`. Required when setting
  4417  	// `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships.
  4418  	// Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human
  4419  	// user, along with exactly one membership. Must be empty when creating a 1:1
  4420  	// conversation between a human and the calling Chat app (when setting
  4421  	// `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to
  4422  	// `true`).
  4423  	Memberships []*Membership `json:"memberships,omitempty"`
  4424  	// RequestId: Optional. A unique identifier for this request. A random UUID is
  4425  	// recommended. Specifying an existing request ID returns the space created
  4426  	// with that ID instead of creating a new space. Specifying an existing request
  4427  	// ID from the same Chat app with a different authenticated user returns an
  4428  	// error.
  4429  	RequestId string `json:"requestId,omitempty"`
  4430  	// Space: Required. The `Space.spaceType` field is required. To create a space,
  4431  	// set `Space.spaceType` to `SPACE` and set `Space.displayName`. If you receive
  4432  	// the error message `ALREADY_EXISTS` when setting up a space, try a different
  4433  	// `displayName`. An existing space within the Google Workspace organization
  4434  	// might already use this display name. To create a group chat, set
  4435  	// `Space.spaceType` to `GROUP_CHAT`. Don't set `Space.displayName`. To create
  4436  	// a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE`
  4437  	// and set `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or
  4438  	// `Space.spaceDetails`. To create an 1:1 conversation between a human and the
  4439  	// calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and
  4440  	// `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or
  4441  	// `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space
  4442  	// is returned instead of creating a new space.
  4443  	Space *Space `json:"space,omitempty"`
  4444  	// ForceSendFields is a list of field names (e.g. "Memberships") to
  4445  	// unconditionally include in API requests. By default, fields with empty or
  4446  	// default values are omitted from API requests. See
  4447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4448  	// details.
  4449  	ForceSendFields []string `json:"-"`
  4450  	// NullFields is a list of field names (e.g. "Memberships") to include in API
  4451  	// requests with the JSON null value. By default, fields with empty values are
  4452  	// omitted from API requests. See
  4453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4454  	NullFields []string `json:"-"`
  4455  }
  4456  
  4457  func (s *SetUpSpaceRequest) MarshalJSON() ([]byte, error) {
  4458  	type NoMethod SetUpSpaceRequest
  4459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4460  }
  4461  
  4462  // SlashCommand: A slash command
  4463  // (https://developers.google.com/workspace/chat/slash-commands) in Google
  4464  // Chat.
  4465  type SlashCommand struct {
  4466  	// CommandId: The ID of the slash command invoked.
  4467  	CommandId int64 `json:"commandId,omitempty,string"`
  4468  	// ForceSendFields is a list of field names (e.g. "CommandId") to
  4469  	// unconditionally include in API requests. By default, fields with empty or
  4470  	// default values are omitted from API requests. See
  4471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4472  	// details.
  4473  	ForceSendFields []string `json:"-"`
  4474  	// NullFields is a list of field names (e.g. "CommandId") to include in API
  4475  	// requests with the JSON null value. By default, fields with empty values are
  4476  	// omitted from API requests. See
  4477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4478  	NullFields []string `json:"-"`
  4479  }
  4480  
  4481  func (s *SlashCommand) MarshalJSON() ([]byte, error) {
  4482  	type NoMethod SlashCommand
  4483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4484  }
  4485  
  4486  // SlashCommandMetadata: Annotation metadata for slash commands (/).
  4487  type SlashCommandMetadata struct {
  4488  	// Bot: The Chat app whose command was invoked.
  4489  	Bot *User `json:"bot,omitempty"`
  4490  	// CommandId: The command ID of the invoked slash command.
  4491  	CommandId int64 `json:"commandId,omitempty,string"`
  4492  	// CommandName: The name of the invoked slash command.
  4493  	CommandName string `json:"commandName,omitempty"`
  4494  	// TriggersDialog: Indicates whether the slash command is for a dialog.
  4495  	TriggersDialog bool `json:"triggersDialog,omitempty"`
  4496  	// Type: The type of slash command.
  4497  	//
  4498  	// Possible values:
  4499  	//   "TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
  4500  	//   "ADD" - Add Chat app to space.
  4501  	//   "INVOKE" - Invoke slash command in space.
  4502  	Type string `json:"type,omitempty"`
  4503  	// ForceSendFields is a list of field names (e.g. "Bot") to unconditionally
  4504  	// include in API requests. By default, fields with empty or default values are
  4505  	// omitted from API requests. See
  4506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4507  	// details.
  4508  	ForceSendFields []string `json:"-"`
  4509  	// NullFields is a list of field names (e.g. "Bot") to include in API requests
  4510  	// with the JSON null value. By default, fields with empty values are omitted
  4511  	// from API requests. See
  4512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4513  	NullFields []string `json:"-"`
  4514  }
  4515  
  4516  func (s *SlashCommandMetadata) MarshalJSON() ([]byte, error) {
  4517  	type NoMethod SlashCommandMetadata
  4518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4519  }
  4520  
  4521  // Space: A space in Google Chat. Spaces are conversations between two or more
  4522  // users or 1:1 messages between a user and a Chat app.
  4523  type Space struct {
  4524  	// AdminInstalled: Output only. For direct message (DM) spaces with a Chat app,
  4525  	// whether the space was created by a Google Workspace administrator.
  4526  	// Administrators can install and set up a direct message with a Chat app on
  4527  	// behalf of users in their organization. To support admin install, your Chat
  4528  	// app must feature direct messaging.
  4529  	AdminInstalled bool `json:"adminInstalled,omitempty"`
  4530  	// CreateTime: Optional. Immutable. For spaces created in Chat, the time the
  4531  	// space was created. This field is output only, except when used in import
  4532  	// mode spaces. For import mode spaces, set this field to the historical
  4533  	// timestamp at which the space was created in the source in order to preserve
  4534  	// the original creation time. Only populated in the output when `spaceType` is
  4535  	// `GROUP_CHAT` or `SPACE`.
  4536  	CreateTime string `json:"createTime,omitempty"`
  4537  	// DisplayName: The space's display name. Required when creating a space
  4538  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create).
  4539  	// If you receive the error message `ALREADY_EXISTS` when creating a space or
  4540  	// updating the `displayName`, try a different `displayName`. An existing space
  4541  	// within the Google Workspace organization might already use this display
  4542  	// name. For direct messages, this field might be empty. Supports up to 128
  4543  	// characters.
  4544  	DisplayName string `json:"displayName,omitempty"`
  4545  	// ExternalUserAllowed: Immutable. Whether this space permits any Google Chat
  4546  	// user as a member. Input when creating a space in a Google Workspace
  4547  	// organization. Omit this field when creating spaces in the following
  4548  	// conditions: * The authenticated user uses a consumer account (unmanaged user
  4549  	// account). By default, a space created by a consumer account permits any
  4550  	// Google Chat user. * The space is used to [import data to Google Chat]
  4551  	// (https://developers.google.com/chat/api/guides/import-data-overview) because
  4552  	// import mode spaces must only permit members from the same Google Workspace
  4553  	// organization. However, as part of the Google Workspace Developer Preview
  4554  	// Program (https://developers.google.com/workspace/preview), import mode
  4555  	// spaces can permit any Google Chat user so this field can then be set for
  4556  	// import mode spaces. For existing spaces, this field is output only.
  4557  	ExternalUserAllowed bool `json:"externalUserAllowed,omitempty"`
  4558  	// ImportMode: Optional. Whether this space is created in `Import Mode` as part
  4559  	// of a data migration into Google Workspace. While spaces are being imported,
  4560  	// they aren't visible to users until the import is complete.
  4561  	ImportMode bool `json:"importMode,omitempty"`
  4562  	// Name: Resource name of the space. Format: `spaces/{space}`
  4563  	Name string `json:"name,omitempty"`
  4564  	// SingleUserBotDm: Optional. Whether the space is a DM between a Chat app and
  4565  	// a single human.
  4566  	SingleUserBotDm bool `json:"singleUserBotDm,omitempty"`
  4567  	// SpaceDetails: Details about the space including description and rules.
  4568  	SpaceDetails *SpaceDetails `json:"spaceDetails,omitempty"`
  4569  	// SpaceHistoryState: The message history state for messages and threads in
  4570  	// this space.
  4571  	//
  4572  	// Possible values:
  4573  	//   "HISTORY_STATE_UNSPECIFIED" - Default value. Do not use.
  4574  	//   "HISTORY_OFF" - History off. [Messages and threads are kept for 24
  4575  	// hours](https://support.google.com/chat/answer/7664687).
  4576  	//   "HISTORY_ON" - History on. The organization's [Vault retention
  4577  	// rules](https://support.google.com/vault/answer/7657597) specify for how long
  4578  	// messages and threads are kept.
  4579  	SpaceHistoryState string `json:"spaceHistoryState,omitempty"`
  4580  	// SpaceThreadingState: Output only. The threading state in the Chat space.
  4581  	//
  4582  	// Possible values:
  4583  	//   "SPACE_THREADING_STATE_UNSPECIFIED" - Reserved.
  4584  	//   "THREADED_MESSAGES" - Named spaces that support message threads. When
  4585  	// users respond to a message, they can reply in-thread, which keeps their
  4586  	// response in the context of the original message.
  4587  	//   "GROUPED_MESSAGES" - Named spaces where the conversation is organized by
  4588  	// topic. Topics and their replies are grouped together.
  4589  	//   "UNTHREADED_MESSAGES" - Direct messages (DMs) between two people and group
  4590  	// conversations between 3 or more people.
  4591  	SpaceThreadingState string `json:"spaceThreadingState,omitempty"`
  4592  	// SpaceType: The type of space. Required when creating a space or updating the
  4593  	// space type of a space. Output only for other usage.
  4594  	//
  4595  	// Possible values:
  4596  	//   "SPACE_TYPE_UNSPECIFIED" - Reserved.
  4597  	//   "SPACE" - A place where people send messages, share files, and
  4598  	// collaborate. A `SPACE` can include Chat apps.
  4599  	//   "GROUP_CHAT" - Group conversations between 3 or more people. A
  4600  	// `GROUP_CHAT` can include Chat apps.
  4601  	//   "DIRECT_MESSAGE" - 1:1 messages between two humans or a human and a Chat
  4602  	// app.
  4603  	SpaceType string `json:"spaceType,omitempty"`
  4604  	// Threaded: Output only. Deprecated: Use `spaceThreadingState` instead.
  4605  	// Whether messages are threaded in this space.
  4606  	Threaded bool `json:"threaded,omitempty"`
  4607  	// Type: Output only. Deprecated: Use `space_type` instead. The type of a
  4608  	// space.
  4609  	//
  4610  	// Possible values:
  4611  	//   "TYPE_UNSPECIFIED" - Reserved.
  4612  	//   "ROOM" - Conversations between two or more humans.
  4613  	//   "DM" - 1:1 Direct Message between a human and a Chat app, where all
  4614  	// messages are flat. Note that this doesn't include direct messages between
  4615  	// two humans.
  4616  	Type string `json:"type,omitempty"`
  4617  
  4618  	// ServerResponse contains the HTTP response code and headers from the server.
  4619  	googleapi.ServerResponse `json:"-"`
  4620  	// ForceSendFields is a list of field names (e.g. "AdminInstalled") to
  4621  	// unconditionally include in API requests. By default, fields with empty or
  4622  	// default values are omitted from API requests. See
  4623  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4624  	// details.
  4625  	ForceSendFields []string `json:"-"`
  4626  	// NullFields is a list of field names (e.g. "AdminInstalled") to include in
  4627  	// API requests with the JSON null value. By default, fields with empty values
  4628  	// are omitted from API requests. See
  4629  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4630  	NullFields []string `json:"-"`
  4631  }
  4632  
  4633  func (s *Space) MarshalJSON() ([]byte, error) {
  4634  	type NoMethod Space
  4635  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4636  }
  4637  
  4638  // SpaceBatchUpdatedEventData: Event payload for multiple updates to a space.
  4639  // Event type: `google.workspace.chat.space.v1.batchUpdated`
  4640  type SpaceBatchUpdatedEventData struct {
  4641  	// Spaces: A list of updated spaces.
  4642  	Spaces []*SpaceUpdatedEventData `json:"spaces,omitempty"`
  4643  	// ForceSendFields is a list of field names (e.g. "Spaces") to unconditionally
  4644  	// include in API requests. By default, fields with empty or default values are
  4645  	// omitted from API requests. See
  4646  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4647  	// details.
  4648  	ForceSendFields []string `json:"-"`
  4649  	// NullFields is a list of field names (e.g. "Spaces") to include in API
  4650  	// requests with the JSON null value. By default, fields with empty values are
  4651  	// omitted from API requests. See
  4652  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4653  	NullFields []string `json:"-"`
  4654  }
  4655  
  4656  func (s *SpaceBatchUpdatedEventData) MarshalJSON() ([]byte, error) {
  4657  	type NoMethod SpaceBatchUpdatedEventData
  4658  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4659  }
  4660  
  4661  // SpaceDataSource: A data source that populates Google Chat spaces as
  4662  // selection items for a multiselect menu. Only populates spaces that the user
  4663  // is a member of. Google Chat apps
  4664  // (https://developers.google.com/workspace/chat):
  4665  type SpaceDataSource struct {
  4666  	// DefaultToCurrentSpace: If set to `true`, the multiselect menu selects the
  4667  	// current Google Chat space as an item by default.
  4668  	DefaultToCurrentSpace bool `json:"defaultToCurrentSpace,omitempty"`
  4669  	// ForceSendFields is a list of field names (e.g. "DefaultToCurrentSpace") to
  4670  	// unconditionally include in API requests. By default, fields with empty or
  4671  	// default values are omitted from API requests. See
  4672  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4673  	// details.
  4674  	ForceSendFields []string `json:"-"`
  4675  	// NullFields is a list of field names (e.g. "DefaultToCurrentSpace") to
  4676  	// include in API requests with the JSON null value. By default, fields with
  4677  	// empty values are omitted from API requests. See
  4678  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4679  	NullFields []string `json:"-"`
  4680  }
  4681  
  4682  func (s *SpaceDataSource) MarshalJSON() ([]byte, error) {
  4683  	type NoMethod SpaceDataSource
  4684  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4685  }
  4686  
  4687  // SpaceDetails: Details about the space including description and rules.
  4688  type SpaceDetails struct {
  4689  	// Description: Optional. A description of the space. For example, describe the
  4690  	// space's discussion topic, functional purpose, or participants. Supports up
  4691  	// to 150 characters.
  4692  	Description string `json:"description,omitempty"`
  4693  	// Guidelines: Optional. The space's rules, expectations, and etiquette.
  4694  	// Supports up to 5,000 characters.
  4695  	Guidelines string `json:"guidelines,omitempty"`
  4696  	// ForceSendFields is a list of field names (e.g. "Description") to
  4697  	// unconditionally include in API requests. By default, fields with empty or
  4698  	// default values are omitted from API requests. See
  4699  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4700  	// details.
  4701  	ForceSendFields []string `json:"-"`
  4702  	// NullFields is a list of field names (e.g. "Description") to include in API
  4703  	// requests with the JSON null value. By default, fields with empty values are
  4704  	// omitted from API requests. See
  4705  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4706  	NullFields []string `json:"-"`
  4707  }
  4708  
  4709  func (s *SpaceDetails) MarshalJSON() ([]byte, error) {
  4710  	type NoMethod SpaceDetails
  4711  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4712  }
  4713  
  4714  // SpaceEvent: An event that represents a change or activity in a Google Chat
  4715  // space. To learn more, see Work with events from Google Chat
  4716  // (https://developers.google.com/workspace/chat/events-overview).
  4717  type SpaceEvent struct {
  4718  	// EventTime: Time when the event occurred.
  4719  	EventTime string `json:"eventTime,omitempty"`
  4720  	// EventType: Type of space event. Each event type has a batch version, which
  4721  	// represents multiple instances of the event type that occur in a short period
  4722  	// of time. For `spaceEvents.list()` requests, omit batch event types in your
  4723  	// query filter. By default, the server returns both event type and its batch
  4724  	// version. Supported event types for messages
  4725  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages):
  4726  	// * New message: `google.workspace.chat.message.v1.created` * Updated message:
  4727  	// `google.workspace.chat.message.v1.updated` * Deleted message:
  4728  	// `google.workspace.chat.message.v1.deleted` * Multiple new messages:
  4729  	// `google.workspace.chat.message.v1.batchCreated` * Multiple updated messages:
  4730  	// `google.workspace.chat.message.v1.batchUpdated` * Multiple deleted messages:
  4731  	// `google.workspace.chat.message.v1.batchDeleted` Supported event types for
  4732  	// memberships
  4733  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members):
  4734  	// * New membership: `google.workspace.chat.membership.v1.created` * Updated
  4735  	// membership: `google.workspace.chat.membership.v1.updated` * Deleted
  4736  	// membership: `google.workspace.chat.membership.v1.deleted` * Multiple new
  4737  	// memberships: `google.workspace.chat.membership.v1.batchCreated` * Multiple
  4738  	// updated memberships: `google.workspace.chat.membership.v1.batchUpdated` *
  4739  	// Multiple deleted memberships:
  4740  	// `google.workspace.chat.membership.v1.batchDeleted` Supported event types for
  4741  	// reactions
  4742  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions):
  4743  	// * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted
  4744  	// reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new
  4745  	// reactions: `google.workspace.chat.reaction.v1.batchCreated` * Multiple
  4746  	// deleted reactions: `google.workspace.chat.reaction.v1.batchDeleted`
  4747  	// Supported event types about the space
  4748  	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces):
  4749  	// * Updated space: `google.workspace.chat.space.v1.updated` * Multiple space
  4750  	// updates: `google.workspace.chat.space.v1.batchUpdated`
  4751  	EventType string `json:"eventType,omitempty"`
  4752  	// MembershipBatchCreatedEventData: Event payload for multiple new memberships.
  4753  	// Event type: `google.workspace.chat.membership.v1.batchCreated`
  4754  	MembershipBatchCreatedEventData *MembershipBatchCreatedEventData `json:"membershipBatchCreatedEventData,omitempty"`
  4755  	// MembershipBatchDeletedEventData: Event payload for multiple deleted
  4756  	// memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`
  4757  	MembershipBatchDeletedEventData *MembershipBatchDeletedEventData `json:"membershipBatchDeletedEventData,omitempty"`
  4758  	// MembershipBatchUpdatedEventData: Event payload for multiple updated
  4759  	// memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`
  4760  	MembershipBatchUpdatedEventData *MembershipBatchUpdatedEventData `json:"membershipBatchUpdatedEventData,omitempty"`
  4761  	// MembershipCreatedEventData: Event payload for a new membership. Event type:
  4762  	// `google.workspace.chat.membership.v1.created`
  4763  	MembershipCreatedEventData *MembershipCreatedEventData `json:"membershipCreatedEventData,omitempty"`
  4764  	// MembershipDeletedEventData: Event payload for a deleted membership. Event
  4765  	// type: `google.workspace.chat.membership.v1.deleted`
  4766  	MembershipDeletedEventData *MembershipDeletedEventData `json:"membershipDeletedEventData,omitempty"`
  4767  	// MembershipUpdatedEventData: Event payload for an updated membership. Event
  4768  	// type: `google.workspace.chat.membership.v1.updated`
  4769  	MembershipUpdatedEventData *MembershipUpdatedEventData `json:"membershipUpdatedEventData,omitempty"`
  4770  	// MessageBatchCreatedEventData: Event payload for multiple new messages. Event
  4771  	// type: `google.workspace.chat.message.v1.batchCreated`
  4772  	MessageBatchCreatedEventData *MessageBatchCreatedEventData `json:"messageBatchCreatedEventData,omitempty"`
  4773  	// MessageBatchDeletedEventData: Event payload for multiple deleted messages.
  4774  	// Event type: `google.workspace.chat.message.v1.batchDeleted`
  4775  	MessageBatchDeletedEventData *MessageBatchDeletedEventData `json:"messageBatchDeletedEventData,omitempty"`
  4776  	// MessageBatchUpdatedEventData: Event payload for multiple updated messages.
  4777  	// Event type: `google.workspace.chat.message.v1.batchUpdated`
  4778  	MessageBatchUpdatedEventData *MessageBatchUpdatedEventData `json:"messageBatchUpdatedEventData,omitempty"`
  4779  	// MessageCreatedEventData: Event payload for a new message. Event type:
  4780  	// `google.workspace.chat.message.v1.created`
  4781  	MessageCreatedEventData *MessageCreatedEventData `json:"messageCreatedEventData,omitempty"`
  4782  	// MessageDeletedEventData: Event payload for a deleted message. Event type:
  4783  	// `google.workspace.chat.message.v1.deleted`
  4784  	MessageDeletedEventData *MessageDeletedEventData `json:"messageDeletedEventData,omitempty"`
  4785  	// MessageUpdatedEventData: Event payload for an updated message. Event type:
  4786  	// `google.workspace.chat.message.v1.updated`
  4787  	MessageUpdatedEventData *MessageUpdatedEventData `json:"messageUpdatedEventData,omitempty"`
  4788  	// Name: Resource name of the space event. Format:
  4789  	// `spaces/{space}/spaceEvents/{spaceEvent}`
  4790  	Name string `json:"name,omitempty"`
  4791  	// ReactionBatchCreatedEventData: Event payload for multiple new reactions.
  4792  	// Event type: `google.workspace.chat.reaction.v1.batchCreated`
  4793  	ReactionBatchCreatedEventData *ReactionBatchCreatedEventData `json:"reactionBatchCreatedEventData,omitempty"`
  4794  	// ReactionBatchDeletedEventData: Event payload for multiple deleted reactions.
  4795  	// Event type: `google.workspace.chat.reaction.v1.batchDeleted`
  4796  	ReactionBatchDeletedEventData *ReactionBatchDeletedEventData `json:"reactionBatchDeletedEventData,omitempty"`
  4797  	// ReactionCreatedEventData: Event payload for a new reaction. Event type:
  4798  	// `google.workspace.chat.reaction.v1.created`
  4799  	ReactionCreatedEventData *ReactionCreatedEventData `json:"reactionCreatedEventData,omitempty"`
  4800  	// ReactionDeletedEventData: Event payload for a deleted reaction. Event type:
  4801  	// `google.workspace.chat.reaction.v1.deleted`
  4802  	ReactionDeletedEventData *ReactionDeletedEventData `json:"reactionDeletedEventData,omitempty"`
  4803  	// SpaceBatchUpdatedEventData: Event payload for multiple updates to a space.
  4804  	// Event type: `google.workspace.chat.space.v1.batchUpdated`
  4805  	SpaceBatchUpdatedEventData *SpaceBatchUpdatedEventData `json:"spaceBatchUpdatedEventData,omitempty"`
  4806  	// SpaceUpdatedEventData: Event payload for a space update. Event type:
  4807  	// `google.workspace.chat.space.v1.updated`
  4808  	SpaceUpdatedEventData *SpaceUpdatedEventData `json:"spaceUpdatedEventData,omitempty"`
  4809  
  4810  	// ServerResponse contains the HTTP response code and headers from the server.
  4811  	googleapi.ServerResponse `json:"-"`
  4812  	// ForceSendFields is a list of field names (e.g. "EventTime") to
  4813  	// unconditionally include in API requests. By default, fields with empty or
  4814  	// default values are omitted from API requests. See
  4815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4816  	// details.
  4817  	ForceSendFields []string `json:"-"`
  4818  	// NullFields is a list of field names (e.g. "EventTime") to include in API
  4819  	// requests with the JSON null value. By default, fields with empty values are
  4820  	// omitted from API requests. See
  4821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4822  	NullFields []string `json:"-"`
  4823  }
  4824  
  4825  func (s *SpaceEvent) MarshalJSON() ([]byte, error) {
  4826  	type NoMethod SpaceEvent
  4827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4828  }
  4829  
  4830  // SpaceReadState: A user's read state within a space, used to identify read
  4831  // and unread messages.
  4832  type SpaceReadState struct {
  4833  	// LastReadTime: Optional. The time when the user's space read state was
  4834  	// updated. Usually this corresponds with either the timestamp of the last read
  4835  	// message, or a timestamp specified by the user to mark the last read position
  4836  	// in a space.
  4837  	LastReadTime string `json:"lastReadTime,omitempty"`
  4838  	// Name: Resource name of the space read state. Format:
  4839  	// `users/{user}/spaces/{space}/spaceReadState`
  4840  	Name string `json:"name,omitempty"`
  4841  
  4842  	// ServerResponse contains the HTTP response code and headers from the server.
  4843  	googleapi.ServerResponse `json:"-"`
  4844  	// ForceSendFields is a list of field names (e.g. "LastReadTime") to
  4845  	// unconditionally include in API requests. By default, fields with empty or
  4846  	// default values are omitted from API requests. See
  4847  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4848  	// details.
  4849  	ForceSendFields []string `json:"-"`
  4850  	// NullFields is a list of field names (e.g. "LastReadTime") to include in API
  4851  	// requests with the JSON null value. By default, fields with empty values are
  4852  	// omitted from API requests. See
  4853  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4854  	NullFields []string `json:"-"`
  4855  }
  4856  
  4857  func (s *SpaceReadState) MarshalJSON() ([]byte, error) {
  4858  	type NoMethod SpaceReadState
  4859  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4860  }
  4861  
  4862  // SpaceUpdatedEventData: Event payload for an updated space. Event type:
  4863  // `google.workspace.chat.space.v1.updated`
  4864  type SpaceUpdatedEventData struct {
  4865  	// Space: The updated space.
  4866  	Space *Space `json:"space,omitempty"`
  4867  	// ForceSendFields is a list of field names (e.g. "Space") to unconditionally
  4868  	// include in API requests. By default, fields with empty or default values are
  4869  	// omitted from API requests. See
  4870  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4871  	// details.
  4872  	ForceSendFields []string `json:"-"`
  4873  	// NullFields is a list of field names (e.g. "Space") to include in API
  4874  	// requests with the JSON null value. By default, fields with empty values are
  4875  	// omitted from API requests. See
  4876  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4877  	NullFields []string `json:"-"`
  4878  }
  4879  
  4880  func (s *SpaceUpdatedEventData) MarshalJSON() ([]byte, error) {
  4881  	type NoMethod SpaceUpdatedEventData
  4882  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4883  }
  4884  
  4885  // Status: The `Status` type defines a logical error model that is suitable for
  4886  // different programming environments, including REST APIs and RPC APIs. It is
  4887  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  4888  // pieces of data: error code, error message, and error details. You can find
  4889  // out more about this error model and how to work with it in the API Design
  4890  // Guide (https://cloud.google.com/apis/design/errors).
  4891  type Status struct {
  4892  	// Code: The status code, which should be an enum value of google.rpc.Code.
  4893  	Code int64 `json:"code,omitempty"`
  4894  	// Details: A list of messages that carry the error details. There is a common
  4895  	// set of message types for APIs to use.
  4896  	Details []googleapi.RawMessage `json:"details,omitempty"`
  4897  	// Message: A developer-facing error message, which should be in English. Any
  4898  	// user-facing error message should be localized and sent in the
  4899  	// google.rpc.Status.details field, or localized by the client.
  4900  	Message string `json:"message,omitempty"`
  4901  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  4902  	// include in API requests. By default, fields with empty or default values are
  4903  	// omitted from API requests. See
  4904  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4905  	// details.
  4906  	ForceSendFields []string `json:"-"`
  4907  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  4908  	// with the JSON null value. By default, fields with empty values are omitted
  4909  	// from API requests. See
  4910  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4911  	NullFields []string `json:"-"`
  4912  }
  4913  
  4914  func (s *Status) MarshalJSON() ([]byte, error) {
  4915  	type NoMethod Status
  4916  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4917  }
  4918  
  4919  // StringInputs: Input parameter for regular widgets. For single-valued
  4920  // widgets, it is a single value list. For multi-valued widgets, such as
  4921  // checkbox, all the values are presented.
  4922  type StringInputs struct {
  4923  	// Value: An list of strings entered by the user.
  4924  	Value []string `json:"value,omitempty"`
  4925  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  4926  	// include in API requests. By default, fields with empty or default values are
  4927  	// omitted from API requests. See
  4928  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4929  	// details.
  4930  	ForceSendFields []string `json:"-"`
  4931  	// NullFields is a list of field names (e.g. "Value") to include in API
  4932  	// requests with the JSON null value. By default, fields with empty values are
  4933  	// omitted from API requests. See
  4934  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4935  	NullFields []string `json:"-"`
  4936  }
  4937  
  4938  func (s *StringInputs) MarshalJSON() ([]byte, error) {
  4939  	type NoMethod StringInputs
  4940  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4941  }
  4942  
  4943  // TextButton: A button with text and `onclick` action.
  4944  type TextButton struct {
  4945  	// OnClick: The `onclick` action of the button.
  4946  	OnClick *OnClick `json:"onClick,omitempty"`
  4947  	// Text: The text of the button.
  4948  	Text string `json:"text,omitempty"`
  4949  	// ForceSendFields is a list of field names (e.g. "OnClick") to unconditionally
  4950  	// include in API requests. By default, fields with empty or default values are
  4951  	// omitted from API requests. See
  4952  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4953  	// details.
  4954  	ForceSendFields []string `json:"-"`
  4955  	// NullFields is a list of field names (e.g. "OnClick") to include in API
  4956  	// requests with the JSON null value. By default, fields with empty values are
  4957  	// omitted from API requests. See
  4958  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4959  	NullFields []string `json:"-"`
  4960  }
  4961  
  4962  func (s *TextButton) MarshalJSON() ([]byte, error) {
  4963  	type NoMethod TextButton
  4964  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4965  }
  4966  
  4967  // TextParagraph: A paragraph of text. Formatted text supported. For more
  4968  // information about formatting text, see Formatting text in Google Chat apps
  4969  // (https://developers.google.com/workspace/chat/format-messages#card-formatting)
  4970  // and Formatting text in Google Workspace Add-ons
  4971  // (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
  4972  type TextParagraph struct {
  4973  	Text string `json:"text,omitempty"`
  4974  	// ForceSendFields is a list of field names (e.g. "Text") to unconditionally
  4975  	// include in API requests. By default, fields with empty or default values are
  4976  	// omitted from API requests. See
  4977  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4978  	// details.
  4979  	ForceSendFields []string `json:"-"`
  4980  	// NullFields is a list of field names (e.g. "Text") to include in API requests
  4981  	// with the JSON null value. By default, fields with empty values are omitted
  4982  	// from API requests. See
  4983  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4984  	NullFields []string `json:"-"`
  4985  }
  4986  
  4987  func (s *TextParagraph) MarshalJSON() ([]byte, error) {
  4988  	type NoMethod TextParagraph
  4989  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4990  }
  4991  
  4992  // Thread: A thread in a Google Chat space. For example usage, see Start or
  4993  // reply to a message thread
  4994  // (https://developers.google.com/workspace/chat/create-messages#create-message-thread).
  4995  // If you specify a thread when creating a message, you can set the
  4996  // `messageReplyOption`
  4997  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)
  4998  // field to determine what happens if no matching thread is found.
  4999  type Thread struct {
  5000  	// Name: Output only. Resource name of the thread. Example:
  5001  	// `spaces/{space}/threads/{thread}`
  5002  	Name string `json:"name,omitempty"`
  5003  	// ThreadKey: Optional. Input for creating or updating a thread. Otherwise,
  5004  	// output only. ID for the thread. Supports up to 4000 characters. This ID is
  5005  	// unique to the Chat app that sets it. For example, if multiple Chat apps
  5006  	// create a message using the same thread key, the messages are posted in
  5007  	// different threads. To reply in a thread created by a person or another Chat
  5008  	// app, specify the thread `name` field instead.
  5009  	ThreadKey string `json:"threadKey,omitempty"`
  5010  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  5011  	// include in API requests. By default, fields with empty or default values are
  5012  	// omitted from API requests. See
  5013  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5014  	// details.
  5015  	ForceSendFields []string `json:"-"`
  5016  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  5017  	// with the JSON null value. By default, fields with empty values are omitted
  5018  	// from API requests. See
  5019  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5020  	NullFields []string `json:"-"`
  5021  }
  5022  
  5023  func (s *Thread) MarshalJSON() ([]byte, error) {
  5024  	type NoMethod Thread
  5025  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5026  }
  5027  
  5028  // ThreadReadState: A user's read state within a thread, used to identify read
  5029  // and unread messages.
  5030  type ThreadReadState struct {
  5031  	// LastReadTime: The time when the user's thread read state was updated.
  5032  	// Usually this corresponds with the timestamp of the last read message in a
  5033  	// thread.
  5034  	LastReadTime string `json:"lastReadTime,omitempty"`
  5035  	// Name: Resource name of the thread read state. Format:
  5036  	// `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
  5037  	Name string `json:"name,omitempty"`
  5038  
  5039  	// ServerResponse contains the HTTP response code and headers from the server.
  5040  	googleapi.ServerResponse `json:"-"`
  5041  	// ForceSendFields is a list of field names (e.g. "LastReadTime") to
  5042  	// unconditionally include in API requests. By default, fields with empty or
  5043  	// default values are omitted from API requests. See
  5044  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5045  	// details.
  5046  	ForceSendFields []string `json:"-"`
  5047  	// NullFields is a list of field names (e.g. "LastReadTime") to include in API
  5048  	// requests with the JSON null value. By default, fields with empty values are
  5049  	// omitted from API requests. See
  5050  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5051  	NullFields []string `json:"-"`
  5052  }
  5053  
  5054  func (s *ThreadReadState) MarshalJSON() ([]byte, error) {
  5055  	type NoMethod ThreadReadState
  5056  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5057  }
  5058  
  5059  // TimeInput: Time input values.
  5060  type TimeInput struct {
  5061  	// Hours: The hour on a 24-hour clock.
  5062  	Hours int64 `json:"hours,omitempty"`
  5063  	// Minutes: The number of minutes past the hour. Valid values are 0 to 59.
  5064  	Minutes int64 `json:"minutes,omitempty"`
  5065  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  5066  	// include in API requests. By default, fields with empty or default values are
  5067  	// omitted from API requests. See
  5068  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5069  	// details.
  5070  	ForceSendFields []string `json:"-"`
  5071  	// NullFields is a list of field names (e.g. "Hours") to include in API
  5072  	// requests with the JSON null value. By default, fields with empty values are
  5073  	// omitted from API requests. See
  5074  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5075  	NullFields []string `json:"-"`
  5076  }
  5077  
  5078  func (s *TimeInput) MarshalJSON() ([]byte, error) {
  5079  	type NoMethod TimeInput
  5080  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5081  }
  5082  
  5083  // TimeZone: The timezone ID and offset from Coordinated Universal Time (UTC).
  5084  // Only supported for the event types `CARD_CLICKED`
  5085  // (https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED)
  5086  // and `SUBMIT_DIALOG`
  5087  // (https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
  5088  type TimeZone struct {
  5089  	// Id: The IANA TZ (https://www.iana.org/time-zones) time zone database code,
  5090  	// such as "America/Toronto".
  5091  	Id string `json:"id,omitempty"`
  5092  	// Offset: The user timezone offset, in milliseconds, from Coordinated
  5093  	// Universal Time (UTC).
  5094  	Offset int64 `json:"offset,omitempty"`
  5095  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  5096  	// include in API requests. By default, fields with empty or default values are
  5097  	// omitted from API requests. See
  5098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5099  	// details.
  5100  	ForceSendFields []string `json:"-"`
  5101  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  5102  	// with the JSON null value. By default, fields with empty values are omitted
  5103  	// from API requests. See
  5104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5105  	NullFields []string `json:"-"`
  5106  }
  5107  
  5108  func (s *TimeZone) MarshalJSON() ([]byte, error) {
  5109  	type NoMethod TimeZone
  5110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5111  }
  5112  
  5113  // UpdatedWidget: The response of the updated widget. Used to provide
  5114  // autocomplete options for a widget.
  5115  type UpdatedWidget struct {
  5116  	// Suggestions: List of widget autocomplete results
  5117  	Suggestions *SelectionItems `json:"suggestions,omitempty"`
  5118  	// Widget: The ID of the updated widget. The ID must match the one for the
  5119  	// widget that triggered the update request.
  5120  	Widget string `json:"widget,omitempty"`
  5121  	// ForceSendFields is a list of field names (e.g. "Suggestions") to
  5122  	// unconditionally include in API requests. By default, fields with empty or
  5123  	// default values are omitted from API requests. See
  5124  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5125  	// details.
  5126  	ForceSendFields []string `json:"-"`
  5127  	// NullFields is a list of field names (e.g. "Suggestions") to include in API
  5128  	// requests with the JSON null value. By default, fields with empty values are
  5129  	// omitted from API requests. See
  5130  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5131  	NullFields []string `json:"-"`
  5132  }
  5133  
  5134  func (s *UpdatedWidget) MarshalJSON() ([]byte, error) {
  5135  	type NoMethod UpdatedWidget
  5136  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5137  }
  5138  
  5139  // UploadAttachmentRequest: Request to upload an attachment.
  5140  type UploadAttachmentRequest struct {
  5141  	// Filename: Required. The filename of the attachment, including the file
  5142  	// extension.
  5143  	Filename string `json:"filename,omitempty"`
  5144  	// ForceSendFields is a list of field names (e.g. "Filename") to
  5145  	// unconditionally include in API requests. By default, fields with empty or
  5146  	// default values are omitted from API requests. See
  5147  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5148  	// details.
  5149  	ForceSendFields []string `json:"-"`
  5150  	// NullFields is a list of field names (e.g. "Filename") to include in API
  5151  	// requests with the JSON null value. By default, fields with empty values are
  5152  	// omitted from API requests. See
  5153  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5154  	NullFields []string `json:"-"`
  5155  }
  5156  
  5157  func (s *UploadAttachmentRequest) MarshalJSON() ([]byte, error) {
  5158  	type NoMethod UploadAttachmentRequest
  5159  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5160  }
  5161  
  5162  // UploadAttachmentResponse: Response of uploading an attachment.
  5163  type UploadAttachmentResponse struct {
  5164  	// AttachmentDataRef: Reference to the uploaded attachment.
  5165  	AttachmentDataRef *AttachmentDataRef `json:"attachmentDataRef,omitempty"`
  5166  
  5167  	// ServerResponse contains the HTTP response code and headers from the server.
  5168  	googleapi.ServerResponse `json:"-"`
  5169  	// ForceSendFields is a list of field names (e.g. "AttachmentDataRef") to
  5170  	// unconditionally include in API requests. By default, fields with empty or
  5171  	// default values are omitted from API requests. See
  5172  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5173  	// details.
  5174  	ForceSendFields []string `json:"-"`
  5175  	// NullFields is a list of field names (e.g. "AttachmentDataRef") to include in
  5176  	// API requests with the JSON null value. By default, fields with empty values
  5177  	// are omitted from API requests. See
  5178  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5179  	NullFields []string `json:"-"`
  5180  }
  5181  
  5182  func (s *UploadAttachmentResponse) MarshalJSON() ([]byte, error) {
  5183  	type NoMethod UploadAttachmentResponse
  5184  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5185  }
  5186  
  5187  // User: A user in Google Chat. When returned as an output from a request, if
  5188  // your Chat app authenticates as a user
  5189  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  5190  // the output for a `User` resource only populates the user's `name` and
  5191  // `type`.
  5192  type User struct {
  5193  	// DisplayName: Output only. The user's display name.
  5194  	DisplayName string `json:"displayName,omitempty"`
  5195  	// DomainId: Unique identifier of the user's Google Workspace domain.
  5196  	DomainId string `json:"domainId,omitempty"`
  5197  	// IsAnonymous: Output only. When `true`, the user is deleted or their profile
  5198  	// is not visible.
  5199  	IsAnonymous bool `json:"isAnonymous,omitempty"`
  5200  	// Name: Resource name for a Google Chat user. Format: `users/{user}`.
  5201  	// `users/app` can be used as an alias for the calling app bot user. For human
  5202  	// users, `{user}` is the same user identifier as: - the `id` for the Person
  5203  	// (https://developers.google.com/people/api/rest/v1/people) in the People API.
  5204  	// For example, `users/123456789` in Chat API represents the same person as the
  5205  	// `123456789` Person profile ID in People API. - the `id` for a user
  5206  	// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
  5207  	// in the Admin SDK Directory API. - the user's email address can be used as an
  5208  	// alias for `{user}` in API requests. For example, if the People API Person
  5209  	// profile ID for `user@example.com` is `123456789`, you can use
  5210  	// `users/user@example.com` as an alias to reference `users/123456789`. Only
  5211  	// the canonical resource name (for example `users/123456789`) will be returned
  5212  	// from the API.
  5213  	Name string `json:"name,omitempty"`
  5214  	// Type: User type.
  5215  	//
  5216  	// Possible values:
  5217  	//   "TYPE_UNSPECIFIED" - Default value for the enum. DO NOT USE.
  5218  	//   "HUMAN" - Human user.
  5219  	//   "BOT" - Chat app user.
  5220  	Type string `json:"type,omitempty"`
  5221  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  5222  	// unconditionally include in API requests. By default, fields with empty or
  5223  	// default values are omitted from API requests. See
  5224  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5225  	// details.
  5226  	ForceSendFields []string `json:"-"`
  5227  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  5228  	// requests with the JSON null value. By default, fields with empty values are
  5229  	// omitted from API requests. See
  5230  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5231  	NullFields []string `json:"-"`
  5232  }
  5233  
  5234  func (s *User) MarshalJSON() ([]byte, error) {
  5235  	type NoMethod User
  5236  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5237  }
  5238  
  5239  // UserMentionMetadata: Annotation metadata for user mentions (@).
  5240  type UserMentionMetadata struct {
  5241  	// Type: The type of user mention.
  5242  	//
  5243  	// Possible values:
  5244  	//   "TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
  5245  	//   "ADD" - Add user to space.
  5246  	//   "MENTION" - Mention user in space.
  5247  	Type string `json:"type,omitempty"`
  5248  	// User: The user mentioned.
  5249  	User *User `json:"user,omitempty"`
  5250  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
  5251  	// include in API requests. By default, fields with empty or default values are
  5252  	// omitted from API requests. See
  5253  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5254  	// details.
  5255  	ForceSendFields []string `json:"-"`
  5256  	// NullFields is a list of field names (e.g. "Type") to include in API requests
  5257  	// with the JSON null value. By default, fields with empty values are omitted
  5258  	// from API requests. See
  5259  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5260  	NullFields []string `json:"-"`
  5261  }
  5262  
  5263  func (s *UserMentionMetadata) MarshalJSON() ([]byte, error) {
  5264  	type NoMethod UserMentionMetadata
  5265  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5266  }
  5267  
  5268  // WidgetMarkup: A widget is a UI element that presents text and images.
  5269  type WidgetMarkup struct {
  5270  	// Buttons: A list of buttons. Buttons is also `oneof data` and only one of
  5271  	// these fields should be set.
  5272  	Buttons []*Button `json:"buttons,omitempty"`
  5273  	// Image: Display an image in this widget.
  5274  	Image *Image `json:"image,omitempty"`
  5275  	// KeyValue: Display a key value item in this widget.
  5276  	KeyValue *KeyValue `json:"keyValue,omitempty"`
  5277  	// TextParagraph: Display a text paragraph in this widget.
  5278  	TextParagraph *TextParagraph `json:"textParagraph,omitempty"`
  5279  	// ForceSendFields is a list of field names (e.g. "Buttons") to unconditionally
  5280  	// include in API requests. By default, fields with empty or default values are
  5281  	// omitted from API requests. See
  5282  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5283  	// details.
  5284  	ForceSendFields []string `json:"-"`
  5285  	// NullFields is a list of field names (e.g. "Buttons") to include in API
  5286  	// requests with the JSON null value. By default, fields with empty values are
  5287  	// omitted from API requests. See
  5288  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5289  	NullFields []string `json:"-"`
  5290  }
  5291  
  5292  func (s *WidgetMarkup) MarshalJSON() ([]byte, error) {
  5293  	type NoMethod WidgetMarkup
  5294  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5295  }
  5296  
  5297  type MediaDownloadCall struct {
  5298  	s            *Service
  5299  	resourceName string
  5300  	urlParams_   gensupport.URLParams
  5301  	ifNoneMatch_ string
  5302  	ctx_         context.Context
  5303  	header_      http.Header
  5304  }
  5305  
  5306  // Download: Downloads media. Download is supported on the URI
  5307  // `/v1/media/{+name}?alt=media`.
  5308  //
  5309  //   - resourceName: Name of the media that is being downloaded. See
  5310  //     ReadRequest.resource_name.
  5311  func (r *MediaService) Download(resourceName string) *MediaDownloadCall {
  5312  	c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5313  	c.resourceName = resourceName
  5314  	return c
  5315  }
  5316  
  5317  // Fields allows partial responses to be retrieved. See
  5318  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5319  // details.
  5320  func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall {
  5321  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5322  	return c
  5323  }
  5324  
  5325  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5326  // object's ETag matches the given value. This is useful for getting updates
  5327  // only after the object has changed since the last request.
  5328  func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall {
  5329  	c.ifNoneMatch_ = entityTag
  5330  	return c
  5331  }
  5332  
  5333  // Context sets the context to be used in this call's Do and Download methods.
  5334  func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall {
  5335  	c.ctx_ = ctx
  5336  	return c
  5337  }
  5338  
  5339  // Header returns a http.Header that can be modified by the caller to add
  5340  // headers to the request.
  5341  func (c *MediaDownloadCall) Header() http.Header {
  5342  	if c.header_ == nil {
  5343  		c.header_ = make(http.Header)
  5344  	}
  5345  	return c.header_
  5346  }
  5347  
  5348  func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) {
  5349  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5350  	if c.ifNoneMatch_ != "" {
  5351  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5352  	}
  5353  	var body io.Reader = nil
  5354  	c.urlParams_.Set("alt", alt)
  5355  	c.urlParams_.Set("prettyPrint", "false")
  5356  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/media/{+resourceName}")
  5357  	urls += "?" + c.urlParams_.Encode()
  5358  	req, err := http.NewRequest("GET", urls, body)
  5359  	if err != nil {
  5360  		return nil, err
  5361  	}
  5362  	req.Header = reqHeaders
  5363  	googleapi.Expand(req.URL, map[string]string{
  5364  		"resourceName": c.resourceName,
  5365  	})
  5366  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5367  }
  5368  
  5369  // Download fetches the API endpoint's "media" value, instead of the normal
  5370  // API response value. If the returned error is nil, the Response is guaranteed to
  5371  // have a 2xx status code. Callers must close the Response.Body as usual.
  5372  func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  5373  	gensupport.SetOptions(c.urlParams_, opts...)
  5374  	res, err := c.doRequest("media")
  5375  	if err != nil {
  5376  		return nil, err
  5377  	}
  5378  	if err := googleapi.CheckResponse(res); err != nil {
  5379  		res.Body.Close()
  5380  		return nil, gensupport.WrapError(err)
  5381  	}
  5382  	return res, nil
  5383  }
  5384  
  5385  // Do executes the "chat.media.download" call.
  5386  // Any non-2xx status code is an error. Response headers are in either
  5387  // *Media.ServerResponse.Header or (if a response was returned at all) in
  5388  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5389  // whether the returned error was because http.StatusNotModified was returned.
  5390  func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) {
  5391  	gensupport.SetOptions(c.urlParams_, opts...)
  5392  	res, err := c.doRequest("json")
  5393  	if res != nil && res.StatusCode == http.StatusNotModified {
  5394  		if res.Body != nil {
  5395  			res.Body.Close()
  5396  		}
  5397  		return nil, gensupport.WrapError(&googleapi.Error{
  5398  			Code:   res.StatusCode,
  5399  			Header: res.Header,
  5400  		})
  5401  	}
  5402  	if err != nil {
  5403  		return nil, err
  5404  	}
  5405  	defer googleapi.CloseBody(res)
  5406  	if err := googleapi.CheckResponse(res); err != nil {
  5407  		return nil, gensupport.WrapError(err)
  5408  	}
  5409  	ret := &Media{
  5410  		ServerResponse: googleapi.ServerResponse{
  5411  			Header:         res.Header,
  5412  			HTTPStatusCode: res.StatusCode,
  5413  		},
  5414  	}
  5415  	target := &ret
  5416  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5417  		return nil, err
  5418  	}
  5419  	return ret, nil
  5420  }
  5421  
  5422  type MediaUploadCall struct {
  5423  	s                       *Service
  5424  	parent                  string
  5425  	uploadattachmentrequest *UploadAttachmentRequest
  5426  	urlParams_              gensupport.URLParams
  5427  	mediaInfo_              *gensupport.MediaInfo
  5428  	ctx_                    context.Context
  5429  	header_                 http.Header
  5430  }
  5431  
  5432  // Upload: Uploads an attachment. For an example, see Upload media as a file
  5433  // attachment
  5434  // (https://developers.google.com/workspace/chat/upload-media-attachments).
  5435  // Requires user authentication
  5436  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  5437  // You can upload attachments up to 200 MB. Certain file types aren't
  5438  // supported. For details, see File types blocked by Google Chat
  5439  // (https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
  5440  //
  5441  //   - parent: Resource name of the Chat space in which the attachment is
  5442  //     uploaded. Format "spaces/{space}".
  5443  func (r *MediaService) Upload(parent string, uploadattachmentrequest *UploadAttachmentRequest) *MediaUploadCall {
  5444  	c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5445  	c.parent = parent
  5446  	c.uploadattachmentrequest = uploadattachmentrequest
  5447  	return c
  5448  }
  5449  
  5450  // Media specifies the media to upload in one or more chunks. The chunk size
  5451  // may be controlled by supplying a MediaOption generated by
  5452  // googleapi.ChunkSize. The chunk size defaults to
  5453  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  5454  // request will be determined by sniffing the contents of r, unless a
  5455  // MediaOption generated by googleapi.ContentType is supplied.
  5456  // At most one of Media and ResumableMedia may be set.
  5457  func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall {
  5458  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  5459  	return c
  5460  }
  5461  
  5462  // ResumableMedia specifies the media to upload in chunks and can be canceled
  5463  // with ctx.
  5464  //
  5465  // Deprecated: use Media instead.
  5466  //
  5467  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  5468  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  5469  // will be auto-detected. The provided ctx will supersede any context
  5470  // previously provided to the Context method.
  5471  func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall {
  5472  	c.ctx_ = ctx
  5473  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  5474  	return c
  5475  }
  5476  
  5477  // ProgressUpdater provides a callback function that will be called after every
  5478  // chunk. It should be a low-latency function in order to not slow down the
  5479  // upload operation. This should only be called when using ResumableMedia (as
  5480  // opposed to Media).
  5481  func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall {
  5482  	c.mediaInfo_.SetProgressUpdater(pu)
  5483  	return c
  5484  }
  5485  
  5486  // Fields allows partial responses to be retrieved. See
  5487  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5488  // details.
  5489  func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall {
  5490  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5491  	return c
  5492  }
  5493  
  5494  // Context sets the context to be used in this call's Do method.
  5495  // This context will supersede any context previously provided to the
  5496  // ResumableMedia method.
  5497  func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall {
  5498  	c.ctx_ = ctx
  5499  	return c
  5500  }
  5501  
  5502  // Header returns a http.Header that can be modified by the caller to add
  5503  // headers to the request.
  5504  func (c *MediaUploadCall) Header() http.Header {
  5505  	if c.header_ == nil {
  5506  		c.header_ = make(http.Header)
  5507  	}
  5508  	return c.header_
  5509  }
  5510  
  5511  func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) {
  5512  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5513  	var body io.Reader = nil
  5514  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadattachmentrequest)
  5515  	if err != nil {
  5516  		return nil, err
  5517  	}
  5518  	c.urlParams_.Set("alt", alt)
  5519  	c.urlParams_.Set("prettyPrint", "false")
  5520  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments:upload")
  5521  	if c.mediaInfo_ != nil {
  5522  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/attachments:upload")
  5523  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  5524  	}
  5525  	if body == nil {
  5526  		body = new(bytes.Buffer)
  5527  		reqHeaders.Set("Content-Type", "application/json")
  5528  	}
  5529  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  5530  	defer cleanup()
  5531  	urls += "?" + c.urlParams_.Encode()
  5532  	req, err := http.NewRequest("POST", urls, body)
  5533  	if err != nil {
  5534  		return nil, err
  5535  	}
  5536  	req.Header = reqHeaders
  5537  	req.GetBody = getBody
  5538  	googleapi.Expand(req.URL, map[string]string{
  5539  		"parent": c.parent,
  5540  	})
  5541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5542  }
  5543  
  5544  // Do executes the "chat.media.upload" call.
  5545  // Any non-2xx status code is an error. Response headers are in either
  5546  // *UploadAttachmentResponse.ServerResponse.Header or (if a response was
  5547  // returned at all) in error.(*googleapi.Error).Header. Use
  5548  // googleapi.IsNotModified to check whether the returned error was because
  5549  // http.StatusNotModified was returned.
  5550  func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*UploadAttachmentResponse, error) {
  5551  	gensupport.SetOptions(c.urlParams_, opts...)
  5552  	res, err := c.doRequest("json")
  5553  	if res != nil && res.StatusCode == http.StatusNotModified {
  5554  		if res.Body != nil {
  5555  			res.Body.Close()
  5556  		}
  5557  		return nil, gensupport.WrapError(&googleapi.Error{
  5558  			Code:   res.StatusCode,
  5559  			Header: res.Header,
  5560  		})
  5561  	}
  5562  	if err != nil {
  5563  		return nil, err
  5564  	}
  5565  	defer googleapi.CloseBody(res)
  5566  	if err := googleapi.CheckResponse(res); err != nil {
  5567  		return nil, gensupport.WrapError(err)
  5568  	}
  5569  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  5570  	if rx != nil {
  5571  		rx.Client = c.s.client
  5572  		rx.UserAgent = c.s.userAgent()
  5573  		ctx := c.ctx_
  5574  		if ctx == nil {
  5575  			ctx = context.TODO()
  5576  		}
  5577  		res, err = rx.Upload(ctx)
  5578  		if err != nil {
  5579  			return nil, err
  5580  		}
  5581  		defer res.Body.Close()
  5582  		if err := googleapi.CheckResponse(res); err != nil {
  5583  			return nil, gensupport.WrapError(err)
  5584  		}
  5585  	}
  5586  	ret := &UploadAttachmentResponse{
  5587  		ServerResponse: googleapi.ServerResponse{
  5588  			Header:         res.Header,
  5589  			HTTPStatusCode: res.StatusCode,
  5590  		},
  5591  	}
  5592  	target := &ret
  5593  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5594  		return nil, err
  5595  	}
  5596  	return ret, nil
  5597  }
  5598  
  5599  type SpacesCompleteImportCall struct {
  5600  	s                          *Service
  5601  	name                       string
  5602  	completeimportspacerequest *CompleteImportSpaceRequest
  5603  	urlParams_                 gensupport.URLParams
  5604  	ctx_                       context.Context
  5605  	header_                    http.Header
  5606  }
  5607  
  5608  // CompleteImport: Completes the import process
  5609  // (https://developers.google.com/workspace/chat/import-data) for the specified
  5610  // space and makes it visible to users. Requires app authentication and
  5611  // domain-wide delegation. For more information, see Authorize Google Chat apps
  5612  // to import data
  5613  // (https://developers.google.com/workspace/chat/authorize-import).
  5614  //
  5615  // - name: Resource name of the import mode space. Format: `spaces/{space}`.
  5616  func (r *SpacesService) CompleteImport(name string, completeimportspacerequest *CompleteImportSpaceRequest) *SpacesCompleteImportCall {
  5617  	c := &SpacesCompleteImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5618  	c.name = name
  5619  	c.completeimportspacerequest = completeimportspacerequest
  5620  	return c
  5621  }
  5622  
  5623  // Fields allows partial responses to be retrieved. See
  5624  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5625  // details.
  5626  func (c *SpacesCompleteImportCall) Fields(s ...googleapi.Field) *SpacesCompleteImportCall {
  5627  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5628  	return c
  5629  }
  5630  
  5631  // Context sets the context to be used in this call's Do method.
  5632  func (c *SpacesCompleteImportCall) Context(ctx context.Context) *SpacesCompleteImportCall {
  5633  	c.ctx_ = ctx
  5634  	return c
  5635  }
  5636  
  5637  // Header returns a http.Header that can be modified by the caller to add
  5638  // headers to the request.
  5639  func (c *SpacesCompleteImportCall) Header() http.Header {
  5640  	if c.header_ == nil {
  5641  		c.header_ = make(http.Header)
  5642  	}
  5643  	return c.header_
  5644  }
  5645  
  5646  func (c *SpacesCompleteImportCall) doRequest(alt string) (*http.Response, error) {
  5647  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5648  	var body io.Reader = nil
  5649  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeimportspacerequest)
  5650  	if err != nil {
  5651  		return nil, err
  5652  	}
  5653  	c.urlParams_.Set("alt", alt)
  5654  	c.urlParams_.Set("prettyPrint", "false")
  5655  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:completeImport")
  5656  	urls += "?" + c.urlParams_.Encode()
  5657  	req, err := http.NewRequest("POST", urls, body)
  5658  	if err != nil {
  5659  		return nil, err
  5660  	}
  5661  	req.Header = reqHeaders
  5662  	googleapi.Expand(req.URL, map[string]string{
  5663  		"name": c.name,
  5664  	})
  5665  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5666  }
  5667  
  5668  // Do executes the "chat.spaces.completeImport" call.
  5669  // Any non-2xx status code is an error. Response headers are in either
  5670  // *CompleteImportSpaceResponse.ServerResponse.Header or (if a response was
  5671  // returned at all) in error.(*googleapi.Error).Header. Use
  5672  // googleapi.IsNotModified to check whether the returned error was because
  5673  // http.StatusNotModified was returned.
  5674  func (c *SpacesCompleteImportCall) Do(opts ...googleapi.CallOption) (*CompleteImportSpaceResponse, error) {
  5675  	gensupport.SetOptions(c.urlParams_, opts...)
  5676  	res, err := c.doRequest("json")
  5677  	if res != nil && res.StatusCode == http.StatusNotModified {
  5678  		if res.Body != nil {
  5679  			res.Body.Close()
  5680  		}
  5681  		return nil, gensupport.WrapError(&googleapi.Error{
  5682  			Code:   res.StatusCode,
  5683  			Header: res.Header,
  5684  		})
  5685  	}
  5686  	if err != nil {
  5687  		return nil, err
  5688  	}
  5689  	defer googleapi.CloseBody(res)
  5690  	if err := googleapi.CheckResponse(res); err != nil {
  5691  		return nil, gensupport.WrapError(err)
  5692  	}
  5693  	ret := &CompleteImportSpaceResponse{
  5694  		ServerResponse: googleapi.ServerResponse{
  5695  			Header:         res.Header,
  5696  			HTTPStatusCode: res.StatusCode,
  5697  		},
  5698  	}
  5699  	target := &ret
  5700  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5701  		return nil, err
  5702  	}
  5703  	return ret, nil
  5704  }
  5705  
  5706  type SpacesCreateCall struct {
  5707  	s          *Service
  5708  	space      *Space
  5709  	urlParams_ gensupport.URLParams
  5710  	ctx_       context.Context
  5711  	header_    http.Header
  5712  }
  5713  
  5714  // Create: Creates a named space. Spaces grouped by topics aren't supported.
  5715  // For an example, see Create a space
  5716  // (https://developers.google.com/workspace/chat/create-spaces). If you receive
  5717  // the error message `ALREADY_EXISTS` when creating a space, try a different
  5718  // `displayName`. An existing space within the Google Workspace organization
  5719  // might already use this display name. Requires user authentication
  5720  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  5721  func (r *SpacesService) Create(space *Space) *SpacesCreateCall {
  5722  	c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5723  	c.space = space
  5724  	return c
  5725  }
  5726  
  5727  // RequestId sets the optional parameter "requestId": A unique identifier for
  5728  // this request. A random UUID is recommended. Specifying an existing request
  5729  // ID returns the space created with that ID instead of creating a new space.
  5730  // Specifying an existing request ID from the same Chat app with a different
  5731  // authenticated user returns an error.
  5732  func (c *SpacesCreateCall) RequestId(requestId string) *SpacesCreateCall {
  5733  	c.urlParams_.Set("requestId", requestId)
  5734  	return c
  5735  }
  5736  
  5737  // Fields allows partial responses to be retrieved. See
  5738  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5739  // details.
  5740  func (c *SpacesCreateCall) Fields(s ...googleapi.Field) *SpacesCreateCall {
  5741  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5742  	return c
  5743  }
  5744  
  5745  // Context sets the context to be used in this call's Do method.
  5746  func (c *SpacesCreateCall) Context(ctx context.Context) *SpacesCreateCall {
  5747  	c.ctx_ = ctx
  5748  	return c
  5749  }
  5750  
  5751  // Header returns a http.Header that can be modified by the caller to add
  5752  // headers to the request.
  5753  func (c *SpacesCreateCall) Header() http.Header {
  5754  	if c.header_ == nil {
  5755  		c.header_ = make(http.Header)
  5756  	}
  5757  	return c.header_
  5758  }
  5759  
  5760  func (c *SpacesCreateCall) doRequest(alt string) (*http.Response, error) {
  5761  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5762  	var body io.Reader = nil
  5763  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.space)
  5764  	if err != nil {
  5765  		return nil, err
  5766  	}
  5767  	c.urlParams_.Set("alt", alt)
  5768  	c.urlParams_.Set("prettyPrint", "false")
  5769  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/spaces")
  5770  	urls += "?" + c.urlParams_.Encode()
  5771  	req, err := http.NewRequest("POST", urls, body)
  5772  	if err != nil {
  5773  		return nil, err
  5774  	}
  5775  	req.Header = reqHeaders
  5776  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5777  }
  5778  
  5779  // Do executes the "chat.spaces.create" call.
  5780  // Any non-2xx status code is an error. Response headers are in either
  5781  // *Space.ServerResponse.Header or (if a response was returned at all) in
  5782  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5783  // whether the returned error was because http.StatusNotModified was returned.
  5784  func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error) {
  5785  	gensupport.SetOptions(c.urlParams_, opts...)
  5786  	res, err := c.doRequest("json")
  5787  	if res != nil && res.StatusCode == http.StatusNotModified {
  5788  		if res.Body != nil {
  5789  			res.Body.Close()
  5790  		}
  5791  		return nil, gensupport.WrapError(&googleapi.Error{
  5792  			Code:   res.StatusCode,
  5793  			Header: res.Header,
  5794  		})
  5795  	}
  5796  	if err != nil {
  5797  		return nil, err
  5798  	}
  5799  	defer googleapi.CloseBody(res)
  5800  	if err := googleapi.CheckResponse(res); err != nil {
  5801  		return nil, gensupport.WrapError(err)
  5802  	}
  5803  	ret := &Space{
  5804  		ServerResponse: googleapi.ServerResponse{
  5805  			Header:         res.Header,
  5806  			HTTPStatusCode: res.StatusCode,
  5807  		},
  5808  	}
  5809  	target := &ret
  5810  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5811  		return nil, err
  5812  	}
  5813  	return ret, nil
  5814  }
  5815  
  5816  type SpacesDeleteCall struct {
  5817  	s          *Service
  5818  	name       string
  5819  	urlParams_ gensupport.URLParams
  5820  	ctx_       context.Context
  5821  	header_    http.Header
  5822  }
  5823  
  5824  // Delete: Deletes a named space. Always performs a cascading delete, which
  5825  // means that the space's child resources—like messages posted in the space
  5826  // and memberships in the space—are also deleted. For an example, see Delete
  5827  // a space (https://developers.google.com/workspace/chat/delete-spaces).
  5828  // Requires user authentication
  5829  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  5830  // from a user who has permission to delete the space.
  5831  //
  5832  // - name: Resource name of the space to delete. Format: `spaces/{space}`.
  5833  func (r *SpacesService) Delete(name string) *SpacesDeleteCall {
  5834  	c := &SpacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5835  	c.name = name
  5836  	return c
  5837  }
  5838  
  5839  // Fields allows partial responses to be retrieved. See
  5840  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5841  // details.
  5842  func (c *SpacesDeleteCall) Fields(s ...googleapi.Field) *SpacesDeleteCall {
  5843  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5844  	return c
  5845  }
  5846  
  5847  // Context sets the context to be used in this call's Do method.
  5848  func (c *SpacesDeleteCall) Context(ctx context.Context) *SpacesDeleteCall {
  5849  	c.ctx_ = ctx
  5850  	return c
  5851  }
  5852  
  5853  // Header returns a http.Header that can be modified by the caller to add
  5854  // headers to the request.
  5855  func (c *SpacesDeleteCall) Header() http.Header {
  5856  	if c.header_ == nil {
  5857  		c.header_ = make(http.Header)
  5858  	}
  5859  	return c.header_
  5860  }
  5861  
  5862  func (c *SpacesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5863  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5864  	var body io.Reader = nil
  5865  	c.urlParams_.Set("alt", alt)
  5866  	c.urlParams_.Set("prettyPrint", "false")
  5867  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5868  	urls += "?" + c.urlParams_.Encode()
  5869  	req, err := http.NewRequest("DELETE", urls, body)
  5870  	if err != nil {
  5871  		return nil, err
  5872  	}
  5873  	req.Header = reqHeaders
  5874  	googleapi.Expand(req.URL, map[string]string{
  5875  		"name": c.name,
  5876  	})
  5877  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5878  }
  5879  
  5880  // Do executes the "chat.spaces.delete" call.
  5881  // Any non-2xx status code is an error. Response headers are in either
  5882  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5883  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5884  // whether the returned error was because http.StatusNotModified was returned.
  5885  func (c *SpacesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5886  	gensupport.SetOptions(c.urlParams_, opts...)
  5887  	res, err := c.doRequest("json")
  5888  	if res != nil && res.StatusCode == http.StatusNotModified {
  5889  		if res.Body != nil {
  5890  			res.Body.Close()
  5891  		}
  5892  		return nil, gensupport.WrapError(&googleapi.Error{
  5893  			Code:   res.StatusCode,
  5894  			Header: res.Header,
  5895  		})
  5896  	}
  5897  	if err != nil {
  5898  		return nil, err
  5899  	}
  5900  	defer googleapi.CloseBody(res)
  5901  	if err := googleapi.CheckResponse(res); err != nil {
  5902  		return nil, gensupport.WrapError(err)
  5903  	}
  5904  	ret := &Empty{
  5905  		ServerResponse: googleapi.ServerResponse{
  5906  			Header:         res.Header,
  5907  			HTTPStatusCode: res.StatusCode,
  5908  		},
  5909  	}
  5910  	target := &ret
  5911  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5912  		return nil, err
  5913  	}
  5914  	return ret, nil
  5915  }
  5916  
  5917  type SpacesFindDirectMessageCall struct {
  5918  	s            *Service
  5919  	urlParams_   gensupport.URLParams
  5920  	ifNoneMatch_ string
  5921  	ctx_         context.Context
  5922  	header_      http.Header
  5923  }
  5924  
  5925  // FindDirectMessage: Returns the existing direct message with the specified
  5926  // user. If no direct message space is found, returns a `404 NOT_FOUND` error.
  5927  // For an example, see Find a direct message
  5928  // (/chat/api/guides/v1/spaces/find-direct-message). With user authentication
  5929  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  5930  // returns the direct message space between the specified user and the
  5931  // authenticated user. With app authentication
  5932  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
  5933  // returns the direct message space between the specified user and the calling
  5934  // Chat app. Requires user authentication
  5935  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  5936  // or app authentication
  5937  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  5938  func (r *SpacesService) FindDirectMessage() *SpacesFindDirectMessageCall {
  5939  	c := &SpacesFindDirectMessageCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5940  	return c
  5941  }
  5942  
  5943  // Name sets the optional parameter "name": Required. Resource name of the user
  5944  // to find direct message with. Format: `users/{user}`, where `{user}` is
  5945  // either the `id` for the person
  5946  // (https://developers.google.com/people/api/rest/v1/people) from the People
  5947  // API, or the `id` for the user
  5948  // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
  5949  // in the Directory API. For example, if the People API profile ID is
  5950  // `123456789`, you can find a direct message with that person by using
  5951  // `users/123456789` as the `name`. When authenticated as a user
  5952  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  5953  // you can use the email as an alias for `{user}`. For example,
  5954  // `users/example@gmail.com` where `example@gmail.com` is the email of the
  5955  // Google Chat user.
  5956  func (c *SpacesFindDirectMessageCall) Name(name string) *SpacesFindDirectMessageCall {
  5957  	c.urlParams_.Set("name", name)
  5958  	return c
  5959  }
  5960  
  5961  // Fields allows partial responses to be retrieved. See
  5962  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5963  // details.
  5964  func (c *SpacesFindDirectMessageCall) Fields(s ...googleapi.Field) *SpacesFindDirectMessageCall {
  5965  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5966  	return c
  5967  }
  5968  
  5969  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5970  // object's ETag matches the given value. This is useful for getting updates
  5971  // only after the object has changed since the last request.
  5972  func (c *SpacesFindDirectMessageCall) IfNoneMatch(entityTag string) *SpacesFindDirectMessageCall {
  5973  	c.ifNoneMatch_ = entityTag
  5974  	return c
  5975  }
  5976  
  5977  // Context sets the context to be used in this call's Do method.
  5978  func (c *SpacesFindDirectMessageCall) Context(ctx context.Context) *SpacesFindDirectMessageCall {
  5979  	c.ctx_ = ctx
  5980  	return c
  5981  }
  5982  
  5983  // Header returns a http.Header that can be modified by the caller to add
  5984  // headers to the request.
  5985  func (c *SpacesFindDirectMessageCall) Header() http.Header {
  5986  	if c.header_ == nil {
  5987  		c.header_ = make(http.Header)
  5988  	}
  5989  	return c.header_
  5990  }
  5991  
  5992  func (c *SpacesFindDirectMessageCall) doRequest(alt string) (*http.Response, error) {
  5993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5994  	if c.ifNoneMatch_ != "" {
  5995  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5996  	}
  5997  	var body io.Reader = nil
  5998  	c.urlParams_.Set("alt", alt)
  5999  	c.urlParams_.Set("prettyPrint", "false")
  6000  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/spaces:findDirectMessage")
  6001  	urls += "?" + c.urlParams_.Encode()
  6002  	req, err := http.NewRequest("GET", urls, body)
  6003  	if err != nil {
  6004  		return nil, err
  6005  	}
  6006  	req.Header = reqHeaders
  6007  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6008  }
  6009  
  6010  // Do executes the "chat.spaces.findDirectMessage" call.
  6011  // Any non-2xx status code is an error. Response headers are in either
  6012  // *Space.ServerResponse.Header or (if a response was returned at all) in
  6013  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6014  // whether the returned error was because http.StatusNotModified was returned.
  6015  func (c *SpacesFindDirectMessageCall) Do(opts ...googleapi.CallOption) (*Space, error) {
  6016  	gensupport.SetOptions(c.urlParams_, opts...)
  6017  	res, err := c.doRequest("json")
  6018  	if res != nil && res.StatusCode == http.StatusNotModified {
  6019  		if res.Body != nil {
  6020  			res.Body.Close()
  6021  		}
  6022  		return nil, gensupport.WrapError(&googleapi.Error{
  6023  			Code:   res.StatusCode,
  6024  			Header: res.Header,
  6025  		})
  6026  	}
  6027  	if err != nil {
  6028  		return nil, err
  6029  	}
  6030  	defer googleapi.CloseBody(res)
  6031  	if err := googleapi.CheckResponse(res); err != nil {
  6032  		return nil, gensupport.WrapError(err)
  6033  	}
  6034  	ret := &Space{
  6035  		ServerResponse: googleapi.ServerResponse{
  6036  			Header:         res.Header,
  6037  			HTTPStatusCode: res.StatusCode,
  6038  		},
  6039  	}
  6040  	target := &ret
  6041  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6042  		return nil, err
  6043  	}
  6044  	return ret, nil
  6045  }
  6046  
  6047  type SpacesGetCall struct {
  6048  	s            *Service
  6049  	name         string
  6050  	urlParams_   gensupport.URLParams
  6051  	ifNoneMatch_ string
  6052  	ctx_         context.Context
  6053  	header_      http.Header
  6054  }
  6055  
  6056  // Get: Returns details about a space. For an example, see Get details about a
  6057  // space (https://developers.google.com/workspace/chat/get-spaces). Requires
  6058  // authentication
  6059  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  6060  // Supports app authentication
  6061  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  6062  // and user authentication
  6063  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6064  //
  6065  //   - name: Resource name of the space, in the form "spaces/*". Format:
  6066  //     `spaces/{space}`.
  6067  func (r *SpacesService) Get(name string) *SpacesGetCall {
  6068  	c := &SpacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6069  	c.name = name
  6070  	return c
  6071  }
  6072  
  6073  // Fields allows partial responses to be retrieved. See
  6074  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6075  // details.
  6076  func (c *SpacesGetCall) Fields(s ...googleapi.Field) *SpacesGetCall {
  6077  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6078  	return c
  6079  }
  6080  
  6081  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6082  // object's ETag matches the given value. This is useful for getting updates
  6083  // only after the object has changed since the last request.
  6084  func (c *SpacesGetCall) IfNoneMatch(entityTag string) *SpacesGetCall {
  6085  	c.ifNoneMatch_ = entityTag
  6086  	return c
  6087  }
  6088  
  6089  // Context sets the context to be used in this call's Do method.
  6090  func (c *SpacesGetCall) Context(ctx context.Context) *SpacesGetCall {
  6091  	c.ctx_ = ctx
  6092  	return c
  6093  }
  6094  
  6095  // Header returns a http.Header that can be modified by the caller to add
  6096  // headers to the request.
  6097  func (c *SpacesGetCall) Header() http.Header {
  6098  	if c.header_ == nil {
  6099  		c.header_ = make(http.Header)
  6100  	}
  6101  	return c.header_
  6102  }
  6103  
  6104  func (c *SpacesGetCall) doRequest(alt string) (*http.Response, error) {
  6105  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6106  	if c.ifNoneMatch_ != "" {
  6107  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6108  	}
  6109  	var body io.Reader = nil
  6110  	c.urlParams_.Set("alt", alt)
  6111  	c.urlParams_.Set("prettyPrint", "false")
  6112  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6113  	urls += "?" + c.urlParams_.Encode()
  6114  	req, err := http.NewRequest("GET", urls, body)
  6115  	if err != nil {
  6116  		return nil, err
  6117  	}
  6118  	req.Header = reqHeaders
  6119  	googleapi.Expand(req.URL, map[string]string{
  6120  		"name": c.name,
  6121  	})
  6122  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6123  }
  6124  
  6125  // Do executes the "chat.spaces.get" call.
  6126  // Any non-2xx status code is an error. Response headers are in either
  6127  // *Space.ServerResponse.Header or (if a response was returned at all) in
  6128  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6129  // whether the returned error was because http.StatusNotModified was returned.
  6130  func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) {
  6131  	gensupport.SetOptions(c.urlParams_, opts...)
  6132  	res, err := c.doRequest("json")
  6133  	if res != nil && res.StatusCode == http.StatusNotModified {
  6134  		if res.Body != nil {
  6135  			res.Body.Close()
  6136  		}
  6137  		return nil, gensupport.WrapError(&googleapi.Error{
  6138  			Code:   res.StatusCode,
  6139  			Header: res.Header,
  6140  		})
  6141  	}
  6142  	if err != nil {
  6143  		return nil, err
  6144  	}
  6145  	defer googleapi.CloseBody(res)
  6146  	if err := googleapi.CheckResponse(res); err != nil {
  6147  		return nil, gensupport.WrapError(err)
  6148  	}
  6149  	ret := &Space{
  6150  		ServerResponse: googleapi.ServerResponse{
  6151  			Header:         res.Header,
  6152  			HTTPStatusCode: res.StatusCode,
  6153  		},
  6154  	}
  6155  	target := &ret
  6156  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6157  		return nil, err
  6158  	}
  6159  	return ret, nil
  6160  }
  6161  
  6162  type SpacesListCall struct {
  6163  	s            *Service
  6164  	urlParams_   gensupport.URLParams
  6165  	ifNoneMatch_ string
  6166  	ctx_         context.Context
  6167  	header_      http.Header
  6168  }
  6169  
  6170  // List: Lists spaces the caller is a member of. Group chats and DMs aren't
  6171  // listed until the first message is sent. For an example, see List spaces
  6172  // (https://developers.google.com/workspace/chat/list-spaces). Requires
  6173  // authentication
  6174  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  6175  // Supports app authentication
  6176  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  6177  // and user authentication
  6178  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6179  // Lists spaces visible to the caller or authenticated user. Group chats and
  6180  // DMs aren't listed until the first message is sent.
  6181  func (r *SpacesService) List() *SpacesListCall {
  6182  	c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6183  	return c
  6184  }
  6185  
  6186  // Filter sets the optional parameter "filter": A query filter. You can filter
  6187  // spaces by the space type (`space_type`
  6188  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
  6189  // To filter by space type, you must specify valid enum value, such as `SPACE`
  6190  // or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To
  6191  // query for multiple space types, use the `OR` operator. For example, the
  6192  // following queries are valid: ``` space_type = "SPACE" spaceType =
  6193  // "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" ``` Invalid queries are
  6194  // rejected by the server with an `INVALID_ARGUMENT` error.
  6195  func (c *SpacesListCall) Filter(filter string) *SpacesListCall {
  6196  	c.urlParams_.Set("filter", filter)
  6197  	return c
  6198  }
  6199  
  6200  // PageSize sets the optional parameter "pageSize": The maximum number of
  6201  // spaces to return. The service might return fewer than this value. If
  6202  // unspecified, at most 100 spaces are returned. The maximum value is 1000. If
  6203  // you use a value more than 1000, it's automatically changed to 1000. Negative
  6204  // values return an `INVALID_ARGUMENT` error.
  6205  func (c *SpacesListCall) PageSize(pageSize int64) *SpacesListCall {
  6206  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6207  	return c
  6208  }
  6209  
  6210  // PageToken sets the optional parameter "pageToken": A page token, received
  6211  // from a previous list spaces call. Provide this parameter to retrieve the
  6212  // subsequent page. When paginating, the filter value should match the call
  6213  // that provided the page token. Passing a different value may lead to
  6214  // unexpected results.
  6215  func (c *SpacesListCall) PageToken(pageToken string) *SpacesListCall {
  6216  	c.urlParams_.Set("pageToken", pageToken)
  6217  	return c
  6218  }
  6219  
  6220  // Fields allows partial responses to be retrieved. See
  6221  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6222  // details.
  6223  func (c *SpacesListCall) Fields(s ...googleapi.Field) *SpacesListCall {
  6224  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6225  	return c
  6226  }
  6227  
  6228  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6229  // object's ETag matches the given value. This is useful for getting updates
  6230  // only after the object has changed since the last request.
  6231  func (c *SpacesListCall) IfNoneMatch(entityTag string) *SpacesListCall {
  6232  	c.ifNoneMatch_ = entityTag
  6233  	return c
  6234  }
  6235  
  6236  // Context sets the context to be used in this call's Do method.
  6237  func (c *SpacesListCall) Context(ctx context.Context) *SpacesListCall {
  6238  	c.ctx_ = ctx
  6239  	return c
  6240  }
  6241  
  6242  // Header returns a http.Header that can be modified by the caller to add
  6243  // headers to the request.
  6244  func (c *SpacesListCall) Header() http.Header {
  6245  	if c.header_ == nil {
  6246  		c.header_ = make(http.Header)
  6247  	}
  6248  	return c.header_
  6249  }
  6250  
  6251  func (c *SpacesListCall) doRequest(alt string) (*http.Response, error) {
  6252  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6253  	if c.ifNoneMatch_ != "" {
  6254  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6255  	}
  6256  	var body io.Reader = nil
  6257  	c.urlParams_.Set("alt", alt)
  6258  	c.urlParams_.Set("prettyPrint", "false")
  6259  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/spaces")
  6260  	urls += "?" + c.urlParams_.Encode()
  6261  	req, err := http.NewRequest("GET", urls, body)
  6262  	if err != nil {
  6263  		return nil, err
  6264  	}
  6265  	req.Header = reqHeaders
  6266  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6267  }
  6268  
  6269  // Do executes the "chat.spaces.list" call.
  6270  // Any non-2xx status code is an error. Response headers are in either
  6271  // *ListSpacesResponse.ServerResponse.Header or (if a response was returned at
  6272  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6273  // check whether the returned error was because http.StatusNotModified was
  6274  // returned.
  6275  func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, error) {
  6276  	gensupport.SetOptions(c.urlParams_, opts...)
  6277  	res, err := c.doRequest("json")
  6278  	if res != nil && res.StatusCode == http.StatusNotModified {
  6279  		if res.Body != nil {
  6280  			res.Body.Close()
  6281  		}
  6282  		return nil, gensupport.WrapError(&googleapi.Error{
  6283  			Code:   res.StatusCode,
  6284  			Header: res.Header,
  6285  		})
  6286  	}
  6287  	if err != nil {
  6288  		return nil, err
  6289  	}
  6290  	defer googleapi.CloseBody(res)
  6291  	if err := googleapi.CheckResponse(res); err != nil {
  6292  		return nil, gensupport.WrapError(err)
  6293  	}
  6294  	ret := &ListSpacesResponse{
  6295  		ServerResponse: googleapi.ServerResponse{
  6296  			Header:         res.Header,
  6297  			HTTPStatusCode: res.StatusCode,
  6298  		},
  6299  	}
  6300  	target := &ret
  6301  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6302  		return nil, err
  6303  	}
  6304  	return ret, nil
  6305  }
  6306  
  6307  // Pages invokes f for each page of results.
  6308  // A non-nil error returned from f will halt the iteration.
  6309  // The provided context supersedes any context provided to the Context method.
  6310  func (c *SpacesListCall) Pages(ctx context.Context, f func(*ListSpacesResponse) error) error {
  6311  	c.ctx_ = ctx
  6312  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6313  	for {
  6314  		x, err := c.Do()
  6315  		if err != nil {
  6316  			return err
  6317  		}
  6318  		if err := f(x); err != nil {
  6319  			return err
  6320  		}
  6321  		if x.NextPageToken == "" {
  6322  			return nil
  6323  		}
  6324  		c.PageToken(x.NextPageToken)
  6325  	}
  6326  }
  6327  
  6328  type SpacesPatchCall struct {
  6329  	s          *Service
  6330  	name       string
  6331  	space      *Space
  6332  	urlParams_ gensupport.URLParams
  6333  	ctx_       context.Context
  6334  	header_    http.Header
  6335  }
  6336  
  6337  // Patch: Updates a space. For an example, see Update a space
  6338  // (https://developers.google.com/workspace/chat/update-spaces). If you're
  6339  // updating the `displayName` field and receive the error message
  6340  // `ALREADY_EXISTS`, try a different display name.. An existing space within
  6341  // the Google Workspace organization might already use this display name.
  6342  // Requires user authentication
  6343  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6344  //
  6345  // - name: Resource name of the space. Format: `spaces/{space}`.
  6346  func (r *SpacesService) Patch(name string, space *Space) *SpacesPatchCall {
  6347  	c := &SpacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6348  	c.name = name
  6349  	c.space = space
  6350  	return c
  6351  }
  6352  
  6353  // UpdateMask sets the optional parameter "updateMask": Required. The updated
  6354  // field paths, comma separated if there are multiple. Currently supported
  6355  // field paths: - `display_name` (Only supports changing the display name of a
  6356  // space with the `SPACE` type, or when also including the `space_type` mask to
  6357  // change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display
  6358  // name of a `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid
  6359  // argument error. If you receive the error message `ALREADY_EXISTS` when
  6360  // updating the `displayName`, try a different `displayName`. An existing space
  6361  // within the Google Workspace organization might already use this display
  6362  // name.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to
  6363  // `SPACE`. Include `display_name` together with `space_type` in the update
  6364  // mask and ensure that the specified space has a non-empty display name and
  6365  // the `SPACE` space type. Including the `space_type` mask and the `SPACE` type
  6366  // in the specified space when updating the display name is optional if the
  6367  // existing space already has the `SPACE` type. Trying to update the space type
  6368  // in other ways results in an invalid argument error). - `space_details` -
  6369  // `space_history_state` (Supports turning history on or off for the space
  6370  // (https://support.google.com/chat/answer/7664687) if the organization allows
  6371  // users to change their history setting
  6372  // (https://support.google.com/a/answer/7664184). Warning: mutually exclusive
  6373  // with all other field paths.) - Developer Preview: `access_settings.audience`
  6374  // (Supports changing the access setting
  6375  // (https://support.google.com/chat/answer/11971020) of a space. If no audience
  6376  // is specified in the access setting, the space's access setting is updated to
  6377  // restricted. Warning: mutually exclusive with all other field paths.)
  6378  func (c *SpacesPatchCall) UpdateMask(updateMask string) *SpacesPatchCall {
  6379  	c.urlParams_.Set("updateMask", updateMask)
  6380  	return c
  6381  }
  6382  
  6383  // Fields allows partial responses to be retrieved. See
  6384  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6385  // details.
  6386  func (c *SpacesPatchCall) Fields(s ...googleapi.Field) *SpacesPatchCall {
  6387  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6388  	return c
  6389  }
  6390  
  6391  // Context sets the context to be used in this call's Do method.
  6392  func (c *SpacesPatchCall) Context(ctx context.Context) *SpacesPatchCall {
  6393  	c.ctx_ = ctx
  6394  	return c
  6395  }
  6396  
  6397  // Header returns a http.Header that can be modified by the caller to add
  6398  // headers to the request.
  6399  func (c *SpacesPatchCall) Header() http.Header {
  6400  	if c.header_ == nil {
  6401  		c.header_ = make(http.Header)
  6402  	}
  6403  	return c.header_
  6404  }
  6405  
  6406  func (c *SpacesPatchCall) doRequest(alt string) (*http.Response, error) {
  6407  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6408  	var body io.Reader = nil
  6409  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.space)
  6410  	if err != nil {
  6411  		return nil, err
  6412  	}
  6413  	c.urlParams_.Set("alt", alt)
  6414  	c.urlParams_.Set("prettyPrint", "false")
  6415  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6416  	urls += "?" + c.urlParams_.Encode()
  6417  	req, err := http.NewRequest("PATCH", urls, body)
  6418  	if err != nil {
  6419  		return nil, err
  6420  	}
  6421  	req.Header = reqHeaders
  6422  	googleapi.Expand(req.URL, map[string]string{
  6423  		"name": c.name,
  6424  	})
  6425  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6426  }
  6427  
  6428  // Do executes the "chat.spaces.patch" call.
  6429  // Any non-2xx status code is an error. Response headers are in either
  6430  // *Space.ServerResponse.Header or (if a response was returned at all) in
  6431  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6432  // whether the returned error was because http.StatusNotModified was returned.
  6433  func (c *SpacesPatchCall) Do(opts ...googleapi.CallOption) (*Space, error) {
  6434  	gensupport.SetOptions(c.urlParams_, opts...)
  6435  	res, err := c.doRequest("json")
  6436  	if res != nil && res.StatusCode == http.StatusNotModified {
  6437  		if res.Body != nil {
  6438  			res.Body.Close()
  6439  		}
  6440  		return nil, gensupport.WrapError(&googleapi.Error{
  6441  			Code:   res.StatusCode,
  6442  			Header: res.Header,
  6443  		})
  6444  	}
  6445  	if err != nil {
  6446  		return nil, err
  6447  	}
  6448  	defer googleapi.CloseBody(res)
  6449  	if err := googleapi.CheckResponse(res); err != nil {
  6450  		return nil, gensupport.WrapError(err)
  6451  	}
  6452  	ret := &Space{
  6453  		ServerResponse: googleapi.ServerResponse{
  6454  			Header:         res.Header,
  6455  			HTTPStatusCode: res.StatusCode,
  6456  		},
  6457  	}
  6458  	target := &ret
  6459  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6460  		return nil, err
  6461  	}
  6462  	return ret, nil
  6463  }
  6464  
  6465  type SpacesSetupCall struct {
  6466  	s                 *Service
  6467  	setupspacerequest *SetUpSpaceRequest
  6468  	urlParams_        gensupport.URLParams
  6469  	ctx_              context.Context
  6470  	header_           http.Header
  6471  }
  6472  
  6473  // Setup: Creates a space and adds specified users to it. The calling user is
  6474  // automatically added to the space, and shouldn't be specified as a membership
  6475  // in the request. For an example, see Set up a space with initial members
  6476  // (https://developers.google.com/workspace/chat/set-up-spaces). To specify the
  6477  // human members to add, add memberships with the appropriate `member.name` in
  6478  // the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where
  6479  // `{user}` can be the email address for the user. For users in the same
  6480  // Workspace organization `{user}` can also be the `id` for the person from the
  6481  // People API, or the `id` for the user in the Directory API. For example, if
  6482  // the People API Person profile ID for `user@example.com` is `123456789`, you
  6483  // can add the user to the space by setting the `membership.member.name` to
  6484  // `users/user@example.com` or `users/123456789`. For a space or group chat, if
  6485  // the caller blocks or is blocked by some members, then those members aren't
  6486  // added to the created space. To create a direct message (DM) between the
  6487  // calling user and another human user, specify exactly one membership to
  6488  // represent the human user. If one user blocks the other, the request fails
  6489  // and the DM isn't created. To create a DM between the calling user and the
  6490  // calling app, set `Space.singleUserBotDm` to `true` and don't specify any
  6491  // memberships. You can only use this method to set up a DM with the calling
  6492  // app. To add the calling app as a member of a space or an existing DM between
  6493  // two human users, see Invite or add a user or app to a space
  6494  // (https://developers.google.com/workspace/chat/create-members). If a DM
  6495  // already exists between two users, even when one user blocks the other at the
  6496  // time a request is made, then the existing DM is returned. Spaces with
  6497  // threaded replies aren't supported. If you receive the error message
  6498  // `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An
  6499  // existing space within the Google Workspace organization might already use
  6500  // this display name. Requires user authentication
  6501  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6502  func (r *SpacesService) Setup(setupspacerequest *SetUpSpaceRequest) *SpacesSetupCall {
  6503  	c := &SpacesSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6504  	c.setupspacerequest = setupspacerequest
  6505  	return c
  6506  }
  6507  
  6508  // Fields allows partial responses to be retrieved. See
  6509  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6510  // details.
  6511  func (c *SpacesSetupCall) Fields(s ...googleapi.Field) *SpacesSetupCall {
  6512  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6513  	return c
  6514  }
  6515  
  6516  // Context sets the context to be used in this call's Do method.
  6517  func (c *SpacesSetupCall) Context(ctx context.Context) *SpacesSetupCall {
  6518  	c.ctx_ = ctx
  6519  	return c
  6520  }
  6521  
  6522  // Header returns a http.Header that can be modified by the caller to add
  6523  // headers to the request.
  6524  func (c *SpacesSetupCall) Header() http.Header {
  6525  	if c.header_ == nil {
  6526  		c.header_ = make(http.Header)
  6527  	}
  6528  	return c.header_
  6529  }
  6530  
  6531  func (c *SpacesSetupCall) doRequest(alt string) (*http.Response, error) {
  6532  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6533  	var body io.Reader = nil
  6534  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setupspacerequest)
  6535  	if err != nil {
  6536  		return nil, err
  6537  	}
  6538  	c.urlParams_.Set("alt", alt)
  6539  	c.urlParams_.Set("prettyPrint", "false")
  6540  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/spaces:setup")
  6541  	urls += "?" + c.urlParams_.Encode()
  6542  	req, err := http.NewRequest("POST", urls, body)
  6543  	if err != nil {
  6544  		return nil, err
  6545  	}
  6546  	req.Header = reqHeaders
  6547  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6548  }
  6549  
  6550  // Do executes the "chat.spaces.setup" call.
  6551  // Any non-2xx status code is an error. Response headers are in either
  6552  // *Space.ServerResponse.Header or (if a response was returned at all) in
  6553  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6554  // whether the returned error was because http.StatusNotModified was returned.
  6555  func (c *SpacesSetupCall) Do(opts ...googleapi.CallOption) (*Space, error) {
  6556  	gensupport.SetOptions(c.urlParams_, opts...)
  6557  	res, err := c.doRequest("json")
  6558  	if res != nil && res.StatusCode == http.StatusNotModified {
  6559  		if res.Body != nil {
  6560  			res.Body.Close()
  6561  		}
  6562  		return nil, gensupport.WrapError(&googleapi.Error{
  6563  			Code:   res.StatusCode,
  6564  			Header: res.Header,
  6565  		})
  6566  	}
  6567  	if err != nil {
  6568  		return nil, err
  6569  	}
  6570  	defer googleapi.CloseBody(res)
  6571  	if err := googleapi.CheckResponse(res); err != nil {
  6572  		return nil, gensupport.WrapError(err)
  6573  	}
  6574  	ret := &Space{
  6575  		ServerResponse: googleapi.ServerResponse{
  6576  			Header:         res.Header,
  6577  			HTTPStatusCode: res.StatusCode,
  6578  		},
  6579  	}
  6580  	target := &ret
  6581  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6582  		return nil, err
  6583  	}
  6584  	return ret, nil
  6585  }
  6586  
  6587  type SpacesMembersCreateCall struct {
  6588  	s          *Service
  6589  	parent     string
  6590  	membership *Membership
  6591  	urlParams_ gensupport.URLParams
  6592  	ctx_       context.Context
  6593  	header_    http.Header
  6594  }
  6595  
  6596  // Create: Creates a human membership or app membership for the calling app.
  6597  // Creating memberships for other apps isn't supported. For an example, see
  6598  // Invite or add a user or a Google Chat app to a space
  6599  // (https://developers.google.com/workspace/chat/create-members). When creating
  6600  // a membership, if the specified member has their auto-accept policy turned
  6601  // off, then they're invited, and must accept the space invitation before
  6602  // joining. Otherwise, creating a membership adds the member directly to the
  6603  // specified space. Requires user authentication
  6604  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6605  // To specify the member to add, set the `membership.member.name` in the
  6606  // `CreateMembershipRequest`: - To add the calling app to a space or a direct
  6607  // message between two human users, use `users/app`. Unable to add other apps
  6608  // to the space. - To add a human user, use `users/{user}`, where `{user}` can
  6609  // be the email address for the user. For users in the same Workspace
  6610  // organization `{user}` can also be the `id` for the person from the People
  6611  // API, or the `id` for the user in the Directory API. For example, if the
  6612  // People API Person profile ID for `user@example.com` is `123456789`, you can
  6613  // add the user to the space by setting the `membership.member.name` to
  6614  // `users/user@example.com` or `users/123456789`.
  6615  //
  6616  //   - parent: The resource name of the space for which to create the membership.
  6617  //     Format: spaces/{space}.
  6618  func (r *SpacesMembersService) Create(parent string, membership *Membership) *SpacesMembersCreateCall {
  6619  	c := &SpacesMembersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6620  	c.parent = parent
  6621  	c.membership = membership
  6622  	return c
  6623  }
  6624  
  6625  // Fields allows partial responses to be retrieved. See
  6626  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6627  // details.
  6628  func (c *SpacesMembersCreateCall) Fields(s ...googleapi.Field) *SpacesMembersCreateCall {
  6629  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6630  	return c
  6631  }
  6632  
  6633  // Context sets the context to be used in this call's Do method.
  6634  func (c *SpacesMembersCreateCall) Context(ctx context.Context) *SpacesMembersCreateCall {
  6635  	c.ctx_ = ctx
  6636  	return c
  6637  }
  6638  
  6639  // Header returns a http.Header that can be modified by the caller to add
  6640  // headers to the request.
  6641  func (c *SpacesMembersCreateCall) Header() http.Header {
  6642  	if c.header_ == nil {
  6643  		c.header_ = make(http.Header)
  6644  	}
  6645  	return c.header_
  6646  }
  6647  
  6648  func (c *SpacesMembersCreateCall) doRequest(alt string) (*http.Response, error) {
  6649  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6650  	var body io.Reader = nil
  6651  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.membership)
  6652  	if err != nil {
  6653  		return nil, err
  6654  	}
  6655  	c.urlParams_.Set("alt", alt)
  6656  	c.urlParams_.Set("prettyPrint", "false")
  6657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/members")
  6658  	urls += "?" + c.urlParams_.Encode()
  6659  	req, err := http.NewRequest("POST", urls, body)
  6660  	if err != nil {
  6661  		return nil, err
  6662  	}
  6663  	req.Header = reqHeaders
  6664  	googleapi.Expand(req.URL, map[string]string{
  6665  		"parent": c.parent,
  6666  	})
  6667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6668  }
  6669  
  6670  // Do executes the "chat.spaces.members.create" call.
  6671  // Any non-2xx status code is an error. Response headers are in either
  6672  // *Membership.ServerResponse.Header or (if a response was returned at all) in
  6673  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6674  // whether the returned error was because http.StatusNotModified was returned.
  6675  func (c *SpacesMembersCreateCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
  6676  	gensupport.SetOptions(c.urlParams_, opts...)
  6677  	res, err := c.doRequest("json")
  6678  	if res != nil && res.StatusCode == http.StatusNotModified {
  6679  		if res.Body != nil {
  6680  			res.Body.Close()
  6681  		}
  6682  		return nil, gensupport.WrapError(&googleapi.Error{
  6683  			Code:   res.StatusCode,
  6684  			Header: res.Header,
  6685  		})
  6686  	}
  6687  	if err != nil {
  6688  		return nil, err
  6689  	}
  6690  	defer googleapi.CloseBody(res)
  6691  	if err := googleapi.CheckResponse(res); err != nil {
  6692  		return nil, gensupport.WrapError(err)
  6693  	}
  6694  	ret := &Membership{
  6695  		ServerResponse: googleapi.ServerResponse{
  6696  			Header:         res.Header,
  6697  			HTTPStatusCode: res.StatusCode,
  6698  		},
  6699  	}
  6700  	target := &ret
  6701  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6702  		return nil, err
  6703  	}
  6704  	return ret, nil
  6705  }
  6706  
  6707  type SpacesMembersDeleteCall struct {
  6708  	s          *Service
  6709  	name       string
  6710  	urlParams_ gensupport.URLParams
  6711  	ctx_       context.Context
  6712  	header_    http.Header
  6713  }
  6714  
  6715  // Delete: Deletes a membership. For an example, see Remove a user or a Google
  6716  // Chat app from a space
  6717  // (https://developers.google.com/workspace/chat/delete-members). Requires user
  6718  // authentication
  6719  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6720  //
  6721  //   - name: Resource name of the membership to delete. Chat apps can delete
  6722  //     human users' or their own memberships. Chat apps can't delete other apps'
  6723  //     memberships. When deleting a human membership, requires the
  6724  //     `chat.memberships` scope and `spaces/{space}/members/{member}` format. You
  6725  //     can use the email as an alias for `{member}`. For example,
  6726  //     `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is
  6727  //     the email of the Google Chat user. When deleting an app membership,
  6728  //     requires the `chat.memberships.app` scope and `spaces/{space}/members/app`
  6729  //     format. Format: `spaces/{space}/members/{member}` or
  6730  //     `spaces/{space}/members/app`.
  6731  func (r *SpacesMembersService) Delete(name string) *SpacesMembersDeleteCall {
  6732  	c := &SpacesMembersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6733  	c.name = name
  6734  	return c
  6735  }
  6736  
  6737  // Fields allows partial responses to be retrieved. See
  6738  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6739  // details.
  6740  func (c *SpacesMembersDeleteCall) Fields(s ...googleapi.Field) *SpacesMembersDeleteCall {
  6741  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6742  	return c
  6743  }
  6744  
  6745  // Context sets the context to be used in this call's Do method.
  6746  func (c *SpacesMembersDeleteCall) Context(ctx context.Context) *SpacesMembersDeleteCall {
  6747  	c.ctx_ = ctx
  6748  	return c
  6749  }
  6750  
  6751  // Header returns a http.Header that can be modified by the caller to add
  6752  // headers to the request.
  6753  func (c *SpacesMembersDeleteCall) Header() http.Header {
  6754  	if c.header_ == nil {
  6755  		c.header_ = make(http.Header)
  6756  	}
  6757  	return c.header_
  6758  }
  6759  
  6760  func (c *SpacesMembersDeleteCall) doRequest(alt string) (*http.Response, error) {
  6761  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6762  	var body io.Reader = nil
  6763  	c.urlParams_.Set("alt", alt)
  6764  	c.urlParams_.Set("prettyPrint", "false")
  6765  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6766  	urls += "?" + c.urlParams_.Encode()
  6767  	req, err := http.NewRequest("DELETE", urls, body)
  6768  	if err != nil {
  6769  		return nil, err
  6770  	}
  6771  	req.Header = reqHeaders
  6772  	googleapi.Expand(req.URL, map[string]string{
  6773  		"name": c.name,
  6774  	})
  6775  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6776  }
  6777  
  6778  // Do executes the "chat.spaces.members.delete" call.
  6779  // Any non-2xx status code is an error. Response headers are in either
  6780  // *Membership.ServerResponse.Header or (if a response was returned at all) in
  6781  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6782  // whether the returned error was because http.StatusNotModified was returned.
  6783  func (c *SpacesMembersDeleteCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
  6784  	gensupport.SetOptions(c.urlParams_, opts...)
  6785  	res, err := c.doRequest("json")
  6786  	if res != nil && res.StatusCode == http.StatusNotModified {
  6787  		if res.Body != nil {
  6788  			res.Body.Close()
  6789  		}
  6790  		return nil, gensupport.WrapError(&googleapi.Error{
  6791  			Code:   res.StatusCode,
  6792  			Header: res.Header,
  6793  		})
  6794  	}
  6795  	if err != nil {
  6796  		return nil, err
  6797  	}
  6798  	defer googleapi.CloseBody(res)
  6799  	if err := googleapi.CheckResponse(res); err != nil {
  6800  		return nil, gensupport.WrapError(err)
  6801  	}
  6802  	ret := &Membership{
  6803  		ServerResponse: googleapi.ServerResponse{
  6804  			Header:         res.Header,
  6805  			HTTPStatusCode: res.StatusCode,
  6806  		},
  6807  	}
  6808  	target := &ret
  6809  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6810  		return nil, err
  6811  	}
  6812  	return ret, nil
  6813  }
  6814  
  6815  type SpacesMembersGetCall struct {
  6816  	s            *Service
  6817  	name         string
  6818  	urlParams_   gensupport.URLParams
  6819  	ifNoneMatch_ string
  6820  	ctx_         context.Context
  6821  	header_      http.Header
  6822  }
  6823  
  6824  // Get: Returns details about a membership. For an example, see Get details
  6825  // about a user's or Google Chat app's membership
  6826  // (https://developers.google.com/workspace/chat/get-members). Requires
  6827  // authentication
  6828  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  6829  // Supports app authentication
  6830  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  6831  // and user authentication
  6832  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6833  //
  6834  //   - name: Resource name of the membership to retrieve. To get the app's own
  6835  //     membership by using user authentication
  6836  //     (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  6837  //     you can optionally use `spaces/{space}/members/app`. Format:
  6838  //     `spaces/{space}/members/{member}` or `spaces/{space}/members/app` When
  6839  //     authenticated as a user
  6840  //     (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  6841  //     you can use the user's email as an alias for `{member}`. For example,
  6842  //     `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is
  6843  //     the email of the Google Chat user.
  6844  func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall {
  6845  	c := &SpacesMembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6846  	c.name = name
  6847  	return c
  6848  }
  6849  
  6850  // Fields allows partial responses to be retrieved. See
  6851  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6852  // details.
  6853  func (c *SpacesMembersGetCall) Fields(s ...googleapi.Field) *SpacesMembersGetCall {
  6854  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6855  	return c
  6856  }
  6857  
  6858  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6859  // object's ETag matches the given value. This is useful for getting updates
  6860  // only after the object has changed since the last request.
  6861  func (c *SpacesMembersGetCall) IfNoneMatch(entityTag string) *SpacesMembersGetCall {
  6862  	c.ifNoneMatch_ = entityTag
  6863  	return c
  6864  }
  6865  
  6866  // Context sets the context to be used in this call's Do method.
  6867  func (c *SpacesMembersGetCall) Context(ctx context.Context) *SpacesMembersGetCall {
  6868  	c.ctx_ = ctx
  6869  	return c
  6870  }
  6871  
  6872  // Header returns a http.Header that can be modified by the caller to add
  6873  // headers to the request.
  6874  func (c *SpacesMembersGetCall) Header() http.Header {
  6875  	if c.header_ == nil {
  6876  		c.header_ = make(http.Header)
  6877  	}
  6878  	return c.header_
  6879  }
  6880  
  6881  func (c *SpacesMembersGetCall) doRequest(alt string) (*http.Response, error) {
  6882  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6883  	if c.ifNoneMatch_ != "" {
  6884  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6885  	}
  6886  	var body io.Reader = nil
  6887  	c.urlParams_.Set("alt", alt)
  6888  	c.urlParams_.Set("prettyPrint", "false")
  6889  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6890  	urls += "?" + c.urlParams_.Encode()
  6891  	req, err := http.NewRequest("GET", urls, body)
  6892  	if err != nil {
  6893  		return nil, err
  6894  	}
  6895  	req.Header = reqHeaders
  6896  	googleapi.Expand(req.URL, map[string]string{
  6897  		"name": c.name,
  6898  	})
  6899  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6900  }
  6901  
  6902  // Do executes the "chat.spaces.members.get" call.
  6903  // Any non-2xx status code is an error. Response headers are in either
  6904  // *Membership.ServerResponse.Header or (if a response was returned at all) in
  6905  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6906  // whether the returned error was because http.StatusNotModified was returned.
  6907  func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
  6908  	gensupport.SetOptions(c.urlParams_, opts...)
  6909  	res, err := c.doRequest("json")
  6910  	if res != nil && res.StatusCode == http.StatusNotModified {
  6911  		if res.Body != nil {
  6912  			res.Body.Close()
  6913  		}
  6914  		return nil, gensupport.WrapError(&googleapi.Error{
  6915  			Code:   res.StatusCode,
  6916  			Header: res.Header,
  6917  		})
  6918  	}
  6919  	if err != nil {
  6920  		return nil, err
  6921  	}
  6922  	defer googleapi.CloseBody(res)
  6923  	if err := googleapi.CheckResponse(res); err != nil {
  6924  		return nil, gensupport.WrapError(err)
  6925  	}
  6926  	ret := &Membership{
  6927  		ServerResponse: googleapi.ServerResponse{
  6928  			Header:         res.Header,
  6929  			HTTPStatusCode: res.StatusCode,
  6930  		},
  6931  	}
  6932  	target := &ret
  6933  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6934  		return nil, err
  6935  	}
  6936  	return ret, nil
  6937  }
  6938  
  6939  type SpacesMembersListCall struct {
  6940  	s            *Service
  6941  	parent       string
  6942  	urlParams_   gensupport.URLParams
  6943  	ifNoneMatch_ string
  6944  	ctx_         context.Context
  6945  	header_      http.Header
  6946  }
  6947  
  6948  // List: Lists memberships in a space. For an example, see List users and
  6949  // Google Chat apps in a space
  6950  // (https://developers.google.com/workspace/chat/list-members). Listing
  6951  // memberships with app authentication
  6952  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  6953  // lists memberships in spaces that the Chat app has access to, but excludes
  6954  // Chat app memberships, including its own. Listing memberships with User
  6955  // authentication
  6956  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
  6957  // lists memberships in spaces that the authenticated user has access to.
  6958  // Requires authentication
  6959  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  6960  // Supports app authentication
  6961  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  6962  // and user authentication
  6963  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  6964  //
  6965  //   - parent: The resource name of the space for which to fetch a membership
  6966  //     list. Format: spaces/{space}.
  6967  func (r *SpacesMembersService) List(parent string) *SpacesMembersListCall {
  6968  	c := &SpacesMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6969  	c.parent = parent
  6970  	return c
  6971  }
  6972  
  6973  // Filter sets the optional parameter "filter": A query filter. You can filter
  6974  // memberships by a member's role (`role`
  6975  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
  6976  // and type (`member.type`
  6977  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
  6978  // To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter
  6979  // by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and
  6980  // type, use the `AND` operator. To filter by either role or type, use the `OR`
  6981  // operator. For example, the following queries are valid: ``` role =
  6982  // "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role =
  6983  // "ROLE_MANAGER" ``` The following queries are invalid: ``` member.type =
  6984  // "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND role =
  6985  // "ROLE_MEMBER" ``` Invalid queries are rejected by the server with an
  6986  // `INVALID_ARGUMENT` error.
  6987  func (c *SpacesMembersListCall) Filter(filter string) *SpacesMembersListCall {
  6988  	c.urlParams_.Set("filter", filter)
  6989  	return c
  6990  }
  6991  
  6992  // PageSize sets the optional parameter "pageSize": The maximum number of
  6993  // memberships to return. The service might return fewer than this value. If
  6994  // unspecified, at most 100 memberships are returned. The maximum value is
  6995  // 1000. If you use a value more than 1000, it's automatically changed to 1000.
  6996  // Negative values return an `INVALID_ARGUMENT` error.
  6997  func (c *SpacesMembersListCall) PageSize(pageSize int64) *SpacesMembersListCall {
  6998  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6999  	return c
  7000  }
  7001  
  7002  // PageToken sets the optional parameter "pageToken": A page token, received
  7003  // from a previous call to list memberships. Provide this parameter to retrieve
  7004  // the subsequent page. When paginating, all other parameters provided should
  7005  // match the call that provided the page token. Passing different values to the
  7006  // other parameters might lead to unexpected results.
  7007  func (c *SpacesMembersListCall) PageToken(pageToken string) *SpacesMembersListCall {
  7008  	c.urlParams_.Set("pageToken", pageToken)
  7009  	return c
  7010  }
  7011  
  7012  // ShowGroups sets the optional parameter "showGroups": When `true`, also
  7013  // returns memberships associated with a Google Group, in addition to other
  7014  // types of memberships. If a filter is set, Google Group memberships that
  7015  // don't match the filter criteria aren't returned.
  7016  func (c *SpacesMembersListCall) ShowGroups(showGroups bool) *SpacesMembersListCall {
  7017  	c.urlParams_.Set("showGroups", fmt.Sprint(showGroups))
  7018  	return c
  7019  }
  7020  
  7021  // ShowInvited sets the optional parameter "showInvited": When `true`, also
  7022  // returns memberships associated with invited members, in addition to other
  7023  // types of memberships. If a filter is set, invited memberships that don't
  7024  // match the filter criteria aren't returned. Currently requires user
  7025  // authentication
  7026  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7027  func (c *SpacesMembersListCall) ShowInvited(showInvited bool) *SpacesMembersListCall {
  7028  	c.urlParams_.Set("showInvited", fmt.Sprint(showInvited))
  7029  	return c
  7030  }
  7031  
  7032  // Fields allows partial responses to be retrieved. See
  7033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7034  // details.
  7035  func (c *SpacesMembersListCall) Fields(s ...googleapi.Field) *SpacesMembersListCall {
  7036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7037  	return c
  7038  }
  7039  
  7040  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7041  // object's ETag matches the given value. This is useful for getting updates
  7042  // only after the object has changed since the last request.
  7043  func (c *SpacesMembersListCall) IfNoneMatch(entityTag string) *SpacesMembersListCall {
  7044  	c.ifNoneMatch_ = entityTag
  7045  	return c
  7046  }
  7047  
  7048  // Context sets the context to be used in this call's Do method.
  7049  func (c *SpacesMembersListCall) Context(ctx context.Context) *SpacesMembersListCall {
  7050  	c.ctx_ = ctx
  7051  	return c
  7052  }
  7053  
  7054  // Header returns a http.Header that can be modified by the caller to add
  7055  // headers to the request.
  7056  func (c *SpacesMembersListCall) Header() http.Header {
  7057  	if c.header_ == nil {
  7058  		c.header_ = make(http.Header)
  7059  	}
  7060  	return c.header_
  7061  }
  7062  
  7063  func (c *SpacesMembersListCall) doRequest(alt string) (*http.Response, error) {
  7064  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7065  	if c.ifNoneMatch_ != "" {
  7066  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7067  	}
  7068  	var body io.Reader = nil
  7069  	c.urlParams_.Set("alt", alt)
  7070  	c.urlParams_.Set("prettyPrint", "false")
  7071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/members")
  7072  	urls += "?" + c.urlParams_.Encode()
  7073  	req, err := http.NewRequest("GET", urls, body)
  7074  	if err != nil {
  7075  		return nil, err
  7076  	}
  7077  	req.Header = reqHeaders
  7078  	googleapi.Expand(req.URL, map[string]string{
  7079  		"parent": c.parent,
  7080  	})
  7081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7082  }
  7083  
  7084  // Do executes the "chat.spaces.members.list" call.
  7085  // Any non-2xx status code is an error. Response headers are in either
  7086  // *ListMembershipsResponse.ServerResponse.Header or (if a response was
  7087  // returned at all) in error.(*googleapi.Error).Header. Use
  7088  // googleapi.IsNotModified to check whether the returned error was because
  7089  // http.StatusNotModified was returned.
  7090  func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
  7091  	gensupport.SetOptions(c.urlParams_, opts...)
  7092  	res, err := c.doRequest("json")
  7093  	if res != nil && res.StatusCode == http.StatusNotModified {
  7094  		if res.Body != nil {
  7095  			res.Body.Close()
  7096  		}
  7097  		return nil, gensupport.WrapError(&googleapi.Error{
  7098  			Code:   res.StatusCode,
  7099  			Header: res.Header,
  7100  		})
  7101  	}
  7102  	if err != nil {
  7103  		return nil, err
  7104  	}
  7105  	defer googleapi.CloseBody(res)
  7106  	if err := googleapi.CheckResponse(res); err != nil {
  7107  		return nil, gensupport.WrapError(err)
  7108  	}
  7109  	ret := &ListMembershipsResponse{
  7110  		ServerResponse: googleapi.ServerResponse{
  7111  			Header:         res.Header,
  7112  			HTTPStatusCode: res.StatusCode,
  7113  		},
  7114  	}
  7115  	target := &ret
  7116  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7117  		return nil, err
  7118  	}
  7119  	return ret, nil
  7120  }
  7121  
  7122  // Pages invokes f for each page of results.
  7123  // A non-nil error returned from f will halt the iteration.
  7124  // The provided context supersedes any context provided to the Context method.
  7125  func (c *SpacesMembersListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
  7126  	c.ctx_ = ctx
  7127  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7128  	for {
  7129  		x, err := c.Do()
  7130  		if err != nil {
  7131  			return err
  7132  		}
  7133  		if err := f(x); err != nil {
  7134  			return err
  7135  		}
  7136  		if x.NextPageToken == "" {
  7137  			return nil
  7138  		}
  7139  		c.PageToken(x.NextPageToken)
  7140  	}
  7141  }
  7142  
  7143  type SpacesMembersPatchCall struct {
  7144  	s          *Service
  7145  	name       string
  7146  	membership *Membership
  7147  	urlParams_ gensupport.URLParams
  7148  	ctx_       context.Context
  7149  	header_    http.Header
  7150  }
  7151  
  7152  // Patch: Updates a membership. For an example, see Update a user's membership
  7153  // in a space (https://developers.google.com/workspace/chat/update-members).
  7154  // Requires user authentication
  7155  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7156  //
  7157  //   - name: Resource name of the membership, assigned by the server. Format:
  7158  //     `spaces/{space}/members/{member}`.
  7159  func (r *SpacesMembersService) Patch(name string, membership *Membership) *SpacesMembersPatchCall {
  7160  	c := &SpacesMembersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7161  	c.name = name
  7162  	c.membership = membership
  7163  	return c
  7164  }
  7165  
  7166  // UpdateMask sets the optional parameter "updateMask": Required. The field
  7167  // paths to update. Separate multiple values with commas or use `*` to update
  7168  // all field paths. Currently supported field paths: - `role`
  7169  func (c *SpacesMembersPatchCall) UpdateMask(updateMask string) *SpacesMembersPatchCall {
  7170  	c.urlParams_.Set("updateMask", updateMask)
  7171  	return c
  7172  }
  7173  
  7174  // Fields allows partial responses to be retrieved. See
  7175  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7176  // details.
  7177  func (c *SpacesMembersPatchCall) Fields(s ...googleapi.Field) *SpacesMembersPatchCall {
  7178  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7179  	return c
  7180  }
  7181  
  7182  // Context sets the context to be used in this call's Do method.
  7183  func (c *SpacesMembersPatchCall) Context(ctx context.Context) *SpacesMembersPatchCall {
  7184  	c.ctx_ = ctx
  7185  	return c
  7186  }
  7187  
  7188  // Header returns a http.Header that can be modified by the caller to add
  7189  // headers to the request.
  7190  func (c *SpacesMembersPatchCall) Header() http.Header {
  7191  	if c.header_ == nil {
  7192  		c.header_ = make(http.Header)
  7193  	}
  7194  	return c.header_
  7195  }
  7196  
  7197  func (c *SpacesMembersPatchCall) doRequest(alt string) (*http.Response, error) {
  7198  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7199  	var body io.Reader = nil
  7200  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.membership)
  7201  	if err != nil {
  7202  		return nil, err
  7203  	}
  7204  	c.urlParams_.Set("alt", alt)
  7205  	c.urlParams_.Set("prettyPrint", "false")
  7206  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7207  	urls += "?" + c.urlParams_.Encode()
  7208  	req, err := http.NewRequest("PATCH", urls, body)
  7209  	if err != nil {
  7210  		return nil, err
  7211  	}
  7212  	req.Header = reqHeaders
  7213  	googleapi.Expand(req.URL, map[string]string{
  7214  		"name": c.name,
  7215  	})
  7216  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7217  }
  7218  
  7219  // Do executes the "chat.spaces.members.patch" call.
  7220  // Any non-2xx status code is an error. Response headers are in either
  7221  // *Membership.ServerResponse.Header or (if a response was returned at all) in
  7222  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7223  // whether the returned error was because http.StatusNotModified was returned.
  7224  func (c *SpacesMembersPatchCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
  7225  	gensupport.SetOptions(c.urlParams_, opts...)
  7226  	res, err := c.doRequest("json")
  7227  	if res != nil && res.StatusCode == http.StatusNotModified {
  7228  		if res.Body != nil {
  7229  			res.Body.Close()
  7230  		}
  7231  		return nil, gensupport.WrapError(&googleapi.Error{
  7232  			Code:   res.StatusCode,
  7233  			Header: res.Header,
  7234  		})
  7235  	}
  7236  	if err != nil {
  7237  		return nil, err
  7238  	}
  7239  	defer googleapi.CloseBody(res)
  7240  	if err := googleapi.CheckResponse(res); err != nil {
  7241  		return nil, gensupport.WrapError(err)
  7242  	}
  7243  	ret := &Membership{
  7244  		ServerResponse: googleapi.ServerResponse{
  7245  			Header:         res.Header,
  7246  			HTTPStatusCode: res.StatusCode,
  7247  		},
  7248  	}
  7249  	target := &ret
  7250  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7251  		return nil, err
  7252  	}
  7253  	return ret, nil
  7254  }
  7255  
  7256  type SpacesMessagesCreateCall struct {
  7257  	s          *Service
  7258  	parent     string
  7259  	message    *Message
  7260  	urlParams_ gensupport.URLParams
  7261  	ctx_       context.Context
  7262  	header_    http.Header
  7263  }
  7264  
  7265  // Create: Creates a message in a Google Chat space. The maximum message size,
  7266  // including text and cards, is 32,000 bytes. For an example, see Send a
  7267  // message (https://developers.google.com/workspace/chat/create-messages).
  7268  // Calling this method requires authentication
  7269  // (https://developers.google.com/workspace/chat/authenticate-authorize) and
  7270  // supports the following authentication types: - For text messages, user
  7271  // authentication or app authentication are supported. - For card messages,
  7272  // only app authentication is supported. (Only Chat apps can create card
  7273  // messages.)
  7274  //
  7275  //   - parent: The resource name of the space in which to create a message.
  7276  //     Format: `spaces/{space}`.
  7277  func (r *SpacesMessagesService) Create(parent string, message *Message) *SpacesMessagesCreateCall {
  7278  	c := &SpacesMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7279  	c.parent = parent
  7280  	c.message = message
  7281  	return c
  7282  }
  7283  
  7284  // MessageId sets the optional parameter "messageId": A custom ID for a
  7285  // message. Lets Chat apps get, update, or delete a message without needing to
  7286  // store the system-assigned ID in the message's resource name (represented in
  7287  // the message `name` field). The value for this field must meet the following
  7288  // requirements: * Begins with `client-`. For example, `client-custom-name` is
  7289  // a valid custom ID, but `custom-name` is not. * Contains up to 63 characters
  7290  // and only lowercase letters, numbers, and hyphens. * Is unique within a
  7291  // space. A Chat app can't use the same custom ID for different messages. For
  7292  // details, see Name a message
  7293  // (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  7294  func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCreateCall {
  7295  	c.urlParams_.Set("messageId", messageId)
  7296  	return c
  7297  }
  7298  
  7299  // MessageReplyOption sets the optional parameter "messageReplyOption":
  7300  // Specifies whether a message starts a thread or replies to one. Only
  7301  // supported in named spaces.
  7302  //
  7303  // Possible values:
  7304  //
  7305  //	"MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a new thread. Using
  7306  //
  7307  // this option ignores any thread ID or `thread_key` that's included.
  7308  //
  7309  //	"REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a reply to
  7310  //
  7311  // the thread specified by thread ID or `thread_key`. If it fails, the message
  7312  // starts a new thread instead.
  7313  //
  7314  //	"REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the thread
  7315  //
  7316  // specified by thread ID or `thread_key`. If a new `thread_key` is used, a new
  7317  // thread is created. If the message creation fails, a `NOT_FOUND` error is
  7318  // returned instead.
  7319  func (c *SpacesMessagesCreateCall) MessageReplyOption(messageReplyOption string) *SpacesMessagesCreateCall {
  7320  	c.urlParams_.Set("messageReplyOption", messageReplyOption)
  7321  	return c
  7322  }
  7323  
  7324  // RequestId sets the optional parameter "requestId": A unique request ID for
  7325  // this message. Specifying an existing request ID returns the message created
  7326  // with that ID instead of creating a new message.
  7327  func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCreateCall {
  7328  	c.urlParams_.Set("requestId", requestId)
  7329  	return c
  7330  }
  7331  
  7332  // ThreadKey sets the optional parameter "threadKey": Deprecated: Use
  7333  // thread.thread_key instead. ID for the thread. Supports up to 4000
  7334  // characters. To start or add to a thread, create a message and specify a
  7335  // `threadKey` or the thread.name. For example usage, see Start or reply to a
  7336  // message thread
  7337  // (https://developers.google.com/workspace/chat/create-messages#create-message-thread).
  7338  func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall {
  7339  	c.urlParams_.Set("threadKey", threadKey)
  7340  	return c
  7341  }
  7342  
  7343  // Fields allows partial responses to be retrieved. See
  7344  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7345  // details.
  7346  func (c *SpacesMessagesCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesCreateCall {
  7347  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7348  	return c
  7349  }
  7350  
  7351  // Context sets the context to be used in this call's Do method.
  7352  func (c *SpacesMessagesCreateCall) Context(ctx context.Context) *SpacesMessagesCreateCall {
  7353  	c.ctx_ = ctx
  7354  	return c
  7355  }
  7356  
  7357  // Header returns a http.Header that can be modified by the caller to add
  7358  // headers to the request.
  7359  func (c *SpacesMessagesCreateCall) Header() http.Header {
  7360  	if c.header_ == nil {
  7361  		c.header_ = make(http.Header)
  7362  	}
  7363  	return c.header_
  7364  }
  7365  
  7366  func (c *SpacesMessagesCreateCall) doRequest(alt string) (*http.Response, error) {
  7367  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7368  	var body io.Reader = nil
  7369  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
  7370  	if err != nil {
  7371  		return nil, err
  7372  	}
  7373  	c.urlParams_.Set("alt", alt)
  7374  	c.urlParams_.Set("prettyPrint", "false")
  7375  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages")
  7376  	urls += "?" + c.urlParams_.Encode()
  7377  	req, err := http.NewRequest("POST", urls, body)
  7378  	if err != nil {
  7379  		return nil, err
  7380  	}
  7381  	req.Header = reqHeaders
  7382  	googleapi.Expand(req.URL, map[string]string{
  7383  		"parent": c.parent,
  7384  	})
  7385  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7386  }
  7387  
  7388  // Do executes the "chat.spaces.messages.create" call.
  7389  // Any non-2xx status code is an error. Response headers are in either
  7390  // *Message.ServerResponse.Header or (if a response was returned at all) in
  7391  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7392  // whether the returned error was because http.StatusNotModified was returned.
  7393  func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  7394  	gensupport.SetOptions(c.urlParams_, opts...)
  7395  	res, err := c.doRequest("json")
  7396  	if res != nil && res.StatusCode == http.StatusNotModified {
  7397  		if res.Body != nil {
  7398  			res.Body.Close()
  7399  		}
  7400  		return nil, gensupport.WrapError(&googleapi.Error{
  7401  			Code:   res.StatusCode,
  7402  			Header: res.Header,
  7403  		})
  7404  	}
  7405  	if err != nil {
  7406  		return nil, err
  7407  	}
  7408  	defer googleapi.CloseBody(res)
  7409  	if err := googleapi.CheckResponse(res); err != nil {
  7410  		return nil, gensupport.WrapError(err)
  7411  	}
  7412  	ret := &Message{
  7413  		ServerResponse: googleapi.ServerResponse{
  7414  			Header:         res.Header,
  7415  			HTTPStatusCode: res.StatusCode,
  7416  		},
  7417  	}
  7418  	target := &ret
  7419  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7420  		return nil, err
  7421  	}
  7422  	return ret, nil
  7423  }
  7424  
  7425  type SpacesMessagesDeleteCall struct {
  7426  	s          *Service
  7427  	name       string
  7428  	urlParams_ gensupport.URLParams
  7429  	ctx_       context.Context
  7430  	header_    http.Header
  7431  }
  7432  
  7433  // Delete: Deletes a message. For an example, see Delete a message
  7434  // (https://developers.google.com/workspace/chat/delete-messages). Requires
  7435  // authentication
  7436  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  7437  // Supports app authentication
  7438  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  7439  // and user authentication
  7440  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7441  // When using app authentication, requests can only delete messages created by
  7442  // the calling Chat app.
  7443  //
  7444  //   - name: Resource name of the message. Format:
  7445  //     `spaces/{space}/messages/{message}` If you've set a custom ID for your
  7446  //     message, you can use the value from the `clientAssignedMessageId` field
  7447  //     for `{message}`. For details, see [Name a message]
  7448  //     (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  7449  func (r *SpacesMessagesService) Delete(name string) *SpacesMessagesDeleteCall {
  7450  	c := &SpacesMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7451  	c.name = name
  7452  	return c
  7453  }
  7454  
  7455  // Force sets the optional parameter "force": When `true`, deleting a message
  7456  // also deletes its threaded replies. When `false`, if a message has threaded
  7457  // replies, deletion fails. Only applies when authenticating as a user
  7458  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7459  // Has no effect when [authenticating as a Chat app]
  7460  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  7461  func (c *SpacesMessagesDeleteCall) Force(force bool) *SpacesMessagesDeleteCall {
  7462  	c.urlParams_.Set("force", fmt.Sprint(force))
  7463  	return c
  7464  }
  7465  
  7466  // Fields allows partial responses to be retrieved. See
  7467  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7468  // details.
  7469  func (c *SpacesMessagesDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesDeleteCall {
  7470  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7471  	return c
  7472  }
  7473  
  7474  // Context sets the context to be used in this call's Do method.
  7475  func (c *SpacesMessagesDeleteCall) Context(ctx context.Context) *SpacesMessagesDeleteCall {
  7476  	c.ctx_ = ctx
  7477  	return c
  7478  }
  7479  
  7480  // Header returns a http.Header that can be modified by the caller to add
  7481  // headers to the request.
  7482  func (c *SpacesMessagesDeleteCall) Header() http.Header {
  7483  	if c.header_ == nil {
  7484  		c.header_ = make(http.Header)
  7485  	}
  7486  	return c.header_
  7487  }
  7488  
  7489  func (c *SpacesMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7490  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7491  	var body io.Reader = nil
  7492  	c.urlParams_.Set("alt", alt)
  7493  	c.urlParams_.Set("prettyPrint", "false")
  7494  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7495  	urls += "?" + c.urlParams_.Encode()
  7496  	req, err := http.NewRequest("DELETE", urls, body)
  7497  	if err != nil {
  7498  		return nil, err
  7499  	}
  7500  	req.Header = reqHeaders
  7501  	googleapi.Expand(req.URL, map[string]string{
  7502  		"name": c.name,
  7503  	})
  7504  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7505  }
  7506  
  7507  // Do executes the "chat.spaces.messages.delete" call.
  7508  // Any non-2xx status code is an error. Response headers are in either
  7509  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7510  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7511  // whether the returned error was because http.StatusNotModified was returned.
  7512  func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7513  	gensupport.SetOptions(c.urlParams_, opts...)
  7514  	res, err := c.doRequest("json")
  7515  	if res != nil && res.StatusCode == http.StatusNotModified {
  7516  		if res.Body != nil {
  7517  			res.Body.Close()
  7518  		}
  7519  		return nil, gensupport.WrapError(&googleapi.Error{
  7520  			Code:   res.StatusCode,
  7521  			Header: res.Header,
  7522  		})
  7523  	}
  7524  	if err != nil {
  7525  		return nil, err
  7526  	}
  7527  	defer googleapi.CloseBody(res)
  7528  	if err := googleapi.CheckResponse(res); err != nil {
  7529  		return nil, gensupport.WrapError(err)
  7530  	}
  7531  	ret := &Empty{
  7532  		ServerResponse: googleapi.ServerResponse{
  7533  			Header:         res.Header,
  7534  			HTTPStatusCode: res.StatusCode,
  7535  		},
  7536  	}
  7537  	target := &ret
  7538  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7539  		return nil, err
  7540  	}
  7541  	return ret, nil
  7542  }
  7543  
  7544  type SpacesMessagesGetCall struct {
  7545  	s            *Service
  7546  	name         string
  7547  	urlParams_   gensupport.URLParams
  7548  	ifNoneMatch_ string
  7549  	ctx_         context.Context
  7550  	header_      http.Header
  7551  }
  7552  
  7553  // Get: Returns details about a message. For an example, see Get details about
  7554  // a message (https://developers.google.com/workspace/chat/get-messages).
  7555  // Requires authentication
  7556  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  7557  // Supports app authentication
  7558  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  7559  // and user authentication
  7560  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7561  // Note: Might return a message from a blocked member or space.
  7562  //
  7563  //   - name: Resource name of the message. Format:
  7564  //     `spaces/{space}/messages/{message}` If you've set a custom ID for your
  7565  //     message, you can use the value from the `clientAssignedMessageId` field
  7566  //     for `{message}`. For details, see [Name a message]
  7567  //     (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  7568  func (r *SpacesMessagesService) Get(name string) *SpacesMessagesGetCall {
  7569  	c := &SpacesMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7570  	c.name = name
  7571  	return c
  7572  }
  7573  
  7574  // Fields allows partial responses to be retrieved. See
  7575  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7576  // details.
  7577  func (c *SpacesMessagesGetCall) Fields(s ...googleapi.Field) *SpacesMessagesGetCall {
  7578  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7579  	return c
  7580  }
  7581  
  7582  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7583  // object's ETag matches the given value. This is useful for getting updates
  7584  // only after the object has changed since the last request.
  7585  func (c *SpacesMessagesGetCall) IfNoneMatch(entityTag string) *SpacesMessagesGetCall {
  7586  	c.ifNoneMatch_ = entityTag
  7587  	return c
  7588  }
  7589  
  7590  // Context sets the context to be used in this call's Do method.
  7591  func (c *SpacesMessagesGetCall) Context(ctx context.Context) *SpacesMessagesGetCall {
  7592  	c.ctx_ = ctx
  7593  	return c
  7594  }
  7595  
  7596  // Header returns a http.Header that can be modified by the caller to add
  7597  // headers to the request.
  7598  func (c *SpacesMessagesGetCall) Header() http.Header {
  7599  	if c.header_ == nil {
  7600  		c.header_ = make(http.Header)
  7601  	}
  7602  	return c.header_
  7603  }
  7604  
  7605  func (c *SpacesMessagesGetCall) doRequest(alt string) (*http.Response, error) {
  7606  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7607  	if c.ifNoneMatch_ != "" {
  7608  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7609  	}
  7610  	var body io.Reader = nil
  7611  	c.urlParams_.Set("alt", alt)
  7612  	c.urlParams_.Set("prettyPrint", "false")
  7613  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7614  	urls += "?" + c.urlParams_.Encode()
  7615  	req, err := http.NewRequest("GET", urls, body)
  7616  	if err != nil {
  7617  		return nil, err
  7618  	}
  7619  	req.Header = reqHeaders
  7620  	googleapi.Expand(req.URL, map[string]string{
  7621  		"name": c.name,
  7622  	})
  7623  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7624  }
  7625  
  7626  // Do executes the "chat.spaces.messages.get" call.
  7627  // Any non-2xx status code is an error. Response headers are in either
  7628  // *Message.ServerResponse.Header or (if a response was returned at all) in
  7629  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7630  // whether the returned error was because http.StatusNotModified was returned.
  7631  func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  7632  	gensupport.SetOptions(c.urlParams_, opts...)
  7633  	res, err := c.doRequest("json")
  7634  	if res != nil && res.StatusCode == http.StatusNotModified {
  7635  		if res.Body != nil {
  7636  			res.Body.Close()
  7637  		}
  7638  		return nil, gensupport.WrapError(&googleapi.Error{
  7639  			Code:   res.StatusCode,
  7640  			Header: res.Header,
  7641  		})
  7642  	}
  7643  	if err != nil {
  7644  		return nil, err
  7645  	}
  7646  	defer googleapi.CloseBody(res)
  7647  	if err := googleapi.CheckResponse(res); err != nil {
  7648  		return nil, gensupport.WrapError(err)
  7649  	}
  7650  	ret := &Message{
  7651  		ServerResponse: googleapi.ServerResponse{
  7652  			Header:         res.Header,
  7653  			HTTPStatusCode: res.StatusCode,
  7654  		},
  7655  	}
  7656  	target := &ret
  7657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7658  		return nil, err
  7659  	}
  7660  	return ret, nil
  7661  }
  7662  
  7663  type SpacesMessagesListCall struct {
  7664  	s            *Service
  7665  	parent       string
  7666  	urlParams_   gensupport.URLParams
  7667  	ifNoneMatch_ string
  7668  	ctx_         context.Context
  7669  	header_      http.Header
  7670  }
  7671  
  7672  // List: Lists messages in a space that the caller is a member of, including
  7673  // messages from blocked members and spaces. For an example, see List messages
  7674  // (/chat/api/guides/v1/messages/list). Requires user authentication
  7675  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7676  //
  7677  //   - parent: The resource name of the space to list messages from. Format:
  7678  //     `spaces/{space}`.
  7679  func (r *SpacesMessagesService) List(parent string) *SpacesMessagesListCall {
  7680  	c := &SpacesMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7681  	c.parent = parent
  7682  	return c
  7683  }
  7684  
  7685  // Filter sets the optional parameter "filter": A query filter. You can filter
  7686  // messages by date (`create_time`) and thread (`thread.name`). To filter
  7687  // messages by the date they were created, specify the `create_time` with a
  7688  // timestamp in RFC-3339 (https://www.rfc-editor.org/rfc/rfc3339) format and
  7689  // double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can
  7690  // use the greater than operator `>` to list messages that were created after a
  7691  // timestamp, or the less than operator `<` to list messages that were created
  7692  // before a timestamp. To filter messages within a time interval, use the `AND`
  7693  // operator between two timestamps. To filter by thread, specify the
  7694  // `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only
  7695  // specify one `thread.name` per query. To filter by both thread and date, use
  7696  // the `AND` operator in your query. For example, the following queries are
  7697  // valid: ``` create_time > "2012-04-21T11:30:00-04:00" create_time >
  7698  // "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123
  7699  // create_time > "2012-04-21T11:30:00+00:00" AND create_time <
  7700  // "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123
  7701  // thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are
  7702  // rejected by the server with an `INVALID_ARGUMENT` error.
  7703  func (c *SpacesMessagesListCall) Filter(filter string) *SpacesMessagesListCall {
  7704  	c.urlParams_.Set("filter", filter)
  7705  	return c
  7706  }
  7707  
  7708  // OrderBy sets the optional parameter "orderBy": Optional, if resuming from a
  7709  // previous query. How the list of messages is ordered. Specify a value to
  7710  // order by an ordering operation. Valid ordering operation values are as
  7711  // follows: - `ASC` for ascending. - `DESC` for descending. The default
  7712  // ordering is `create_time ASC`.
  7713  func (c *SpacesMessagesListCall) OrderBy(orderBy string) *SpacesMessagesListCall {
  7714  	c.urlParams_.Set("orderBy", orderBy)
  7715  	return c
  7716  }
  7717  
  7718  // PageSize sets the optional parameter "pageSize": The maximum number of
  7719  // messages returned. The service might return fewer messages than this value.
  7720  // If unspecified, at most 25 are returned. The maximum value is 1000. If you
  7721  // use a value more than 1000, it's automatically changed to 1000. Negative
  7722  // values return an `INVALID_ARGUMENT` error.
  7723  func (c *SpacesMessagesListCall) PageSize(pageSize int64) *SpacesMessagesListCall {
  7724  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7725  	return c
  7726  }
  7727  
  7728  // PageToken sets the optional parameter "pageToken": Optional, if resuming
  7729  // from a previous query. A page token received from a previous list messages
  7730  // call. Provide this parameter to retrieve the subsequent page. When
  7731  // paginating, all other parameters provided should match the call that
  7732  // provided the page token. Passing different values to the other parameters
  7733  // might lead to unexpected results.
  7734  func (c *SpacesMessagesListCall) PageToken(pageToken string) *SpacesMessagesListCall {
  7735  	c.urlParams_.Set("pageToken", pageToken)
  7736  	return c
  7737  }
  7738  
  7739  // ShowDeleted sets the optional parameter "showDeleted": Whether to include
  7740  // deleted messages. Deleted messages include deleted time and metadata about
  7741  // their deletion, but message content is unavailable.
  7742  func (c *SpacesMessagesListCall) ShowDeleted(showDeleted bool) *SpacesMessagesListCall {
  7743  	c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  7744  	return c
  7745  }
  7746  
  7747  // Fields allows partial responses to be retrieved. See
  7748  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7749  // details.
  7750  func (c *SpacesMessagesListCall) Fields(s ...googleapi.Field) *SpacesMessagesListCall {
  7751  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7752  	return c
  7753  }
  7754  
  7755  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7756  // object's ETag matches the given value. This is useful for getting updates
  7757  // only after the object has changed since the last request.
  7758  func (c *SpacesMessagesListCall) IfNoneMatch(entityTag string) *SpacesMessagesListCall {
  7759  	c.ifNoneMatch_ = entityTag
  7760  	return c
  7761  }
  7762  
  7763  // Context sets the context to be used in this call's Do method.
  7764  func (c *SpacesMessagesListCall) Context(ctx context.Context) *SpacesMessagesListCall {
  7765  	c.ctx_ = ctx
  7766  	return c
  7767  }
  7768  
  7769  // Header returns a http.Header that can be modified by the caller to add
  7770  // headers to the request.
  7771  func (c *SpacesMessagesListCall) Header() http.Header {
  7772  	if c.header_ == nil {
  7773  		c.header_ = make(http.Header)
  7774  	}
  7775  	return c.header_
  7776  }
  7777  
  7778  func (c *SpacesMessagesListCall) doRequest(alt string) (*http.Response, error) {
  7779  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7780  	if c.ifNoneMatch_ != "" {
  7781  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7782  	}
  7783  	var body io.Reader = nil
  7784  	c.urlParams_.Set("alt", alt)
  7785  	c.urlParams_.Set("prettyPrint", "false")
  7786  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages")
  7787  	urls += "?" + c.urlParams_.Encode()
  7788  	req, err := http.NewRequest("GET", urls, body)
  7789  	if err != nil {
  7790  		return nil, err
  7791  	}
  7792  	req.Header = reqHeaders
  7793  	googleapi.Expand(req.URL, map[string]string{
  7794  		"parent": c.parent,
  7795  	})
  7796  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7797  }
  7798  
  7799  // Do executes the "chat.spaces.messages.list" call.
  7800  // Any non-2xx status code is an error. Response headers are in either
  7801  // *ListMessagesResponse.ServerResponse.Header or (if a response was returned
  7802  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7803  // check whether the returned error was because http.StatusNotModified was
  7804  // returned.
  7805  func (c *SpacesMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) {
  7806  	gensupport.SetOptions(c.urlParams_, opts...)
  7807  	res, err := c.doRequest("json")
  7808  	if res != nil && res.StatusCode == http.StatusNotModified {
  7809  		if res.Body != nil {
  7810  			res.Body.Close()
  7811  		}
  7812  		return nil, gensupport.WrapError(&googleapi.Error{
  7813  			Code:   res.StatusCode,
  7814  			Header: res.Header,
  7815  		})
  7816  	}
  7817  	if err != nil {
  7818  		return nil, err
  7819  	}
  7820  	defer googleapi.CloseBody(res)
  7821  	if err := googleapi.CheckResponse(res); err != nil {
  7822  		return nil, gensupport.WrapError(err)
  7823  	}
  7824  	ret := &ListMessagesResponse{
  7825  		ServerResponse: googleapi.ServerResponse{
  7826  			Header:         res.Header,
  7827  			HTTPStatusCode: res.StatusCode,
  7828  		},
  7829  	}
  7830  	target := &ret
  7831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7832  		return nil, err
  7833  	}
  7834  	return ret, nil
  7835  }
  7836  
  7837  // Pages invokes f for each page of results.
  7838  // A non-nil error returned from f will halt the iteration.
  7839  // The provided context supersedes any context provided to the Context method.
  7840  func (c *SpacesMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error {
  7841  	c.ctx_ = ctx
  7842  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7843  	for {
  7844  		x, err := c.Do()
  7845  		if err != nil {
  7846  			return err
  7847  		}
  7848  		if err := f(x); err != nil {
  7849  			return err
  7850  		}
  7851  		if x.NextPageToken == "" {
  7852  			return nil
  7853  		}
  7854  		c.PageToken(x.NextPageToken)
  7855  	}
  7856  }
  7857  
  7858  type SpacesMessagesPatchCall struct {
  7859  	s          *Service
  7860  	name       string
  7861  	message    *Message
  7862  	urlParams_ gensupport.URLParams
  7863  	ctx_       context.Context
  7864  	header_    http.Header
  7865  }
  7866  
  7867  // Patch: Updates a message. There's a difference between the `patch` and
  7868  // `update` methods. The `patch` method uses a `patch` request while the
  7869  // `update` method uses a `put` request. We recommend using the `patch` method.
  7870  // For an example, see Update a message
  7871  // (https://developers.google.com/workspace/chat/update-messages). Requires
  7872  // authentication
  7873  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  7874  // Supports app authentication
  7875  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  7876  // and user authentication
  7877  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  7878  // When using app authentication, requests can only update messages created by
  7879  // the calling Chat app.
  7880  //
  7881  //   - name: Resource name of the message. Format:
  7882  //     `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space
  7883  //     where the message is posted and `{message}` is a system-assigned ID for
  7884  //     the message. For example,
  7885  //     `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom
  7886  //     ID when you create a message, you can use this ID to specify the message
  7887  //     in a request by replacing `{message}` with the value from the
  7888  //     `clientAssignedMessageId` field. For example,
  7889  //     `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see Name a
  7890  //     message
  7891  //     (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  7892  func (r *SpacesMessagesService) Patch(name string, message *Message) *SpacesMessagesPatchCall {
  7893  	c := &SpacesMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7894  	c.name = name
  7895  	c.message = message
  7896  	return c
  7897  }
  7898  
  7899  // AllowMissing sets the optional parameter "allowMissing": If `true` and the
  7900  // message isn't found, a new message is created and `updateMask` is ignored.
  7901  // The specified message ID must be client-assigned
  7902  // (https://developers.google.com/workspace/chat/create-messages#name_a_created_message)
  7903  // or the request fails.
  7904  func (c *SpacesMessagesPatchCall) AllowMissing(allowMissing bool) *SpacesMessagesPatchCall {
  7905  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  7906  	return c
  7907  }
  7908  
  7909  // UpdateMask sets the optional parameter "updateMask": Required. The field
  7910  // paths to update. Separate multiple values with commas or use `*` to update
  7911  // all field paths. Currently supported field paths: - `text` - `attachment` -
  7912  // `cards` (Requires app authentication
  7913  // (/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires app
  7914  // authentication (/chat/api/guides/auth/service-accounts).) -
  7915  // `accessory_widgets` (Requires app authentication
  7916  // (/chat/api/guides/auth/service-accounts).)
  7917  func (c *SpacesMessagesPatchCall) UpdateMask(updateMask string) *SpacesMessagesPatchCall {
  7918  	c.urlParams_.Set("updateMask", updateMask)
  7919  	return c
  7920  }
  7921  
  7922  // Fields allows partial responses to be retrieved. See
  7923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7924  // details.
  7925  func (c *SpacesMessagesPatchCall) Fields(s ...googleapi.Field) *SpacesMessagesPatchCall {
  7926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7927  	return c
  7928  }
  7929  
  7930  // Context sets the context to be used in this call's Do method.
  7931  func (c *SpacesMessagesPatchCall) Context(ctx context.Context) *SpacesMessagesPatchCall {
  7932  	c.ctx_ = ctx
  7933  	return c
  7934  }
  7935  
  7936  // Header returns a http.Header that can be modified by the caller to add
  7937  // headers to the request.
  7938  func (c *SpacesMessagesPatchCall) Header() http.Header {
  7939  	if c.header_ == nil {
  7940  		c.header_ = make(http.Header)
  7941  	}
  7942  	return c.header_
  7943  }
  7944  
  7945  func (c *SpacesMessagesPatchCall) doRequest(alt string) (*http.Response, error) {
  7946  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7947  	var body io.Reader = nil
  7948  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
  7949  	if err != nil {
  7950  		return nil, err
  7951  	}
  7952  	c.urlParams_.Set("alt", alt)
  7953  	c.urlParams_.Set("prettyPrint", "false")
  7954  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7955  	urls += "?" + c.urlParams_.Encode()
  7956  	req, err := http.NewRequest("PATCH", urls, body)
  7957  	if err != nil {
  7958  		return nil, err
  7959  	}
  7960  	req.Header = reqHeaders
  7961  	googleapi.Expand(req.URL, map[string]string{
  7962  		"name": c.name,
  7963  	})
  7964  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7965  }
  7966  
  7967  // Do executes the "chat.spaces.messages.patch" call.
  7968  // Any non-2xx status code is an error. Response headers are in either
  7969  // *Message.ServerResponse.Header or (if a response was returned at all) in
  7970  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7971  // whether the returned error was because http.StatusNotModified was returned.
  7972  func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  7973  	gensupport.SetOptions(c.urlParams_, opts...)
  7974  	res, err := c.doRequest("json")
  7975  	if res != nil && res.StatusCode == http.StatusNotModified {
  7976  		if res.Body != nil {
  7977  			res.Body.Close()
  7978  		}
  7979  		return nil, gensupport.WrapError(&googleapi.Error{
  7980  			Code:   res.StatusCode,
  7981  			Header: res.Header,
  7982  		})
  7983  	}
  7984  	if err != nil {
  7985  		return nil, err
  7986  	}
  7987  	defer googleapi.CloseBody(res)
  7988  	if err := googleapi.CheckResponse(res); err != nil {
  7989  		return nil, gensupport.WrapError(err)
  7990  	}
  7991  	ret := &Message{
  7992  		ServerResponse: googleapi.ServerResponse{
  7993  			Header:         res.Header,
  7994  			HTTPStatusCode: res.StatusCode,
  7995  		},
  7996  	}
  7997  	target := &ret
  7998  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7999  		return nil, err
  8000  	}
  8001  	return ret, nil
  8002  }
  8003  
  8004  type SpacesMessagesUpdateCall struct {
  8005  	s          *Service
  8006  	name       string
  8007  	message    *Message
  8008  	urlParams_ gensupport.URLParams
  8009  	ctx_       context.Context
  8010  	header_    http.Header
  8011  }
  8012  
  8013  // Update: Updates a message. There's a difference between the `patch` and
  8014  // `update` methods. The `patch` method uses a `patch` request while the
  8015  // `update` method uses a `put` request. We recommend using the `patch` method.
  8016  // For an example, see Update a message
  8017  // (https://developers.google.com/workspace/chat/update-messages). Requires
  8018  // authentication
  8019  // (https://developers.google.com/workspace/chat/authenticate-authorize).
  8020  // Supports app authentication
  8021  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  8022  // and user authentication
  8023  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8024  // When using app authentication, requests can only update messages created by
  8025  // the calling Chat app.
  8026  //
  8027  //   - name: Resource name of the message. Format:
  8028  //     `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space
  8029  //     where the message is posted and `{message}` is a system-assigned ID for
  8030  //     the message. For example,
  8031  //     `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom
  8032  //     ID when you create a message, you can use this ID to specify the message
  8033  //     in a request by replacing `{message}` with the value from the
  8034  //     `clientAssignedMessageId` field. For example,
  8035  //     `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see Name a
  8036  //     message
  8037  //     (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
  8038  func (r *SpacesMessagesService) Update(name string, message *Message) *SpacesMessagesUpdateCall {
  8039  	c := &SpacesMessagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8040  	c.name = name
  8041  	c.message = message
  8042  	return c
  8043  }
  8044  
  8045  // AllowMissing sets the optional parameter "allowMissing": If `true` and the
  8046  // message isn't found, a new message is created and `updateMask` is ignored.
  8047  // The specified message ID must be client-assigned
  8048  // (https://developers.google.com/workspace/chat/create-messages#name_a_created_message)
  8049  // or the request fails.
  8050  func (c *SpacesMessagesUpdateCall) AllowMissing(allowMissing bool) *SpacesMessagesUpdateCall {
  8051  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  8052  	return c
  8053  }
  8054  
  8055  // UpdateMask sets the optional parameter "updateMask": Required. The field
  8056  // paths to update. Separate multiple values with commas or use `*` to update
  8057  // all field paths. Currently supported field paths: - `text` - `attachment` -
  8058  // `cards` (Requires app authentication
  8059  // (/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires app
  8060  // authentication (/chat/api/guides/auth/service-accounts).) -
  8061  // `accessory_widgets` (Requires app authentication
  8062  // (/chat/api/guides/auth/service-accounts).)
  8063  func (c *SpacesMessagesUpdateCall) UpdateMask(updateMask string) *SpacesMessagesUpdateCall {
  8064  	c.urlParams_.Set("updateMask", updateMask)
  8065  	return c
  8066  }
  8067  
  8068  // Fields allows partial responses to be retrieved. See
  8069  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8070  // details.
  8071  func (c *SpacesMessagesUpdateCall) Fields(s ...googleapi.Field) *SpacesMessagesUpdateCall {
  8072  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8073  	return c
  8074  }
  8075  
  8076  // Context sets the context to be used in this call's Do method.
  8077  func (c *SpacesMessagesUpdateCall) Context(ctx context.Context) *SpacesMessagesUpdateCall {
  8078  	c.ctx_ = ctx
  8079  	return c
  8080  }
  8081  
  8082  // Header returns a http.Header that can be modified by the caller to add
  8083  // headers to the request.
  8084  func (c *SpacesMessagesUpdateCall) Header() http.Header {
  8085  	if c.header_ == nil {
  8086  		c.header_ = make(http.Header)
  8087  	}
  8088  	return c.header_
  8089  }
  8090  
  8091  func (c *SpacesMessagesUpdateCall) doRequest(alt string) (*http.Response, error) {
  8092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8093  	var body io.Reader = nil
  8094  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
  8095  	if err != nil {
  8096  		return nil, err
  8097  	}
  8098  	c.urlParams_.Set("alt", alt)
  8099  	c.urlParams_.Set("prettyPrint", "false")
  8100  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8101  	urls += "?" + c.urlParams_.Encode()
  8102  	req, err := http.NewRequest("PUT", urls, body)
  8103  	if err != nil {
  8104  		return nil, err
  8105  	}
  8106  	req.Header = reqHeaders
  8107  	googleapi.Expand(req.URL, map[string]string{
  8108  		"name": c.name,
  8109  	})
  8110  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8111  }
  8112  
  8113  // Do executes the "chat.spaces.messages.update" call.
  8114  // Any non-2xx status code is an error. Response headers are in either
  8115  // *Message.ServerResponse.Header or (if a response was returned at all) in
  8116  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8117  // whether the returned error was because http.StatusNotModified was returned.
  8118  func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  8119  	gensupport.SetOptions(c.urlParams_, opts...)
  8120  	res, err := c.doRequest("json")
  8121  	if res != nil && res.StatusCode == http.StatusNotModified {
  8122  		if res.Body != nil {
  8123  			res.Body.Close()
  8124  		}
  8125  		return nil, gensupport.WrapError(&googleapi.Error{
  8126  			Code:   res.StatusCode,
  8127  			Header: res.Header,
  8128  		})
  8129  	}
  8130  	if err != nil {
  8131  		return nil, err
  8132  	}
  8133  	defer googleapi.CloseBody(res)
  8134  	if err := googleapi.CheckResponse(res); err != nil {
  8135  		return nil, gensupport.WrapError(err)
  8136  	}
  8137  	ret := &Message{
  8138  		ServerResponse: googleapi.ServerResponse{
  8139  			Header:         res.Header,
  8140  			HTTPStatusCode: res.StatusCode,
  8141  		},
  8142  	}
  8143  	target := &ret
  8144  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8145  		return nil, err
  8146  	}
  8147  	return ret, nil
  8148  }
  8149  
  8150  type SpacesMessagesAttachmentsGetCall struct {
  8151  	s            *Service
  8152  	name         string
  8153  	urlParams_   gensupport.URLParams
  8154  	ifNoneMatch_ string
  8155  	ctx_         context.Context
  8156  	header_      http.Header
  8157  }
  8158  
  8159  // Get: Gets the metadata of a message attachment. The attachment data is
  8160  // fetched using the media API
  8161  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
  8162  // For an example, see Get metadata about a message attachment
  8163  // (https://developers.google.com/workspace/chat/get-media-attachments).
  8164  // Requires app authentication
  8165  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  8166  //
  8167  //   - name: Resource name of the attachment, in the form
  8168  //     `spaces/*/messages/*/attachments/*`.
  8169  func (r *SpacesMessagesAttachmentsService) Get(name string) *SpacesMessagesAttachmentsGetCall {
  8170  	c := &SpacesMessagesAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8171  	c.name = name
  8172  	return c
  8173  }
  8174  
  8175  // Fields allows partial responses to be retrieved. See
  8176  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8177  // details.
  8178  func (c *SpacesMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *SpacesMessagesAttachmentsGetCall {
  8179  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8180  	return c
  8181  }
  8182  
  8183  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8184  // object's ETag matches the given value. This is useful for getting updates
  8185  // only after the object has changed since the last request.
  8186  func (c *SpacesMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *SpacesMessagesAttachmentsGetCall {
  8187  	c.ifNoneMatch_ = entityTag
  8188  	return c
  8189  }
  8190  
  8191  // Context sets the context to be used in this call's Do method.
  8192  func (c *SpacesMessagesAttachmentsGetCall) Context(ctx context.Context) *SpacesMessagesAttachmentsGetCall {
  8193  	c.ctx_ = ctx
  8194  	return c
  8195  }
  8196  
  8197  // Header returns a http.Header that can be modified by the caller to add
  8198  // headers to the request.
  8199  func (c *SpacesMessagesAttachmentsGetCall) Header() http.Header {
  8200  	if c.header_ == nil {
  8201  		c.header_ = make(http.Header)
  8202  	}
  8203  	return c.header_
  8204  }
  8205  
  8206  func (c *SpacesMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
  8207  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8208  	if c.ifNoneMatch_ != "" {
  8209  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8210  	}
  8211  	var body io.Reader = nil
  8212  	c.urlParams_.Set("alt", alt)
  8213  	c.urlParams_.Set("prettyPrint", "false")
  8214  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8215  	urls += "?" + c.urlParams_.Encode()
  8216  	req, err := http.NewRequest("GET", urls, body)
  8217  	if err != nil {
  8218  		return nil, err
  8219  	}
  8220  	req.Header = reqHeaders
  8221  	googleapi.Expand(req.URL, map[string]string{
  8222  		"name": c.name,
  8223  	})
  8224  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8225  }
  8226  
  8227  // Do executes the "chat.spaces.messages.attachments.get" call.
  8228  // Any non-2xx status code is an error. Response headers are in either
  8229  // *Attachment.ServerResponse.Header or (if a response was returned at all) in
  8230  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8231  // whether the returned error was because http.StatusNotModified was returned.
  8232  func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachment, error) {
  8233  	gensupport.SetOptions(c.urlParams_, opts...)
  8234  	res, err := c.doRequest("json")
  8235  	if res != nil && res.StatusCode == http.StatusNotModified {
  8236  		if res.Body != nil {
  8237  			res.Body.Close()
  8238  		}
  8239  		return nil, gensupport.WrapError(&googleapi.Error{
  8240  			Code:   res.StatusCode,
  8241  			Header: res.Header,
  8242  		})
  8243  	}
  8244  	if err != nil {
  8245  		return nil, err
  8246  	}
  8247  	defer googleapi.CloseBody(res)
  8248  	if err := googleapi.CheckResponse(res); err != nil {
  8249  		return nil, gensupport.WrapError(err)
  8250  	}
  8251  	ret := &Attachment{
  8252  		ServerResponse: googleapi.ServerResponse{
  8253  			Header:         res.Header,
  8254  			HTTPStatusCode: res.StatusCode,
  8255  		},
  8256  	}
  8257  	target := &ret
  8258  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8259  		return nil, err
  8260  	}
  8261  	return ret, nil
  8262  }
  8263  
  8264  type SpacesMessagesReactionsCreateCall struct {
  8265  	s          *Service
  8266  	parent     string
  8267  	reaction   *Reaction
  8268  	urlParams_ gensupport.URLParams
  8269  	ctx_       context.Context
  8270  	header_    http.Header
  8271  }
  8272  
  8273  // Create: Creates a reaction and adds it to a message. Only unicode emojis are
  8274  // supported. For an example, see Add a reaction to a message
  8275  // (https://developers.google.com/workspace/chat/create-reactions). Requires
  8276  // user authentication
  8277  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8278  //
  8279  //   - parent: The message where the reaction is created. Format:
  8280  //     `spaces/{space}/messages/{message}`.
  8281  func (r *SpacesMessagesReactionsService) Create(parent string, reaction *Reaction) *SpacesMessagesReactionsCreateCall {
  8282  	c := &SpacesMessagesReactionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8283  	c.parent = parent
  8284  	c.reaction = reaction
  8285  	return c
  8286  }
  8287  
  8288  // Fields allows partial responses to be retrieved. See
  8289  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8290  // details.
  8291  func (c *SpacesMessagesReactionsCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsCreateCall {
  8292  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8293  	return c
  8294  }
  8295  
  8296  // Context sets the context to be used in this call's Do method.
  8297  func (c *SpacesMessagesReactionsCreateCall) Context(ctx context.Context) *SpacesMessagesReactionsCreateCall {
  8298  	c.ctx_ = ctx
  8299  	return c
  8300  }
  8301  
  8302  // Header returns a http.Header that can be modified by the caller to add
  8303  // headers to the request.
  8304  func (c *SpacesMessagesReactionsCreateCall) Header() http.Header {
  8305  	if c.header_ == nil {
  8306  		c.header_ = make(http.Header)
  8307  	}
  8308  	return c.header_
  8309  }
  8310  
  8311  func (c *SpacesMessagesReactionsCreateCall) doRequest(alt string) (*http.Response, error) {
  8312  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8313  	var body io.Reader = nil
  8314  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reaction)
  8315  	if err != nil {
  8316  		return nil, err
  8317  	}
  8318  	c.urlParams_.Set("alt", alt)
  8319  	c.urlParams_.Set("prettyPrint", "false")
  8320  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reactions")
  8321  	urls += "?" + c.urlParams_.Encode()
  8322  	req, err := http.NewRequest("POST", urls, body)
  8323  	if err != nil {
  8324  		return nil, err
  8325  	}
  8326  	req.Header = reqHeaders
  8327  	googleapi.Expand(req.URL, map[string]string{
  8328  		"parent": c.parent,
  8329  	})
  8330  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8331  }
  8332  
  8333  // Do executes the "chat.spaces.messages.reactions.create" call.
  8334  // Any non-2xx status code is an error. Response headers are in either
  8335  // *Reaction.ServerResponse.Header or (if a response was returned at all) in
  8336  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8337  // whether the returned error was because http.StatusNotModified was returned.
  8338  func (c *SpacesMessagesReactionsCreateCall) Do(opts ...googleapi.CallOption) (*Reaction, error) {
  8339  	gensupport.SetOptions(c.urlParams_, opts...)
  8340  	res, err := c.doRequest("json")
  8341  	if res != nil && res.StatusCode == http.StatusNotModified {
  8342  		if res.Body != nil {
  8343  			res.Body.Close()
  8344  		}
  8345  		return nil, gensupport.WrapError(&googleapi.Error{
  8346  			Code:   res.StatusCode,
  8347  			Header: res.Header,
  8348  		})
  8349  	}
  8350  	if err != nil {
  8351  		return nil, err
  8352  	}
  8353  	defer googleapi.CloseBody(res)
  8354  	if err := googleapi.CheckResponse(res); err != nil {
  8355  		return nil, gensupport.WrapError(err)
  8356  	}
  8357  	ret := &Reaction{
  8358  		ServerResponse: googleapi.ServerResponse{
  8359  			Header:         res.Header,
  8360  			HTTPStatusCode: res.StatusCode,
  8361  		},
  8362  	}
  8363  	target := &ret
  8364  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8365  		return nil, err
  8366  	}
  8367  	return ret, nil
  8368  }
  8369  
  8370  type SpacesMessagesReactionsDeleteCall struct {
  8371  	s          *Service
  8372  	name       string
  8373  	urlParams_ gensupport.URLParams
  8374  	ctx_       context.Context
  8375  	header_    http.Header
  8376  }
  8377  
  8378  // Delete: Deletes a reaction to a message. Only unicode emojis are supported.
  8379  // For an example, see Delete a reaction
  8380  // (https://developers.google.com/workspace/chat/delete-reactions). Requires
  8381  // user authentication
  8382  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8383  //
  8384  //   - name: Name of the reaction to delete. Format:
  8385  //     `spaces/{space}/messages/{message}/reactions/{reaction}`.
  8386  func (r *SpacesMessagesReactionsService) Delete(name string) *SpacesMessagesReactionsDeleteCall {
  8387  	c := &SpacesMessagesReactionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8388  	c.name = name
  8389  	return c
  8390  }
  8391  
  8392  // Fields allows partial responses to be retrieved. See
  8393  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8394  // details.
  8395  func (c *SpacesMessagesReactionsDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsDeleteCall {
  8396  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8397  	return c
  8398  }
  8399  
  8400  // Context sets the context to be used in this call's Do method.
  8401  func (c *SpacesMessagesReactionsDeleteCall) Context(ctx context.Context) *SpacesMessagesReactionsDeleteCall {
  8402  	c.ctx_ = ctx
  8403  	return c
  8404  }
  8405  
  8406  // Header returns a http.Header that can be modified by the caller to add
  8407  // headers to the request.
  8408  func (c *SpacesMessagesReactionsDeleteCall) Header() http.Header {
  8409  	if c.header_ == nil {
  8410  		c.header_ = make(http.Header)
  8411  	}
  8412  	return c.header_
  8413  }
  8414  
  8415  func (c *SpacesMessagesReactionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8416  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8417  	var body io.Reader = nil
  8418  	c.urlParams_.Set("alt", alt)
  8419  	c.urlParams_.Set("prettyPrint", "false")
  8420  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8421  	urls += "?" + c.urlParams_.Encode()
  8422  	req, err := http.NewRequest("DELETE", urls, body)
  8423  	if err != nil {
  8424  		return nil, err
  8425  	}
  8426  	req.Header = reqHeaders
  8427  	googleapi.Expand(req.URL, map[string]string{
  8428  		"name": c.name,
  8429  	})
  8430  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8431  }
  8432  
  8433  // Do executes the "chat.spaces.messages.reactions.delete" call.
  8434  // Any non-2xx status code is an error. Response headers are in either
  8435  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8436  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8437  // whether the returned error was because http.StatusNotModified was returned.
  8438  func (c *SpacesMessagesReactionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8439  	gensupport.SetOptions(c.urlParams_, opts...)
  8440  	res, err := c.doRequest("json")
  8441  	if res != nil && res.StatusCode == http.StatusNotModified {
  8442  		if res.Body != nil {
  8443  			res.Body.Close()
  8444  		}
  8445  		return nil, gensupport.WrapError(&googleapi.Error{
  8446  			Code:   res.StatusCode,
  8447  			Header: res.Header,
  8448  		})
  8449  	}
  8450  	if err != nil {
  8451  		return nil, err
  8452  	}
  8453  	defer googleapi.CloseBody(res)
  8454  	if err := googleapi.CheckResponse(res); err != nil {
  8455  		return nil, gensupport.WrapError(err)
  8456  	}
  8457  	ret := &Empty{
  8458  		ServerResponse: googleapi.ServerResponse{
  8459  			Header:         res.Header,
  8460  			HTTPStatusCode: res.StatusCode,
  8461  		},
  8462  	}
  8463  	target := &ret
  8464  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8465  		return nil, err
  8466  	}
  8467  	return ret, nil
  8468  }
  8469  
  8470  type SpacesMessagesReactionsListCall struct {
  8471  	s            *Service
  8472  	parent       string
  8473  	urlParams_   gensupport.URLParams
  8474  	ifNoneMatch_ string
  8475  	ctx_         context.Context
  8476  	header_      http.Header
  8477  }
  8478  
  8479  // List: Lists reactions to a message. For an example, see List reactions for a
  8480  // message (https://developers.google.com/workspace/chat/list-reactions).
  8481  // Requires user authentication
  8482  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8483  //
  8484  //   - parent: The message users reacted to. Format:
  8485  //     `spaces/{space}/messages/{message}`.
  8486  func (r *SpacesMessagesReactionsService) List(parent string) *SpacesMessagesReactionsListCall {
  8487  	c := &SpacesMessagesReactionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8488  	c.parent = parent
  8489  	return c
  8490  }
  8491  
  8492  // Filter sets the optional parameter "filter": A query filter. You can filter
  8493  // reactions by emoji
  8494  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji)
  8495  // (either `emoji.unicode` or `emoji.custom_emoji.uid`) and user
  8496  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
  8497  // (`user.name`). To filter reactions for multiple emojis or users, join
  8498  // similar fields with the `OR` operator, such as `emoji.unicode = "🙂" OR
  8499  // emoji.unicode = "👍" and `user.name = "users/AAAAAA" OR user.name =
  8500  // "users/BBBBBB". To filter reactions by emoji and user, use the `AND`
  8501  // operator, such as `emoji.unicode = "🙂" AND user.name = "users/AAAAAA".
  8502  // If your query uses both `AND` and `OR`, group them with parentheses. For
  8503  // example, the following queries are valid: ``` user.name = "users/{user}"
  8504  // emoji.unicode = "🙂" emoji.custom_emoji.uid = "{uid}" emoji.unicode =
  8505  // "🙂" OR emoji.unicode = "👍" emoji.unicode = "🙂" OR
  8506  // emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" AND user.name =
  8507  // "users/{user}" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
  8508  // AND user.name = "users/{user}" ``` The following queries are invalid: ```
  8509  // emoji.unicode = "🙂" AND emoji.unicode = "👍" emoji.unicode = "🙂" AND
  8510  // emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR user.name =
  8511  // "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
  8512  // user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid
  8513  // = "{uid}" AND user.name = "users/{user}" ``` Invalid queries are rejected by
  8514  // the server with an `INVALID_ARGUMENT` error.
  8515  func (c *SpacesMessagesReactionsListCall) Filter(filter string) *SpacesMessagesReactionsListCall {
  8516  	c.urlParams_.Set("filter", filter)
  8517  	return c
  8518  }
  8519  
  8520  // PageSize sets the optional parameter "pageSize": The maximum number of
  8521  // reactions returned. The service can return fewer reactions than this value.
  8522  // If unspecified, the default value is 25. The maximum value is 200; values
  8523  // above 200 are changed to 200.
  8524  func (c *SpacesMessagesReactionsListCall) PageSize(pageSize int64) *SpacesMessagesReactionsListCall {
  8525  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8526  	return c
  8527  }
  8528  
  8529  // PageToken sets the optional parameter "pageToken": (If resuming from a
  8530  // previous query.) A page token received from a previous list reactions call.
  8531  // Provide this to retrieve the subsequent page. When paginating, the filter
  8532  // value should match the call that provided the page token. Passing a
  8533  // different value might lead to unexpected results.
  8534  func (c *SpacesMessagesReactionsListCall) PageToken(pageToken string) *SpacesMessagesReactionsListCall {
  8535  	c.urlParams_.Set("pageToken", pageToken)
  8536  	return c
  8537  }
  8538  
  8539  // Fields allows partial responses to be retrieved. See
  8540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8541  // details.
  8542  func (c *SpacesMessagesReactionsListCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsListCall {
  8543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8544  	return c
  8545  }
  8546  
  8547  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8548  // object's ETag matches the given value. This is useful for getting updates
  8549  // only after the object has changed since the last request.
  8550  func (c *SpacesMessagesReactionsListCall) IfNoneMatch(entityTag string) *SpacesMessagesReactionsListCall {
  8551  	c.ifNoneMatch_ = entityTag
  8552  	return c
  8553  }
  8554  
  8555  // Context sets the context to be used in this call's Do method.
  8556  func (c *SpacesMessagesReactionsListCall) Context(ctx context.Context) *SpacesMessagesReactionsListCall {
  8557  	c.ctx_ = ctx
  8558  	return c
  8559  }
  8560  
  8561  // Header returns a http.Header that can be modified by the caller to add
  8562  // headers to the request.
  8563  func (c *SpacesMessagesReactionsListCall) Header() http.Header {
  8564  	if c.header_ == nil {
  8565  		c.header_ = make(http.Header)
  8566  	}
  8567  	return c.header_
  8568  }
  8569  
  8570  func (c *SpacesMessagesReactionsListCall) doRequest(alt string) (*http.Response, error) {
  8571  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8572  	if c.ifNoneMatch_ != "" {
  8573  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8574  	}
  8575  	var body io.Reader = nil
  8576  	c.urlParams_.Set("alt", alt)
  8577  	c.urlParams_.Set("prettyPrint", "false")
  8578  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reactions")
  8579  	urls += "?" + c.urlParams_.Encode()
  8580  	req, err := http.NewRequest("GET", urls, body)
  8581  	if err != nil {
  8582  		return nil, err
  8583  	}
  8584  	req.Header = reqHeaders
  8585  	googleapi.Expand(req.URL, map[string]string{
  8586  		"parent": c.parent,
  8587  	})
  8588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8589  }
  8590  
  8591  // Do executes the "chat.spaces.messages.reactions.list" call.
  8592  // Any non-2xx status code is an error. Response headers are in either
  8593  // *ListReactionsResponse.ServerResponse.Header or (if a response was returned
  8594  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8595  // check whether the returned error was because http.StatusNotModified was
  8596  // returned.
  8597  func (c *SpacesMessagesReactionsListCall) Do(opts ...googleapi.CallOption) (*ListReactionsResponse, error) {
  8598  	gensupport.SetOptions(c.urlParams_, opts...)
  8599  	res, err := c.doRequest("json")
  8600  	if res != nil && res.StatusCode == http.StatusNotModified {
  8601  		if res.Body != nil {
  8602  			res.Body.Close()
  8603  		}
  8604  		return nil, gensupport.WrapError(&googleapi.Error{
  8605  			Code:   res.StatusCode,
  8606  			Header: res.Header,
  8607  		})
  8608  	}
  8609  	if err != nil {
  8610  		return nil, err
  8611  	}
  8612  	defer googleapi.CloseBody(res)
  8613  	if err := googleapi.CheckResponse(res); err != nil {
  8614  		return nil, gensupport.WrapError(err)
  8615  	}
  8616  	ret := &ListReactionsResponse{
  8617  		ServerResponse: googleapi.ServerResponse{
  8618  			Header:         res.Header,
  8619  			HTTPStatusCode: res.StatusCode,
  8620  		},
  8621  	}
  8622  	target := &ret
  8623  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8624  		return nil, err
  8625  	}
  8626  	return ret, nil
  8627  }
  8628  
  8629  // Pages invokes f for each page of results.
  8630  // A non-nil error returned from f will halt the iteration.
  8631  // The provided context supersedes any context provided to the Context method.
  8632  func (c *SpacesMessagesReactionsListCall) Pages(ctx context.Context, f func(*ListReactionsResponse) error) error {
  8633  	c.ctx_ = ctx
  8634  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8635  	for {
  8636  		x, err := c.Do()
  8637  		if err != nil {
  8638  			return err
  8639  		}
  8640  		if err := f(x); err != nil {
  8641  			return err
  8642  		}
  8643  		if x.NextPageToken == "" {
  8644  			return nil
  8645  		}
  8646  		c.PageToken(x.NextPageToken)
  8647  	}
  8648  }
  8649  
  8650  type SpacesSpaceEventsGetCall struct {
  8651  	s            *Service
  8652  	name         string
  8653  	urlParams_   gensupport.URLParams
  8654  	ifNoneMatch_ string
  8655  	ctx_         context.Context
  8656  	header_      http.Header
  8657  }
  8658  
  8659  // Get: Returns an event from a Google Chat space. The event payload
  8660  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
  8661  // contains the most recent version of the resource that changed. For example,
  8662  // if you request an event about a new message but the message was later
  8663  // updated, the server returns the updated `Message` resource in the event
  8664  // payload. Requires user authentication
  8665  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8666  // To get an event, the authenticated user must be a member of the space. For
  8667  // an example, see Get details about an event from a Google Chat space
  8668  // (https://developers.google.com/workspace/chat/get-space-event).
  8669  //
  8670  //   - name: The resource name of the space event. Format:
  8671  //     `spaces/{space}/spaceEvents/{spaceEvent}`.
  8672  func (r *SpacesSpaceEventsService) Get(name string) *SpacesSpaceEventsGetCall {
  8673  	c := &SpacesSpaceEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8674  	c.name = name
  8675  	return c
  8676  }
  8677  
  8678  // Fields allows partial responses to be retrieved. See
  8679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8680  // details.
  8681  func (c *SpacesSpaceEventsGetCall) Fields(s ...googleapi.Field) *SpacesSpaceEventsGetCall {
  8682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8683  	return c
  8684  }
  8685  
  8686  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8687  // object's ETag matches the given value. This is useful for getting updates
  8688  // only after the object has changed since the last request.
  8689  func (c *SpacesSpaceEventsGetCall) IfNoneMatch(entityTag string) *SpacesSpaceEventsGetCall {
  8690  	c.ifNoneMatch_ = entityTag
  8691  	return c
  8692  }
  8693  
  8694  // Context sets the context to be used in this call's Do method.
  8695  func (c *SpacesSpaceEventsGetCall) Context(ctx context.Context) *SpacesSpaceEventsGetCall {
  8696  	c.ctx_ = ctx
  8697  	return c
  8698  }
  8699  
  8700  // Header returns a http.Header that can be modified by the caller to add
  8701  // headers to the request.
  8702  func (c *SpacesSpaceEventsGetCall) Header() http.Header {
  8703  	if c.header_ == nil {
  8704  		c.header_ = make(http.Header)
  8705  	}
  8706  	return c.header_
  8707  }
  8708  
  8709  func (c *SpacesSpaceEventsGetCall) doRequest(alt string) (*http.Response, error) {
  8710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8711  	if c.ifNoneMatch_ != "" {
  8712  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8713  	}
  8714  	var body io.Reader = nil
  8715  	c.urlParams_.Set("alt", alt)
  8716  	c.urlParams_.Set("prettyPrint", "false")
  8717  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8718  	urls += "?" + c.urlParams_.Encode()
  8719  	req, err := http.NewRequest("GET", urls, body)
  8720  	if err != nil {
  8721  		return nil, err
  8722  	}
  8723  	req.Header = reqHeaders
  8724  	googleapi.Expand(req.URL, map[string]string{
  8725  		"name": c.name,
  8726  	})
  8727  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8728  }
  8729  
  8730  // Do executes the "chat.spaces.spaceEvents.get" call.
  8731  // Any non-2xx status code is an error. Response headers are in either
  8732  // *SpaceEvent.ServerResponse.Header or (if a response was returned at all) in
  8733  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8734  // whether the returned error was because http.StatusNotModified was returned.
  8735  func (c *SpacesSpaceEventsGetCall) Do(opts ...googleapi.CallOption) (*SpaceEvent, error) {
  8736  	gensupport.SetOptions(c.urlParams_, opts...)
  8737  	res, err := c.doRequest("json")
  8738  	if res != nil && res.StatusCode == http.StatusNotModified {
  8739  		if res.Body != nil {
  8740  			res.Body.Close()
  8741  		}
  8742  		return nil, gensupport.WrapError(&googleapi.Error{
  8743  			Code:   res.StatusCode,
  8744  			Header: res.Header,
  8745  		})
  8746  	}
  8747  	if err != nil {
  8748  		return nil, err
  8749  	}
  8750  	defer googleapi.CloseBody(res)
  8751  	if err := googleapi.CheckResponse(res); err != nil {
  8752  		return nil, gensupport.WrapError(err)
  8753  	}
  8754  	ret := &SpaceEvent{
  8755  		ServerResponse: googleapi.ServerResponse{
  8756  			Header:         res.Header,
  8757  			HTTPStatusCode: res.StatusCode,
  8758  		},
  8759  	}
  8760  	target := &ret
  8761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8762  		return nil, err
  8763  	}
  8764  	return ret, nil
  8765  }
  8766  
  8767  type SpacesSpaceEventsListCall struct {
  8768  	s            *Service
  8769  	parent       string
  8770  	urlParams_   gensupport.URLParams
  8771  	ifNoneMatch_ string
  8772  	ctx_         context.Context
  8773  	header_      http.Header
  8774  }
  8775  
  8776  // List: Lists events from a Google Chat space. For each event, the payload
  8777  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
  8778  // contains the most recent version of the Chat resource. For example, if you
  8779  // list events about new space members, the server returns `Membership`
  8780  // resources that contain the latest membership details. If new members were
  8781  // removed during the requested period, the event payload contains an empty
  8782  // `Membership` resource. Requires user authentication
  8783  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8784  // To list events, the authenticated user must be a member of the space. For an
  8785  // example, see List events from a Google Chat space
  8786  // (https://developers.google.com/workspace/chat/list-space-events).
  8787  //
  8788  //   - parent: Resource name of the Google Chat space
  8789  //     (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
  8790  //     where the events occurred. Format: `spaces/{space}`.
  8791  func (r *SpacesSpaceEventsService) List(parent string) *SpacesSpaceEventsListCall {
  8792  	c := &SpacesSpaceEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8793  	c.parent = parent
  8794  	return c
  8795  }
  8796  
  8797  // Filter sets the optional parameter "filter": Required. A query filter. You
  8798  // must specify at least one event type (`event_type`) using the has `:`
  8799  // operator. To filter by multiple event types, use the `OR` operator. Omit
  8800  // batch event types in your filter. The request automatically returns any
  8801  // related batch events. For example, if you filter by new reactions
  8802  // (`google.workspace.chat.reaction.v1.created`), the server also returns batch
  8803  // new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For
  8804  // a list of supported event types, see the `SpaceEvents` reference
  8805  // documentation
  8806  // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
  8807  // Optionally, you can also filter by start time (`start_time`) and end time
  8808  // (`end_time`): * `start_time`: Exclusive timestamp from which to start
  8809  // listing space events. You can list events that occurred up to 28 days ago.
  8810  // If unspecified, lists space events from the past 28 days. * `end_time`:
  8811  // Inclusive timestamp until which space events are listed. If unspecified,
  8812  // lists events up to the time of the request. To specify a start or end time,
  8813  // use the equals `=` operator and format in RFC-3339
  8814  // (https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and
  8815  // `end_time`, use the `AND` operator. For example, the following queries are
  8816  // valid: ``` start_time="2023-08-23T19:20:33+00:00" AND
  8817  // end_time="2023-08-23T19:21:54+00:00" ``` ```
  8818  // start_time="2023-08-23T19:20:33+00:00" AND
  8819  // (event_types:"google.workspace.chat.space.v1.updated" OR
  8820  // event_types:"google.workspace.chat.message.v1.created") ``` The following
  8821  // queries are invalid: ``` start_time="2023-08-23T19:20:33+00:00" OR
  8822  // end_time="2023-08-23T19:21:54+00:00" ``` ```
  8823  // event_types:"google.workspace.chat.space.v1.updated" AND
  8824  // event_types:"google.workspace.chat.message.v1.created" ``` Invalid queries
  8825  // are rejected by the server with an `INVALID_ARGUMENT` error.
  8826  func (c *SpacesSpaceEventsListCall) Filter(filter string) *SpacesSpaceEventsListCall {
  8827  	c.urlParams_.Set("filter", filter)
  8828  	return c
  8829  }
  8830  
  8831  // PageSize sets the optional parameter "pageSize": The maximum number of space
  8832  // events returned. The service might return fewer than this value. Negative
  8833  // values return an `INVALID_ARGUMENT` error.
  8834  func (c *SpacesSpaceEventsListCall) PageSize(pageSize int64) *SpacesSpaceEventsListCall {
  8835  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8836  	return c
  8837  }
  8838  
  8839  // PageToken sets the optional parameter "pageToken": A page token, received
  8840  // from a previous list space events call. Provide this to retrieve the
  8841  // subsequent page. When paginating, all other parameters provided to list
  8842  // space events must match the call that provided the page token. Passing
  8843  // different values to the other parameters might lead to unexpected results.
  8844  func (c *SpacesSpaceEventsListCall) PageToken(pageToken string) *SpacesSpaceEventsListCall {
  8845  	c.urlParams_.Set("pageToken", pageToken)
  8846  	return c
  8847  }
  8848  
  8849  // Fields allows partial responses to be retrieved. See
  8850  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8851  // details.
  8852  func (c *SpacesSpaceEventsListCall) Fields(s ...googleapi.Field) *SpacesSpaceEventsListCall {
  8853  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8854  	return c
  8855  }
  8856  
  8857  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8858  // object's ETag matches the given value. This is useful for getting updates
  8859  // only after the object has changed since the last request.
  8860  func (c *SpacesSpaceEventsListCall) IfNoneMatch(entityTag string) *SpacesSpaceEventsListCall {
  8861  	c.ifNoneMatch_ = entityTag
  8862  	return c
  8863  }
  8864  
  8865  // Context sets the context to be used in this call's Do method.
  8866  func (c *SpacesSpaceEventsListCall) Context(ctx context.Context) *SpacesSpaceEventsListCall {
  8867  	c.ctx_ = ctx
  8868  	return c
  8869  }
  8870  
  8871  // Header returns a http.Header that can be modified by the caller to add
  8872  // headers to the request.
  8873  func (c *SpacesSpaceEventsListCall) Header() http.Header {
  8874  	if c.header_ == nil {
  8875  		c.header_ = make(http.Header)
  8876  	}
  8877  	return c.header_
  8878  }
  8879  
  8880  func (c *SpacesSpaceEventsListCall) doRequest(alt string) (*http.Response, error) {
  8881  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8882  	if c.ifNoneMatch_ != "" {
  8883  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8884  	}
  8885  	var body io.Reader = nil
  8886  	c.urlParams_.Set("alt", alt)
  8887  	c.urlParams_.Set("prettyPrint", "false")
  8888  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/spaceEvents")
  8889  	urls += "?" + c.urlParams_.Encode()
  8890  	req, err := http.NewRequest("GET", urls, body)
  8891  	if err != nil {
  8892  		return nil, err
  8893  	}
  8894  	req.Header = reqHeaders
  8895  	googleapi.Expand(req.URL, map[string]string{
  8896  		"parent": c.parent,
  8897  	})
  8898  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8899  }
  8900  
  8901  // Do executes the "chat.spaces.spaceEvents.list" call.
  8902  // Any non-2xx status code is an error. Response headers are in either
  8903  // *ListSpaceEventsResponse.ServerResponse.Header or (if a response was
  8904  // returned at all) in error.(*googleapi.Error).Header. Use
  8905  // googleapi.IsNotModified to check whether the returned error was because
  8906  // http.StatusNotModified was returned.
  8907  func (c *SpacesSpaceEventsListCall) Do(opts ...googleapi.CallOption) (*ListSpaceEventsResponse, error) {
  8908  	gensupport.SetOptions(c.urlParams_, opts...)
  8909  	res, err := c.doRequest("json")
  8910  	if res != nil && res.StatusCode == http.StatusNotModified {
  8911  		if res.Body != nil {
  8912  			res.Body.Close()
  8913  		}
  8914  		return nil, gensupport.WrapError(&googleapi.Error{
  8915  			Code:   res.StatusCode,
  8916  			Header: res.Header,
  8917  		})
  8918  	}
  8919  	if err != nil {
  8920  		return nil, err
  8921  	}
  8922  	defer googleapi.CloseBody(res)
  8923  	if err := googleapi.CheckResponse(res); err != nil {
  8924  		return nil, gensupport.WrapError(err)
  8925  	}
  8926  	ret := &ListSpaceEventsResponse{
  8927  		ServerResponse: googleapi.ServerResponse{
  8928  			Header:         res.Header,
  8929  			HTTPStatusCode: res.StatusCode,
  8930  		},
  8931  	}
  8932  	target := &ret
  8933  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8934  		return nil, err
  8935  	}
  8936  	return ret, nil
  8937  }
  8938  
  8939  // Pages invokes f for each page of results.
  8940  // A non-nil error returned from f will halt the iteration.
  8941  // The provided context supersedes any context provided to the Context method.
  8942  func (c *SpacesSpaceEventsListCall) Pages(ctx context.Context, f func(*ListSpaceEventsResponse) error) error {
  8943  	c.ctx_ = ctx
  8944  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8945  	for {
  8946  		x, err := c.Do()
  8947  		if err != nil {
  8948  			return err
  8949  		}
  8950  		if err := f(x); err != nil {
  8951  			return err
  8952  		}
  8953  		if x.NextPageToken == "" {
  8954  			return nil
  8955  		}
  8956  		c.PageToken(x.NextPageToken)
  8957  	}
  8958  }
  8959  
  8960  type UsersSpacesGetSpaceReadStateCall struct {
  8961  	s            *Service
  8962  	name         string
  8963  	urlParams_   gensupport.URLParams
  8964  	ifNoneMatch_ string
  8965  	ctx_         context.Context
  8966  	header_      http.Header
  8967  }
  8968  
  8969  // GetSpaceReadState: Returns details about a user's read state within a space,
  8970  // used to identify read and unread messages. For an example, see Get details
  8971  // about a user's space read state
  8972  // (https://developers.google.com/workspace/chat/get-space-read-state).
  8973  // Requires user authentication
  8974  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  8975  //
  8976  //   - name: Resource name of the space read state to retrieve. Only supports
  8977  //     getting read state for the calling user. To refer to the calling user, set
  8978  //     one of the following: - The `me` alias. For example,
  8979  //     `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address.
  8980  //     For example, `users/user@example.com/spaces/{space}/spaceReadState`. -
  8981  //     Their user id. For example,
  8982  //     `users/123456789/spaces/{space}/spaceReadState`. Format:
  8983  //     users/{user}/spaces/{space}/spaceReadState.
  8984  func (r *UsersSpacesService) GetSpaceReadState(name string) *UsersSpacesGetSpaceReadStateCall {
  8985  	c := &UsersSpacesGetSpaceReadStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8986  	c.name = name
  8987  	return c
  8988  }
  8989  
  8990  // Fields allows partial responses to be retrieved. See
  8991  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8992  // details.
  8993  func (c *UsersSpacesGetSpaceReadStateCall) Fields(s ...googleapi.Field) *UsersSpacesGetSpaceReadStateCall {
  8994  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8995  	return c
  8996  }
  8997  
  8998  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8999  // object's ETag matches the given value. This is useful for getting updates
  9000  // only after the object has changed since the last request.
  9001  func (c *UsersSpacesGetSpaceReadStateCall) IfNoneMatch(entityTag string) *UsersSpacesGetSpaceReadStateCall {
  9002  	c.ifNoneMatch_ = entityTag
  9003  	return c
  9004  }
  9005  
  9006  // Context sets the context to be used in this call's Do method.
  9007  func (c *UsersSpacesGetSpaceReadStateCall) Context(ctx context.Context) *UsersSpacesGetSpaceReadStateCall {
  9008  	c.ctx_ = ctx
  9009  	return c
  9010  }
  9011  
  9012  // Header returns a http.Header that can be modified by the caller to add
  9013  // headers to the request.
  9014  func (c *UsersSpacesGetSpaceReadStateCall) Header() http.Header {
  9015  	if c.header_ == nil {
  9016  		c.header_ = make(http.Header)
  9017  	}
  9018  	return c.header_
  9019  }
  9020  
  9021  func (c *UsersSpacesGetSpaceReadStateCall) doRequest(alt string) (*http.Response, error) {
  9022  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9023  	if c.ifNoneMatch_ != "" {
  9024  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9025  	}
  9026  	var body io.Reader = nil
  9027  	c.urlParams_.Set("alt", alt)
  9028  	c.urlParams_.Set("prettyPrint", "false")
  9029  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9030  	urls += "?" + c.urlParams_.Encode()
  9031  	req, err := http.NewRequest("GET", urls, body)
  9032  	if err != nil {
  9033  		return nil, err
  9034  	}
  9035  	req.Header = reqHeaders
  9036  	googleapi.Expand(req.URL, map[string]string{
  9037  		"name": c.name,
  9038  	})
  9039  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9040  }
  9041  
  9042  // Do executes the "chat.users.spaces.getSpaceReadState" call.
  9043  // Any non-2xx status code is an error. Response headers are in either
  9044  // *SpaceReadState.ServerResponse.Header or (if a response was returned at all)
  9045  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9046  // whether the returned error was because http.StatusNotModified was returned.
  9047  func (c *UsersSpacesGetSpaceReadStateCall) Do(opts ...googleapi.CallOption) (*SpaceReadState, error) {
  9048  	gensupport.SetOptions(c.urlParams_, opts...)
  9049  	res, err := c.doRequest("json")
  9050  	if res != nil && res.StatusCode == http.StatusNotModified {
  9051  		if res.Body != nil {
  9052  			res.Body.Close()
  9053  		}
  9054  		return nil, gensupport.WrapError(&googleapi.Error{
  9055  			Code:   res.StatusCode,
  9056  			Header: res.Header,
  9057  		})
  9058  	}
  9059  	if err != nil {
  9060  		return nil, err
  9061  	}
  9062  	defer googleapi.CloseBody(res)
  9063  	if err := googleapi.CheckResponse(res); err != nil {
  9064  		return nil, gensupport.WrapError(err)
  9065  	}
  9066  	ret := &SpaceReadState{
  9067  		ServerResponse: googleapi.ServerResponse{
  9068  			Header:         res.Header,
  9069  			HTTPStatusCode: res.StatusCode,
  9070  		},
  9071  	}
  9072  	target := &ret
  9073  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9074  		return nil, err
  9075  	}
  9076  	return ret, nil
  9077  }
  9078  
  9079  type UsersSpacesUpdateSpaceReadStateCall struct {
  9080  	s              *Service
  9081  	name           string
  9082  	spacereadstate *SpaceReadState
  9083  	urlParams_     gensupport.URLParams
  9084  	ctx_           context.Context
  9085  	header_        http.Header
  9086  }
  9087  
  9088  // UpdateSpaceReadState: Updates a user's read state within a space, used to
  9089  // identify read and unread messages. For an example, see Update a user's space
  9090  // read state
  9091  // (https://developers.google.com/workspace/chat/update-space-read-state).
  9092  // Requires user authentication
  9093  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  9094  //
  9095  //   - name: Resource name of the space read state. Format:
  9096  //     `users/{user}/spaces/{space}/spaceReadState`.
  9097  func (r *UsersSpacesService) UpdateSpaceReadState(name string, spacereadstate *SpaceReadState) *UsersSpacesUpdateSpaceReadStateCall {
  9098  	c := &UsersSpacesUpdateSpaceReadStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9099  	c.name = name
  9100  	c.spacereadstate = spacereadstate
  9101  	return c
  9102  }
  9103  
  9104  // UpdateMask sets the optional parameter "updateMask": Required. The field
  9105  // paths to update. Currently supported field paths: - `last_read_time` When
  9106  // the `last_read_time` is before the latest message create time, the space
  9107  // appears as unread in the UI. To mark the space as read, set `last_read_time`
  9108  // to any value later (larger) than the latest message create time. The
  9109  // `last_read_time` is coerced to match the latest message create time. Note
  9110  // that the space read state only affects the read state of messages that are
  9111  // visible in the space's top-level conversation. Replies in threads are
  9112  // unaffected by this timestamp, and instead rely on the thread read state.
  9113  func (c *UsersSpacesUpdateSpaceReadStateCall) UpdateMask(updateMask string) *UsersSpacesUpdateSpaceReadStateCall {
  9114  	c.urlParams_.Set("updateMask", updateMask)
  9115  	return c
  9116  }
  9117  
  9118  // Fields allows partial responses to be retrieved. See
  9119  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9120  // details.
  9121  func (c *UsersSpacesUpdateSpaceReadStateCall) Fields(s ...googleapi.Field) *UsersSpacesUpdateSpaceReadStateCall {
  9122  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9123  	return c
  9124  }
  9125  
  9126  // Context sets the context to be used in this call's Do method.
  9127  func (c *UsersSpacesUpdateSpaceReadStateCall) Context(ctx context.Context) *UsersSpacesUpdateSpaceReadStateCall {
  9128  	c.ctx_ = ctx
  9129  	return c
  9130  }
  9131  
  9132  // Header returns a http.Header that can be modified by the caller to add
  9133  // headers to the request.
  9134  func (c *UsersSpacesUpdateSpaceReadStateCall) Header() http.Header {
  9135  	if c.header_ == nil {
  9136  		c.header_ = make(http.Header)
  9137  	}
  9138  	return c.header_
  9139  }
  9140  
  9141  func (c *UsersSpacesUpdateSpaceReadStateCall) doRequest(alt string) (*http.Response, error) {
  9142  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9143  	var body io.Reader = nil
  9144  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.spacereadstate)
  9145  	if err != nil {
  9146  		return nil, err
  9147  	}
  9148  	c.urlParams_.Set("alt", alt)
  9149  	c.urlParams_.Set("prettyPrint", "false")
  9150  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9151  	urls += "?" + c.urlParams_.Encode()
  9152  	req, err := http.NewRequest("PATCH", urls, body)
  9153  	if err != nil {
  9154  		return nil, err
  9155  	}
  9156  	req.Header = reqHeaders
  9157  	googleapi.Expand(req.URL, map[string]string{
  9158  		"name": c.name,
  9159  	})
  9160  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9161  }
  9162  
  9163  // Do executes the "chat.users.spaces.updateSpaceReadState" call.
  9164  // Any non-2xx status code is an error. Response headers are in either
  9165  // *SpaceReadState.ServerResponse.Header or (if a response was returned at all)
  9166  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9167  // whether the returned error was because http.StatusNotModified was returned.
  9168  func (c *UsersSpacesUpdateSpaceReadStateCall) Do(opts ...googleapi.CallOption) (*SpaceReadState, error) {
  9169  	gensupport.SetOptions(c.urlParams_, opts...)
  9170  	res, err := c.doRequest("json")
  9171  	if res != nil && res.StatusCode == http.StatusNotModified {
  9172  		if res.Body != nil {
  9173  			res.Body.Close()
  9174  		}
  9175  		return nil, gensupport.WrapError(&googleapi.Error{
  9176  			Code:   res.StatusCode,
  9177  			Header: res.Header,
  9178  		})
  9179  	}
  9180  	if err != nil {
  9181  		return nil, err
  9182  	}
  9183  	defer googleapi.CloseBody(res)
  9184  	if err := googleapi.CheckResponse(res); err != nil {
  9185  		return nil, gensupport.WrapError(err)
  9186  	}
  9187  	ret := &SpaceReadState{
  9188  		ServerResponse: googleapi.ServerResponse{
  9189  			Header:         res.Header,
  9190  			HTTPStatusCode: res.StatusCode,
  9191  		},
  9192  	}
  9193  	target := &ret
  9194  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9195  		return nil, err
  9196  	}
  9197  	return ret, nil
  9198  }
  9199  
  9200  type UsersSpacesThreadsGetThreadReadStateCall struct {
  9201  	s            *Service
  9202  	name         string
  9203  	urlParams_   gensupport.URLParams
  9204  	ifNoneMatch_ string
  9205  	ctx_         context.Context
  9206  	header_      http.Header
  9207  }
  9208  
  9209  // GetThreadReadState: Returns details about a user's read state within a
  9210  // thread, used to identify read and unread messages. For an example, see Get
  9211  // details about a user's thread read state
  9212  // (https://developers.google.com/workspace/chat/get-thread-read-state).
  9213  // Requires user authentication
  9214  // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
  9215  //
  9216  //   - name: Resource name of the thread read state to retrieve. Only supports
  9217  //     getting read state for the calling user. To refer to the calling user, set
  9218  //     one of the following: - The `me` alias. For example,
  9219  //     `users/me/spaces/{space}/threads/{thread}/threadReadState`. - Their
  9220  //     Workspace email address. For example,
  9221  //     `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`.
  9222  //   - Their user id. For example,
  9223  //     `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. Format:
  9224  //     users/{user}/spaces/{space}/threads/{thread}/threadReadState.
  9225  func (r *UsersSpacesThreadsService) GetThreadReadState(name string) *UsersSpacesThreadsGetThreadReadStateCall {
  9226  	c := &UsersSpacesThreadsGetThreadReadStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9227  	c.name = name
  9228  	return c
  9229  }
  9230  
  9231  // Fields allows partial responses to be retrieved. See
  9232  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9233  // details.
  9234  func (c *UsersSpacesThreadsGetThreadReadStateCall) Fields(s ...googleapi.Field) *UsersSpacesThreadsGetThreadReadStateCall {
  9235  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9236  	return c
  9237  }
  9238  
  9239  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9240  // object's ETag matches the given value. This is useful for getting updates
  9241  // only after the object has changed since the last request.
  9242  func (c *UsersSpacesThreadsGetThreadReadStateCall) IfNoneMatch(entityTag string) *UsersSpacesThreadsGetThreadReadStateCall {
  9243  	c.ifNoneMatch_ = entityTag
  9244  	return c
  9245  }
  9246  
  9247  // Context sets the context to be used in this call's Do method.
  9248  func (c *UsersSpacesThreadsGetThreadReadStateCall) Context(ctx context.Context) *UsersSpacesThreadsGetThreadReadStateCall {
  9249  	c.ctx_ = ctx
  9250  	return c
  9251  }
  9252  
  9253  // Header returns a http.Header that can be modified by the caller to add
  9254  // headers to the request.
  9255  func (c *UsersSpacesThreadsGetThreadReadStateCall) Header() http.Header {
  9256  	if c.header_ == nil {
  9257  		c.header_ = make(http.Header)
  9258  	}
  9259  	return c.header_
  9260  }
  9261  
  9262  func (c *UsersSpacesThreadsGetThreadReadStateCall) doRequest(alt string) (*http.Response, error) {
  9263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9264  	if c.ifNoneMatch_ != "" {
  9265  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9266  	}
  9267  	var body io.Reader = nil
  9268  	c.urlParams_.Set("alt", alt)
  9269  	c.urlParams_.Set("prettyPrint", "false")
  9270  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9271  	urls += "?" + c.urlParams_.Encode()
  9272  	req, err := http.NewRequest("GET", urls, body)
  9273  	if err != nil {
  9274  		return nil, err
  9275  	}
  9276  	req.Header = reqHeaders
  9277  	googleapi.Expand(req.URL, map[string]string{
  9278  		"name": c.name,
  9279  	})
  9280  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9281  }
  9282  
  9283  // Do executes the "chat.users.spaces.threads.getThreadReadState" call.
  9284  // Any non-2xx status code is an error. Response headers are in either
  9285  // *ThreadReadState.ServerResponse.Header or (if a response was returned at
  9286  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9287  // check whether the returned error was because http.StatusNotModified was
  9288  // returned.
  9289  func (c *UsersSpacesThreadsGetThreadReadStateCall) Do(opts ...googleapi.CallOption) (*ThreadReadState, error) {
  9290  	gensupport.SetOptions(c.urlParams_, opts...)
  9291  	res, err := c.doRequest("json")
  9292  	if res != nil && res.StatusCode == http.StatusNotModified {
  9293  		if res.Body != nil {
  9294  			res.Body.Close()
  9295  		}
  9296  		return nil, gensupport.WrapError(&googleapi.Error{
  9297  			Code:   res.StatusCode,
  9298  			Header: res.Header,
  9299  		})
  9300  	}
  9301  	if err != nil {
  9302  		return nil, err
  9303  	}
  9304  	defer googleapi.CloseBody(res)
  9305  	if err := googleapi.CheckResponse(res); err != nil {
  9306  		return nil, gensupport.WrapError(err)
  9307  	}
  9308  	ret := &ThreadReadState{
  9309  		ServerResponse: googleapi.ServerResponse{
  9310  			Header:         res.Header,
  9311  			HTTPStatusCode: res.StatusCode,
  9312  		},
  9313  	}
  9314  	target := &ret
  9315  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9316  		return nil, err
  9317  	}
  9318  	return ret, nil
  9319  }
  9320  

View as plain text