...

Source file src/google.golang.org/api/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go

Documentation: google.golang.org/api/contactcenteraiplatform/v1alpha1

     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 contactcenteraiplatform provides access to the Contact Center AI Platform API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/solutions/contact-center-ai-platform
    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/contactcenteraiplatform/v1alpha1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	contactcenteraiplatformService, err := contactcenteraiplatform.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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	contactcenteraiplatformService, err := contactcenteraiplatform.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	contactcenteraiplatformService, err := contactcenteraiplatform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package contactcenteraiplatform // import "google.golang.org/api/contactcenteraiplatform/v1alpha1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "contactcenteraiplatform:v1alpha1"
    90  const apiName = "contactcenteraiplatform"
    91  const apiVersion = "v1alpha1"
    92  const basePath = "https://contactcenteraiplatform.googleapis.com/"
    93  const basePathTemplate = "https://contactcenteraiplatform.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://contactcenteraiplatform.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.ContactCenters = NewProjectsLocationsContactCentersService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsLocationsService struct {
   177  	s *Service
   178  
   179  	ContactCenters *ProjectsLocationsContactCentersService
   180  
   181  	Operations *ProjectsLocationsOperationsService
   182  }
   183  
   184  func NewProjectsLocationsContactCentersService(s *Service) *ProjectsLocationsContactCentersService {
   185  	rs := &ProjectsLocationsContactCentersService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsContactCentersService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   194  	rs := &ProjectsLocationsOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  // AdminUser: Message storing info about the first admin user. Next ID: 3
   203  type AdminUser struct {
   204  	// FamilyName: Optional. Last/family name of the first admin user.
   205  	FamilyName string `json:"familyName,omitempty"`
   206  	// GivenName: Optional. First/given name of the first admin user.
   207  	GivenName string `json:"givenName,omitempty"`
   208  	// ForceSendFields is a list of field names (e.g. "FamilyName") to
   209  	// unconditionally include in API requests. By default, fields with empty or
   210  	// default values are omitted from API requests. See
   211  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   212  	// details.
   213  	ForceSendFields []string `json:"-"`
   214  	// NullFields is a list of field names (e.g. "FamilyName") to include in API
   215  	// requests with the JSON null value. By default, fields with empty values are
   216  	// omitted from API requests. See
   217  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   218  	NullFields []string `json:"-"`
   219  }
   220  
   221  func (s *AdminUser) MarshalJSON() ([]byte, error) {
   222  	type NoMethod AdminUser
   223  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   224  }
   225  
   226  // CancelOperationRequest: The request message for Operations.CancelOperation.
   227  type CancelOperationRequest struct {
   228  }
   229  
   230  // ContactCenter: Message describing ContactCenter object Next ID: 22
   231  type ContactCenter struct {
   232  	// AdminUser: Optional. Info about the first admin user, such as given name and
   233  	// family name.
   234  	AdminUser *AdminUser `json:"adminUser,omitempty"`
   235  	// CcaipManagedUsers: Optional. Whether to enable users to be created in the
   236  	// CCAIP-instance concurrently to having users in Cloud identity
   237  	CcaipManagedUsers bool `json:"ccaipManagedUsers,omitempty"`
   238  	// CreateTime: Output only. [Output only] Create time stamp
   239  	CreateTime string `json:"createTime,omitempty"`
   240  	// CustomerDomainPrefix: Required. Immutable. At least 2 and max 16 char long,
   241  	// must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).
   242  	CustomerDomainPrefix string `json:"customerDomainPrefix,omitempty"`
   243  	// DisplayName: Required. A user friendly name for the ContactCenter.
   244  	DisplayName string `json:"displayName,omitempty"`
   245  	// Early: Optional. Early release channel.
   246  	Early *Early `json:"early,omitempty"`
   247  	// InstanceConfig: The configuration of this instance, it is currently
   248  	// immutable once created.
   249  	InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
   250  	// KmsKey: Immutable. The KMS key name to encrypt the user input
   251  	// (`ContactCenter`).
   252  	KmsKey string `json:"kmsKey,omitempty"`
   253  	// Labels: Labels as key value pairs
   254  	Labels map[string]string `json:"labels,omitempty"`
   255  	// Name: name of resource
   256  	Name string `json:"name,omitempty"`
   257  	// Normal: Optional. Normal release channel.
   258  	Normal *Normal `json:"normal,omitempty"`
   259  	// PrivateComponents: Output only. A list of UJET components that should be
   260  	// privately accessed. This field is set by reading settings from the data
   261  	// plane. For more information about the format of the component please refer
   262  	// to go/ccaip-vpc-sc-org-policy. This field is must be fully populated only
   263  	// for Create/Update resource operations. The main use case for this field is
   264  	// OrgPolicy checks via CPE.
   265  	PrivateComponents []string `json:"privateComponents,omitempty"`
   266  	// SamlParams: Optional. Params that sets up Google as IdP.
   267  	SamlParams *SAMLParams `json:"samlParams,omitempty"`
   268  	// State: Output only. The state of this contact center.
   269  	//
   270  	// Possible values:
   271  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
   272  	// is omitted.
   273  	//   "STATE_DEPLOYING" - State DEPLOYING
   274  	//   "STATE_DEPLOYED" - State DEPLOYED
   275  	//   "STATE_TERMINATING" - State TERMINATING
   276  	//   "STATE_FAILED" - State FAILED
   277  	//   "STATE_TERMINATING_FAILED" - State TERMINATING_FAILED
   278  	//   "STATE_TERMINATED" - State TERMINATED
   279  	//   "STATE_IN_GRACE_PERIOD" - State IN_GRACE_PERIOD
   280  	State string `json:"state,omitempty"`
   281  	// UpdateTime: Output only. [Output only] Update time stamp
   282  	UpdateTime string `json:"updateTime,omitempty"`
   283  	// Uris: Output only. URIs to access the deployed ContactCenters.
   284  	Uris *URIs `json:"uris,omitempty"`
   285  	// UserEmail: Optional. Email address of the first admin user.
   286  	UserEmail string `json:"userEmail,omitempty"`
   287  
   288  	// ServerResponse contains the HTTP response code and headers from the server.
   289  	googleapi.ServerResponse `json:"-"`
   290  	// ForceSendFields is a list of field names (e.g. "AdminUser") to
   291  	// unconditionally include in API requests. By default, fields with empty or
   292  	// default values are omitted from API requests. See
   293  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   294  	// details.
   295  	ForceSendFields []string `json:"-"`
   296  	// NullFields is a list of field names (e.g. "AdminUser") to include in API
   297  	// requests with the JSON null value. By default, fields with empty values are
   298  	// omitted from API requests. See
   299  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   300  	NullFields []string `json:"-"`
   301  }
   302  
   303  func (s *ContactCenter) MarshalJSON() ([]byte, error) {
   304  	type NoMethod ContactCenter
   305  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   306  }
   307  
   308  // ContactCenterQuota: Represents a quota for contact centers.
   309  type ContactCenterQuota struct {
   310  	// ContactCenterCountLimit: Deprecated: Use the Quota fields instead. Reflects
   311  	// the count limit of contact centers on a billing account.
   312  	ContactCenterCountLimit int64 `json:"contactCenterCountLimit,omitempty"`
   313  	// ContactCenterCountSum: Deprecated: Use the Quota fields instead. Reflects
   314  	// the count sum of contact centers on a billing account.
   315  	ContactCenterCountSum int64 `json:"contactCenterCountSum,omitempty"`
   316  	// Quotas: Quota details per contact center instance type.
   317  	Quotas []*Quota `json:"quotas,omitempty"`
   318  
   319  	// ServerResponse contains the HTTP response code and headers from the server.
   320  	googleapi.ServerResponse `json:"-"`
   321  	// ForceSendFields is a list of field names (e.g. "ContactCenterCountLimit") to
   322  	// unconditionally include in API requests. By default, fields with empty or
   323  	// default values are omitted from API requests. See
   324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   325  	// details.
   326  	ForceSendFields []string `json:"-"`
   327  	// NullFields is a list of field names (e.g. "ContactCenterCountLimit") to
   328  	// include in API requests with the JSON null value. By default, fields with
   329  	// empty values are omitted from API requests. See
   330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   331  	NullFields []string `json:"-"`
   332  }
   333  
   334  func (s *ContactCenterQuota) MarshalJSON() ([]byte, error) {
   335  	type NoMethod ContactCenterQuota
   336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   337  }
   338  
   339  // Early: First Channel to receive the updates. Meant to dev/test instances
   340  type Early struct {
   341  }
   342  
   343  // Empty: A generic empty message that you can re-use to avoid defining
   344  // duplicated empty messages in your APIs. A typical example is to use it as
   345  // the request or the response type of an API method. For instance: service Foo
   346  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   347  type Empty struct {
   348  	// ServerResponse contains the HTTP response code and headers from the server.
   349  	googleapi.ServerResponse `json:"-"`
   350  }
   351  
   352  // GoogleCloudCommonOperationMetadata: Represents the metadata of the
   353  // long-running operation.
   354  type GoogleCloudCommonOperationMetadata struct {
   355  	// ApiVersion: Output only. API version used to start the operation.
   356  	ApiVersion string `json:"apiVersion,omitempty"`
   357  	// CancelRequested: Output only. Identifies whether the user has requested
   358  	// cancellation of the operation. Operations that have been cancelled
   359  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
   360  	// corresponding to `Code.CANCELLED`.
   361  	CancelRequested bool `json:"cancelRequested,omitempty"`
   362  	// CreateTime: Output only. The time the operation was created.
   363  	CreateTime string `json:"createTime,omitempty"`
   364  	// EndTime: Output only. The time the operation finished running.
   365  	EndTime string `json:"endTime,omitempty"`
   366  	// StatusDetail: Output only. Human-readable status of the operation, if any.
   367  	StatusDetail string `json:"statusDetail,omitempty"`
   368  	// Target: Output only. Server-defined resource path for the target of the
   369  	// operation.
   370  	Target string `json:"target,omitempty"`
   371  	// Verb: Output only. Name of the verb executed by the operation.
   372  	Verb string `json:"verb,omitempty"`
   373  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   374  	// unconditionally include in API requests. By default, fields with empty or
   375  	// default values are omitted from API requests. See
   376  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   377  	// details.
   378  	ForceSendFields []string `json:"-"`
   379  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   380  	// requests with the JSON null value. By default, fields with empty values are
   381  	// omitted from API requests. See
   382  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   383  	NullFields []string `json:"-"`
   384  }
   385  
   386  func (s *GoogleCloudCommonOperationMetadata) MarshalJSON() ([]byte, error) {
   387  	type NoMethod GoogleCloudCommonOperationMetadata
   388  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   389  }
   390  
   391  // InstanceConfig: Message storing the instance configuration.
   392  type InstanceConfig struct {
   393  	// InstanceSize: The instance size of this the instance configuration.
   394  	//
   395  	// Possible values:
   396  	//   "INSTANCE_SIZE_UNSPECIFIED" - The default value. This value is used if the
   397  	// state is omitted.
   398  	//   "STANDARD_SMALL" - Instance Size STANDARD_SMALL.
   399  	//   "STANDARD_MEDIUM" - Instance Size STANDARD_MEDIUM.
   400  	//   "STANDARD_LARGE" - Instance Size STANDARD_LARGE.
   401  	//   "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE.
   402  	//   "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE.
   403  	//   "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE.
   404  	//   "DEV_XSMALL" - Instance Size DEV_EXTRA_SMALL.
   405  	//   "MULTIREGION_SMALL" - Instance Size MULTIREGION_SMALL
   406  	//   "MULTIREGION_MEDIUM" - Instance Size MULTIREGION_MEDIUM
   407  	//   "MULTIREGION_LARGE" - Instance Size MULTIREGION_LARGE
   408  	//   "MULTIREGION_XLARGE" - Instance Size MULTIREGION_XLARGE
   409  	//   "MULTIREGION_2XLARGE" - Instance Size MULTIREGION_2XLARGE.
   410  	//   "MULTIREGION_3XLARGE" - Instance Size MULTIREGION_3XLARGE.
   411  	InstanceSize string `json:"instanceSize,omitempty"`
   412  	// ForceSendFields is a list of field names (e.g. "InstanceSize") to
   413  	// unconditionally include in API requests. By default, fields with empty or
   414  	// default values are omitted from API requests. See
   415  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   416  	// details.
   417  	ForceSendFields []string `json:"-"`
   418  	// NullFields is a list of field names (e.g. "InstanceSize") to include in API
   419  	// requests with the JSON null value. By default, fields with empty values are
   420  	// omitted from API requests. See
   421  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   422  	NullFields []string `json:"-"`
   423  }
   424  
   425  func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
   426  	type NoMethod InstanceConfig
   427  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   428  }
   429  
   430  // ListContactCentersResponse: Message for response to listing ContactCenters
   431  type ListContactCentersResponse struct {
   432  	// ContactCenters: The list of ContactCenter
   433  	ContactCenters []*ContactCenter `json:"contactCenters,omitempty"`
   434  	// NextPageToken: A token identifying a page of results the server should
   435  	// return.
   436  	NextPageToken string `json:"nextPageToken,omitempty"`
   437  	// Unreachable: Locations that could not be reached.
   438  	Unreachable []string `json:"unreachable,omitempty"`
   439  
   440  	// ServerResponse contains the HTTP response code and headers from the server.
   441  	googleapi.ServerResponse `json:"-"`
   442  	// ForceSendFields is a list of field names (e.g. "ContactCenters") to
   443  	// unconditionally include in API requests. By default, fields with empty or
   444  	// default values are omitted from API requests. See
   445  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   446  	// details.
   447  	ForceSendFields []string `json:"-"`
   448  	// NullFields is a list of field names (e.g. "ContactCenters") to include in
   449  	// API requests with the JSON null value. By default, fields with empty values
   450  	// are omitted from API requests. See
   451  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   452  	NullFields []string `json:"-"`
   453  }
   454  
   455  func (s *ListContactCentersResponse) MarshalJSON() ([]byte, error) {
   456  	type NoMethod ListContactCentersResponse
   457  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   458  }
   459  
   460  // ListLocationsResponse: The response message for Locations.ListLocations.
   461  type ListLocationsResponse struct {
   462  	// Locations: A list of locations that matches the specified filter in the
   463  	// request.
   464  	Locations []*Location `json:"locations,omitempty"`
   465  	// NextPageToken: The standard List next-page token.
   466  	NextPageToken string `json:"nextPageToken,omitempty"`
   467  
   468  	// ServerResponse contains the HTTP response code and headers from the server.
   469  	googleapi.ServerResponse `json:"-"`
   470  	// ForceSendFields is a list of field names (e.g. "Locations") to
   471  	// unconditionally include in API requests. By default, fields with empty or
   472  	// default values are omitted from API requests. See
   473  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   474  	// details.
   475  	ForceSendFields []string `json:"-"`
   476  	// NullFields is a list of field names (e.g. "Locations") to include in API
   477  	// requests with the JSON null value. By default, fields with empty values are
   478  	// omitted from API requests. See
   479  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   480  	NullFields []string `json:"-"`
   481  }
   482  
   483  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   484  	type NoMethod ListLocationsResponse
   485  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   486  }
   487  
   488  // ListOperationsResponse: The response message for Operations.ListOperations.
   489  type ListOperationsResponse struct {
   490  	// NextPageToken: The standard List next-page token.
   491  	NextPageToken string `json:"nextPageToken,omitempty"`
   492  	// Operations: A list of operations that matches the specified filter in the
   493  	// request.
   494  	Operations []*Operation `json:"operations,omitempty"`
   495  
   496  	// ServerResponse contains the HTTP response code and headers from the server.
   497  	googleapi.ServerResponse `json:"-"`
   498  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   499  	// unconditionally include in API requests. By default, fields with empty or
   500  	// default values are omitted from API requests. See
   501  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   502  	// details.
   503  	ForceSendFields []string `json:"-"`
   504  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   505  	// requests with the JSON null value. By default, fields with empty values are
   506  	// omitted from API requests. See
   507  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   508  	NullFields []string `json:"-"`
   509  }
   510  
   511  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   512  	type NoMethod ListOperationsResponse
   513  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   514  }
   515  
   516  // Location: A resource that represents a Google Cloud location.
   517  type Location struct {
   518  	// DisplayName: The friendly name for this location, typically a nearby city
   519  	// name. For example, "Tokyo".
   520  	DisplayName string `json:"displayName,omitempty"`
   521  	// Labels: Cross-service attributes for the location. For example
   522  	// {"cloud.googleapis.com/region": "us-east1"}
   523  	Labels map[string]string `json:"labels,omitempty"`
   524  	// LocationId: The canonical id for this location. For example: "us-east1".
   525  	LocationId string `json:"locationId,omitempty"`
   526  	// Metadata: Service-specific metadata. For example the available capacity at
   527  	// the given location.
   528  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   529  	// Name: Resource name for the location, which may vary between
   530  	// implementations. For example:
   531  	// "projects/example-project/locations/us-east1"
   532  	Name string `json:"name,omitempty"`
   533  
   534  	// ServerResponse contains the HTTP response code and headers from the server.
   535  	googleapi.ServerResponse `json:"-"`
   536  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   537  	// unconditionally include in API requests. By default, fields with empty or
   538  	// default values are omitted from API requests. See
   539  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   540  	// details.
   541  	ForceSendFields []string `json:"-"`
   542  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   543  	// requests with the JSON null value. By default, fields with empty values are
   544  	// omitted from API requests. See
   545  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   546  	NullFields []string `json:"-"`
   547  }
   548  
   549  func (s *Location) MarshalJSON() ([]byte, error) {
   550  	type NoMethod Location
   551  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   552  }
   553  
   554  // Normal: Instances in this Channel will receive updates after all instances
   555  // in `Early` were updated + 2 days.
   556  type Normal struct {
   557  }
   558  
   559  // Operation: This resource represents a long-running operation that is the
   560  // result of a network API call.
   561  type Operation struct {
   562  	// Done: If the value is `false`, it means the operation is still in progress.
   563  	// If `true`, the operation is completed, and either `error` or `response` is
   564  	// available.
   565  	Done bool `json:"done,omitempty"`
   566  	// Error: The error result of the operation in case of failure or cancellation.
   567  	Error *Status `json:"error,omitempty"`
   568  	// Metadata: Service-specific metadata associated with the operation. It
   569  	// typically contains progress information and common metadata such as create
   570  	// time. Some services might not provide such metadata. Any method that returns
   571  	// a long-running operation should document the metadata type, if any.
   572  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   573  	// Name: The server-assigned name, which is only unique within the same service
   574  	// that originally returns it. If you use the default HTTP mapping, the `name`
   575  	// should be a resource name ending with `operations/{unique_id}`.
   576  	Name string `json:"name,omitempty"`
   577  	// Response: The normal, successful response of the operation. If the original
   578  	// method returns no data on success, such as `Delete`, the response is
   579  	// `google.protobuf.Empty`. If the original method is standard
   580  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   581  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   582  	// original method name. For example, if the original method name is
   583  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   584  	Response googleapi.RawMessage `json:"response,omitempty"`
   585  
   586  	// ServerResponse contains the HTTP response code and headers from the server.
   587  	googleapi.ServerResponse `json:"-"`
   588  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   589  	// include in API requests. By default, fields with empty or default values are
   590  	// omitted from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   592  	// details.
   593  	ForceSendFields []string `json:"-"`
   594  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   595  	// with the JSON null value. By default, fields with empty values are omitted
   596  	// from API requests. See
   597  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   598  	NullFields []string `json:"-"`
   599  }
   600  
   601  func (s *Operation) MarshalJSON() ([]byte, error) {
   602  	type NoMethod Operation
   603  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   604  }
   605  
   606  // OperationMetadata: Represents the metadata of the long-running operation.
   607  type OperationMetadata struct {
   608  	// ApiVersion: Output only. API version used to start the operation.
   609  	ApiVersion string `json:"apiVersion,omitempty"`
   610  	// ContactCenter: Contact center information for this request
   611  	ContactCenter *ContactCenter `json:"contactCenter,omitempty"`
   612  	// CreateTime: Output only. The time the operation was created.
   613  	CreateTime string `json:"createTime,omitempty"`
   614  	// EndTime: Output only. The time the operation finished running.
   615  	EndTime string `json:"endTime,omitempty"`
   616  	// RequestedCancellation: Output only. Identifies whether the user has
   617  	// requested cancellation of the operation. Operations that have been cancelled
   618  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
   619  	// corresponding to `Code.CANCELLED`.
   620  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
   621  	// StatusMessage: Output only. Human-readable status of the operation, if any.
   622  	StatusMessage string `json:"statusMessage,omitempty"`
   623  	// Target: Output only. Server-defined resource path for the target of the
   624  	// operation.
   625  	Target string `json:"target,omitempty"`
   626  	// Verb: Output only. Name of the verb executed by the operation.
   627  	Verb string `json:"verb,omitempty"`
   628  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   629  	// unconditionally include in API requests. By default, fields with empty or
   630  	// default values are omitted from API requests. See
   631  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   632  	// details.
   633  	ForceSendFields []string `json:"-"`
   634  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   635  	// requests with the JSON null value. By default, fields with empty values are
   636  	// omitted from API requests. See
   637  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   638  	NullFields []string `json:"-"`
   639  }
   640  
   641  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
   642  	type NoMethod OperationMetadata
   643  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   644  }
   645  
   646  // Quota: Quota details.
   647  type Quota struct {
   648  	// ContactCenterCountLimit: Reflects the count limit of contact centers on a
   649  	// billing account.
   650  	ContactCenterCountLimit int64 `json:"contactCenterCountLimit,omitempty"`
   651  	// ContactCenterCountSum: Reflects the count sum of contact centers on a
   652  	// billing account.
   653  	ContactCenterCountSum int64 `json:"contactCenterCountSum,omitempty"`
   654  	// ContactCenterInstanceSize: Contact center instance type.
   655  	//
   656  	// Possible values:
   657  	//   "INSTANCE_SIZE_UNSPECIFIED" - The default value. This value is used if the
   658  	// state is omitted.
   659  	//   "STANDARD_SMALL" - Instance Size STANDARD_SMALL.
   660  	//   "STANDARD_MEDIUM" - Instance Size STANDARD_MEDIUM.
   661  	//   "STANDARD_LARGE" - Instance Size STANDARD_LARGE.
   662  	//   "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE.
   663  	//   "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE.
   664  	//   "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE.
   665  	//   "DEV_XSMALL" - Instance Size DEV_EXTRA_SMALL.
   666  	//   "MULTIREGION_SMALL" - Instance Size MULTIREGION_SMALL
   667  	//   "MULTIREGION_MEDIUM" - Instance Size MULTIREGION_MEDIUM
   668  	//   "MULTIREGION_LARGE" - Instance Size MULTIREGION_LARGE
   669  	//   "MULTIREGION_XLARGE" - Instance Size MULTIREGION_XLARGE
   670  	//   "MULTIREGION_2XLARGE" - Instance Size MULTIREGION_2XLARGE.
   671  	//   "MULTIREGION_3XLARGE" - Instance Size MULTIREGION_3XLARGE.
   672  	ContactCenterInstanceSize string `json:"contactCenterInstanceSize,omitempty"`
   673  	// ForceSendFields is a list of field names (e.g. "ContactCenterCountLimit") to
   674  	// unconditionally include in API requests. By default, fields with empty or
   675  	// default values are omitted from API requests. See
   676  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   677  	// details.
   678  	ForceSendFields []string `json:"-"`
   679  	// NullFields is a list of field names (e.g. "ContactCenterCountLimit") to
   680  	// include in API requests with the JSON null value. By default, fields with
   681  	// empty values are omitted from API requests. See
   682  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   683  	NullFields []string `json:"-"`
   684  }
   685  
   686  func (s *Quota) MarshalJSON() ([]byte, error) {
   687  	type NoMethod Quota
   688  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   689  }
   690  
   691  // SAMLParams: Message storing SAML params to enable Google as IDP.
   692  type SAMLParams struct {
   693  	// Certificate: SAML certificate
   694  	Certificate string `json:"certificate,omitempty"`
   695  	// EmailMapping: IdP field that maps to the user’s email address
   696  	EmailMapping string `json:"emailMapping,omitempty"`
   697  	// EntityId: Entity id URL
   698  	EntityId string `json:"entityId,omitempty"`
   699  	// SsoUri: Single sign-on URL
   700  	SsoUri string `json:"ssoUri,omitempty"`
   701  	// UserEmail: Email address of the first admin users.
   702  	UserEmail string `json:"userEmail,omitempty"`
   703  	// ForceSendFields is a list of field names (e.g. "Certificate") to
   704  	// unconditionally include in API requests. By default, fields with empty or
   705  	// default values are omitted from API requests. See
   706  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   707  	// details.
   708  	ForceSendFields []string `json:"-"`
   709  	// NullFields is a list of field names (e.g. "Certificate") to include in API
   710  	// requests with the JSON null value. By default, fields with empty values are
   711  	// omitted from API requests. See
   712  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   713  	NullFields []string `json:"-"`
   714  }
   715  
   716  func (s *SAMLParams) MarshalJSON() ([]byte, error) {
   717  	type NoMethod SAMLParams
   718  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   719  }
   720  
   721  // Status: The `Status` type defines a logical error model that is suitable for
   722  // different programming environments, including REST APIs and RPC APIs. It is
   723  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
   724  // pieces of data: error code, error message, and error details. You can find
   725  // out more about this error model and how to work with it in the API Design
   726  // Guide (https://cloud.google.com/apis/design/errors).
   727  type Status struct {
   728  	// Code: The status code, which should be an enum value of google.rpc.Code.
   729  	Code int64 `json:"code,omitempty"`
   730  	// Details: A list of messages that carry the error details. There is a common
   731  	// set of message types for APIs to use.
   732  	Details []googleapi.RawMessage `json:"details,omitempty"`
   733  	// Message: A developer-facing error message, which should be in English. Any
   734  	// user-facing error message should be localized and sent in the
   735  	// google.rpc.Status.details field, or localized by the client.
   736  	Message string `json:"message,omitempty"`
   737  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   738  	// include in API requests. By default, fields with empty or default values are
   739  	// omitted from API requests. See
   740  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   741  	// details.
   742  	ForceSendFields []string `json:"-"`
   743  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   744  	// with the JSON null value. By default, fields with empty values are omitted
   745  	// from API requests. See
   746  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   747  	NullFields []string `json:"-"`
   748  }
   749  
   750  func (s *Status) MarshalJSON() ([]byte, error) {
   751  	type NoMethod Status
   752  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   753  }
   754  
   755  // URIs: Message storing the URIs of the ContactCenter.
   756  type URIs struct {
   757  	// ChatBotUri: Chat Bot Uri of the ContactCenter
   758  	ChatBotUri string `json:"chatBotUri,omitempty"`
   759  	// MediaUri: Media Uri of the ContactCenter.
   760  	MediaUri string `json:"mediaUri,omitempty"`
   761  	// RootUri: Root Uri of the ContactCenter.
   762  	RootUri string `json:"rootUri,omitempty"`
   763  	// VirtualAgentStreamingServiceUri: Virtual Agent Streaming Service Uri of the
   764  	// ContactCenter.
   765  	VirtualAgentStreamingServiceUri string `json:"virtualAgentStreamingServiceUri,omitempty"`
   766  	// ForceSendFields is a list of field names (e.g. "ChatBotUri") to
   767  	// unconditionally include in API requests. By default, fields with empty or
   768  	// default values are omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "ChatBotUri") to include in API
   773  	// requests with the JSON null value. By default, fields with empty values are
   774  	// omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *URIs) MarshalJSON() ([]byte, error) {
   780  	type NoMethod URIs
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  type ProjectsLocationsGetCall struct {
   785  	s            *Service
   786  	name         string
   787  	urlParams_   gensupport.URLParams
   788  	ifNoneMatch_ string
   789  	ctx_         context.Context
   790  	header_      http.Header
   791  }
   792  
   793  // Get: Gets information about a location.
   794  //
   795  // - name: Resource name for the location.
   796  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
   797  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   798  	c.name = name
   799  	return c
   800  }
   801  
   802  // Fields allows partial responses to be retrieved. See
   803  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   804  // details.
   805  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
   806  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   807  	return c
   808  }
   809  
   810  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   811  // object's ETag matches the given value. This is useful for getting updates
   812  // only after the object has changed since the last request.
   813  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
   814  	c.ifNoneMatch_ = entityTag
   815  	return c
   816  }
   817  
   818  // Context sets the context to be used in this call's Do method.
   819  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
   820  	c.ctx_ = ctx
   821  	return c
   822  }
   823  
   824  // Header returns a http.Header that can be modified by the caller to add
   825  // headers to the request.
   826  func (c *ProjectsLocationsGetCall) Header() http.Header {
   827  	if c.header_ == nil {
   828  		c.header_ = make(http.Header)
   829  	}
   830  	return c.header_
   831  }
   832  
   833  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
   834  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   835  	if c.ifNoneMatch_ != "" {
   836  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   837  	}
   838  	var body io.Reader = nil
   839  	c.urlParams_.Set("alt", alt)
   840  	c.urlParams_.Set("prettyPrint", "false")
   841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
   842  	urls += "?" + c.urlParams_.Encode()
   843  	req, err := http.NewRequest("GET", urls, body)
   844  	if err != nil {
   845  		return nil, err
   846  	}
   847  	req.Header = reqHeaders
   848  	googleapi.Expand(req.URL, map[string]string{
   849  		"name": c.name,
   850  	})
   851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   852  }
   853  
   854  // Do executes the "contactcenteraiplatform.projects.locations.get" call.
   855  // Any non-2xx status code is an error. Response headers are in either
   856  // *Location.ServerResponse.Header or (if a response was returned at all) in
   857  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   858  // whether the returned error was because http.StatusNotModified was returned.
   859  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
   860  	gensupport.SetOptions(c.urlParams_, opts...)
   861  	res, err := c.doRequest("json")
   862  	if res != nil && res.StatusCode == http.StatusNotModified {
   863  		if res.Body != nil {
   864  			res.Body.Close()
   865  		}
   866  		return nil, gensupport.WrapError(&googleapi.Error{
   867  			Code:   res.StatusCode,
   868  			Header: res.Header,
   869  		})
   870  	}
   871  	if err != nil {
   872  		return nil, err
   873  	}
   874  	defer googleapi.CloseBody(res)
   875  	if err := googleapi.CheckResponse(res); err != nil {
   876  		return nil, gensupport.WrapError(err)
   877  	}
   878  	ret := &Location{
   879  		ServerResponse: googleapi.ServerResponse{
   880  			Header:         res.Header,
   881  			HTTPStatusCode: res.StatusCode,
   882  		},
   883  	}
   884  	target := &ret
   885  	if err := gensupport.DecodeResponse(target, res); err != nil {
   886  		return nil, err
   887  	}
   888  	return ret, nil
   889  }
   890  
   891  type ProjectsLocationsListCall struct {
   892  	s            *Service
   893  	name         string
   894  	urlParams_   gensupport.URLParams
   895  	ifNoneMatch_ string
   896  	ctx_         context.Context
   897  	header_      http.Header
   898  }
   899  
   900  // List: Lists information about the supported locations for this service.
   901  //
   902  // - name: The resource that owns the locations collection, if applicable.
   903  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
   904  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   905  	c.name = name
   906  	return c
   907  }
   908  
   909  // Filter sets the optional parameter "filter": A filter to narrow down results
   910  // to a preferred subset. The filtering language accepts strings like
   911  // "displayName=tokyo", and is documented in more detail in AIP-160
   912  // (https://google.aip.dev/160).
   913  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
   914  	c.urlParams_.Set("filter", filter)
   915  	return c
   916  }
   917  
   918  // PageSize sets the optional parameter "pageSize": The maximum number of
   919  // results to return. If not set, the service selects a default.
   920  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
   921  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
   922  	return c
   923  }
   924  
   925  // PageToken sets the optional parameter "pageToken": A page token received
   926  // from the `next_page_token` field in the response. Send that page token to
   927  // receive the subsequent page.
   928  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
   929  	c.urlParams_.Set("pageToken", pageToken)
   930  	return c
   931  }
   932  
   933  // Fields allows partial responses to be retrieved. See
   934  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   935  // details.
   936  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
   937  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   938  	return c
   939  }
   940  
   941  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   942  // object's ETag matches the given value. This is useful for getting updates
   943  // only after the object has changed since the last request.
   944  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
   945  	c.ifNoneMatch_ = entityTag
   946  	return c
   947  }
   948  
   949  // Context sets the context to be used in this call's Do method.
   950  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
   951  	c.ctx_ = ctx
   952  	return c
   953  }
   954  
   955  // Header returns a http.Header that can be modified by the caller to add
   956  // headers to the request.
   957  func (c *ProjectsLocationsListCall) Header() http.Header {
   958  	if c.header_ == nil {
   959  		c.header_ = make(http.Header)
   960  	}
   961  	return c.header_
   962  }
   963  
   964  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
   965  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   966  	if c.ifNoneMatch_ != "" {
   967  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   968  	}
   969  	var body io.Reader = nil
   970  	c.urlParams_.Set("alt", alt)
   971  	c.urlParams_.Set("prettyPrint", "false")
   972  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations")
   973  	urls += "?" + c.urlParams_.Encode()
   974  	req, err := http.NewRequest("GET", urls, body)
   975  	if err != nil {
   976  		return nil, err
   977  	}
   978  	req.Header = reqHeaders
   979  	googleapi.Expand(req.URL, map[string]string{
   980  		"name": c.name,
   981  	})
   982  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   983  }
   984  
   985  // Do executes the "contactcenteraiplatform.projects.locations.list" call.
   986  // Any non-2xx status code is an error. Response headers are in either
   987  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
   988  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
   989  // check whether the returned error was because http.StatusNotModified was
   990  // returned.
   991  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
   992  	gensupport.SetOptions(c.urlParams_, opts...)
   993  	res, err := c.doRequest("json")
   994  	if res != nil && res.StatusCode == http.StatusNotModified {
   995  		if res.Body != nil {
   996  			res.Body.Close()
   997  		}
   998  		return nil, gensupport.WrapError(&googleapi.Error{
   999  			Code:   res.StatusCode,
  1000  			Header: res.Header,
  1001  		})
  1002  	}
  1003  	if err != nil {
  1004  		return nil, err
  1005  	}
  1006  	defer googleapi.CloseBody(res)
  1007  	if err := googleapi.CheckResponse(res); err != nil {
  1008  		return nil, gensupport.WrapError(err)
  1009  	}
  1010  	ret := &ListLocationsResponse{
  1011  		ServerResponse: googleapi.ServerResponse{
  1012  			Header:         res.Header,
  1013  			HTTPStatusCode: res.StatusCode,
  1014  		},
  1015  	}
  1016  	target := &ret
  1017  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1018  		return nil, err
  1019  	}
  1020  	return ret, nil
  1021  }
  1022  
  1023  // Pages invokes f for each page of results.
  1024  // A non-nil error returned from f will halt the iteration.
  1025  // The provided context supersedes any context provided to the Context method.
  1026  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1027  	c.ctx_ = ctx
  1028  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1029  	for {
  1030  		x, err := c.Do()
  1031  		if err != nil {
  1032  			return err
  1033  		}
  1034  		if err := f(x); err != nil {
  1035  			return err
  1036  		}
  1037  		if x.NextPageToken == "" {
  1038  			return nil
  1039  		}
  1040  		c.PageToken(x.NextPageToken)
  1041  	}
  1042  }
  1043  
  1044  type ProjectsLocationsQueryContactCenterQuotaCall struct {
  1045  	s            *Service
  1046  	parent       string
  1047  	urlParams_   gensupport.URLParams
  1048  	ifNoneMatch_ string
  1049  	ctx_         context.Context
  1050  	header_      http.Header
  1051  }
  1052  
  1053  // QueryContactCenterQuota: Queries the contact center quota, an aggregation
  1054  // over all the projects, that belongs to the billing account, which the input
  1055  // project belongs to.
  1056  //
  1057  // - parent: Parent project resource id.
  1058  func (r *ProjectsLocationsService) QueryContactCenterQuota(parent string) *ProjectsLocationsQueryContactCenterQuotaCall {
  1059  	c := &ProjectsLocationsQueryContactCenterQuotaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1060  	c.parent = parent
  1061  	return c
  1062  }
  1063  
  1064  // Fields allows partial responses to be retrieved. See
  1065  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1066  // details.
  1067  func (c *ProjectsLocationsQueryContactCenterQuotaCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueryContactCenterQuotaCall {
  1068  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1069  	return c
  1070  }
  1071  
  1072  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1073  // object's ETag matches the given value. This is useful for getting updates
  1074  // only after the object has changed since the last request.
  1075  func (c *ProjectsLocationsQueryContactCenterQuotaCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueryContactCenterQuotaCall {
  1076  	c.ifNoneMatch_ = entityTag
  1077  	return c
  1078  }
  1079  
  1080  // Context sets the context to be used in this call's Do method.
  1081  func (c *ProjectsLocationsQueryContactCenterQuotaCall) Context(ctx context.Context) *ProjectsLocationsQueryContactCenterQuotaCall {
  1082  	c.ctx_ = ctx
  1083  	return c
  1084  }
  1085  
  1086  // Header returns a http.Header that can be modified by the caller to add
  1087  // headers to the request.
  1088  func (c *ProjectsLocationsQueryContactCenterQuotaCall) Header() http.Header {
  1089  	if c.header_ == nil {
  1090  		c.header_ = make(http.Header)
  1091  	}
  1092  	return c.header_
  1093  }
  1094  
  1095  func (c *ProjectsLocationsQueryContactCenterQuotaCall) doRequest(alt string) (*http.Response, error) {
  1096  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1097  	if c.ifNoneMatch_ != "" {
  1098  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1099  	}
  1100  	var body io.Reader = nil
  1101  	c.urlParams_.Set("alt", alt)
  1102  	c.urlParams_.Set("prettyPrint", "false")
  1103  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}:queryContactCenterQuota")
  1104  	urls += "?" + c.urlParams_.Encode()
  1105  	req, err := http.NewRequest("GET", urls, body)
  1106  	if err != nil {
  1107  		return nil, err
  1108  	}
  1109  	req.Header = reqHeaders
  1110  	googleapi.Expand(req.URL, map[string]string{
  1111  		"parent": c.parent,
  1112  	})
  1113  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1114  }
  1115  
  1116  // Do executes the "contactcenteraiplatform.projects.locations.queryContactCenterQuota" call.
  1117  // Any non-2xx status code is an error. Response headers are in either
  1118  // *ContactCenterQuota.ServerResponse.Header or (if a response was returned at
  1119  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1120  // check whether the returned error was because http.StatusNotModified was
  1121  // returned.
  1122  func (c *ProjectsLocationsQueryContactCenterQuotaCall) Do(opts ...googleapi.CallOption) (*ContactCenterQuota, error) {
  1123  	gensupport.SetOptions(c.urlParams_, opts...)
  1124  	res, err := c.doRequest("json")
  1125  	if res != nil && res.StatusCode == http.StatusNotModified {
  1126  		if res.Body != nil {
  1127  			res.Body.Close()
  1128  		}
  1129  		return nil, gensupport.WrapError(&googleapi.Error{
  1130  			Code:   res.StatusCode,
  1131  			Header: res.Header,
  1132  		})
  1133  	}
  1134  	if err != nil {
  1135  		return nil, err
  1136  	}
  1137  	defer googleapi.CloseBody(res)
  1138  	if err := googleapi.CheckResponse(res); err != nil {
  1139  		return nil, gensupport.WrapError(err)
  1140  	}
  1141  	ret := &ContactCenterQuota{
  1142  		ServerResponse: googleapi.ServerResponse{
  1143  			Header:         res.Header,
  1144  			HTTPStatusCode: res.StatusCode,
  1145  		},
  1146  	}
  1147  	target := &ret
  1148  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1149  		return nil, err
  1150  	}
  1151  	return ret, nil
  1152  }
  1153  
  1154  type ProjectsLocationsContactCentersCreateCall struct {
  1155  	s             *Service
  1156  	parent        string
  1157  	contactcenter *ContactCenter
  1158  	urlParams_    gensupport.URLParams
  1159  	ctx_          context.Context
  1160  	header_       http.Header
  1161  }
  1162  
  1163  // Create: Creates a new ContactCenter in a given project and location.
  1164  //
  1165  // - parent: Value for parent.
  1166  func (r *ProjectsLocationsContactCentersService) Create(parent string, contactcenter *ContactCenter) *ProjectsLocationsContactCentersCreateCall {
  1167  	c := &ProjectsLocationsContactCentersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1168  	c.parent = parent
  1169  	c.contactcenter = contactcenter
  1170  	return c
  1171  }
  1172  
  1173  // ContactCenterId sets the optional parameter "contactCenterId": Required. Id
  1174  // of the requesting object If auto-generating Id server-side, remove this
  1175  // field and contact_center_id from the method_signature of Create RPC
  1176  func (c *ProjectsLocationsContactCentersCreateCall) ContactCenterId(contactCenterId string) *ProjectsLocationsContactCentersCreateCall {
  1177  	c.urlParams_.Set("contactCenterId", contactCenterId)
  1178  	return c
  1179  }
  1180  
  1181  // RequestId sets the optional parameter "requestId": An optional request ID to
  1182  // identify requests. Specify a unique request ID so that if you must retry
  1183  // your request, the server will know to ignore the request if it has already
  1184  // been completed. The server will guarantee that for at least 60 minutes since
  1185  // the first request. For example, consider a situation where you make an
  1186  // initial request and the request times out. If you make the request again
  1187  // with the same request ID, the server can check if original operation with
  1188  // the same request ID was received, and if so, will ignore the second request.
  1189  // This prevents clients from accidentally creating duplicate commitments. The
  1190  // request ID must be a valid UUID with the exception that zero UUID is not
  1191  // supported (00000000-0000-0000-0000-000000000000).
  1192  func (c *ProjectsLocationsContactCentersCreateCall) RequestId(requestId string) *ProjectsLocationsContactCentersCreateCall {
  1193  	c.urlParams_.Set("requestId", requestId)
  1194  	return c
  1195  }
  1196  
  1197  // Fields allows partial responses to be retrieved. See
  1198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1199  // details.
  1200  func (c *ProjectsLocationsContactCentersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersCreateCall {
  1201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1202  	return c
  1203  }
  1204  
  1205  // Context sets the context to be used in this call's Do method.
  1206  func (c *ProjectsLocationsContactCentersCreateCall) Context(ctx context.Context) *ProjectsLocationsContactCentersCreateCall {
  1207  	c.ctx_ = ctx
  1208  	return c
  1209  }
  1210  
  1211  // Header returns a http.Header that can be modified by the caller to add
  1212  // headers to the request.
  1213  func (c *ProjectsLocationsContactCentersCreateCall) Header() http.Header {
  1214  	if c.header_ == nil {
  1215  		c.header_ = make(http.Header)
  1216  	}
  1217  	return c.header_
  1218  }
  1219  
  1220  func (c *ProjectsLocationsContactCentersCreateCall) doRequest(alt string) (*http.Response, error) {
  1221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1222  	var body io.Reader = nil
  1223  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contactcenter)
  1224  	if err != nil {
  1225  		return nil, err
  1226  	}
  1227  	c.urlParams_.Set("alt", alt)
  1228  	c.urlParams_.Set("prettyPrint", "false")
  1229  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/contactCenters")
  1230  	urls += "?" + c.urlParams_.Encode()
  1231  	req, err := http.NewRequest("POST", urls, body)
  1232  	if err != nil {
  1233  		return nil, err
  1234  	}
  1235  	req.Header = reqHeaders
  1236  	googleapi.Expand(req.URL, map[string]string{
  1237  		"parent": c.parent,
  1238  	})
  1239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1240  }
  1241  
  1242  // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.create" call.
  1243  // Any non-2xx status code is an error. Response headers are in either
  1244  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1246  // whether the returned error was because http.StatusNotModified was returned.
  1247  func (c *ProjectsLocationsContactCentersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1248  	gensupport.SetOptions(c.urlParams_, opts...)
  1249  	res, err := c.doRequest("json")
  1250  	if res != nil && res.StatusCode == http.StatusNotModified {
  1251  		if res.Body != nil {
  1252  			res.Body.Close()
  1253  		}
  1254  		return nil, gensupport.WrapError(&googleapi.Error{
  1255  			Code:   res.StatusCode,
  1256  			Header: res.Header,
  1257  		})
  1258  	}
  1259  	if err != nil {
  1260  		return nil, err
  1261  	}
  1262  	defer googleapi.CloseBody(res)
  1263  	if err := googleapi.CheckResponse(res); err != nil {
  1264  		return nil, gensupport.WrapError(err)
  1265  	}
  1266  	ret := &Operation{
  1267  		ServerResponse: googleapi.ServerResponse{
  1268  			Header:         res.Header,
  1269  			HTTPStatusCode: res.StatusCode,
  1270  		},
  1271  	}
  1272  	target := &ret
  1273  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1274  		return nil, err
  1275  	}
  1276  	return ret, nil
  1277  }
  1278  
  1279  type ProjectsLocationsContactCentersDeleteCall struct {
  1280  	s          *Service
  1281  	name       string
  1282  	urlParams_ gensupport.URLParams
  1283  	ctx_       context.Context
  1284  	header_    http.Header
  1285  }
  1286  
  1287  // Delete: Deletes a single ContactCenter.
  1288  //
  1289  // - name: Name of the resource.
  1290  func (r *ProjectsLocationsContactCentersService) Delete(name string) *ProjectsLocationsContactCentersDeleteCall {
  1291  	c := &ProjectsLocationsContactCentersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1292  	c.name = name
  1293  	return c
  1294  }
  1295  
  1296  // RequestId sets the optional parameter "requestId": An optional request ID to
  1297  // identify requests. Specify a unique request ID so that if you must retry
  1298  // your request, the server will know to ignore the request if it has already
  1299  // been completed. The server will guarantee that for at least 60 minutes after
  1300  // the first request. For example, consider a situation where you make an
  1301  // initial request and the request times out. If you make the request again
  1302  // with the same request ID, the server can check if original operation with
  1303  // the same request ID was received, and if so, will ignore the second request.
  1304  // This prevents clients from accidentally creating duplicate commitments. The
  1305  // request ID must be a valid UUID with the exception that zero UUID is not
  1306  // supported (00000000-0000-0000-0000-000000000000).
  1307  func (c *ProjectsLocationsContactCentersDeleteCall) RequestId(requestId string) *ProjectsLocationsContactCentersDeleteCall {
  1308  	c.urlParams_.Set("requestId", requestId)
  1309  	return c
  1310  }
  1311  
  1312  // Fields allows partial responses to be retrieved. See
  1313  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1314  // details.
  1315  func (c *ProjectsLocationsContactCentersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersDeleteCall {
  1316  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1317  	return c
  1318  }
  1319  
  1320  // Context sets the context to be used in this call's Do method.
  1321  func (c *ProjectsLocationsContactCentersDeleteCall) Context(ctx context.Context) *ProjectsLocationsContactCentersDeleteCall {
  1322  	c.ctx_ = ctx
  1323  	return c
  1324  }
  1325  
  1326  // Header returns a http.Header that can be modified by the caller to add
  1327  // headers to the request.
  1328  func (c *ProjectsLocationsContactCentersDeleteCall) Header() http.Header {
  1329  	if c.header_ == nil {
  1330  		c.header_ = make(http.Header)
  1331  	}
  1332  	return c.header_
  1333  }
  1334  
  1335  func (c *ProjectsLocationsContactCentersDeleteCall) doRequest(alt string) (*http.Response, error) {
  1336  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1337  	var body io.Reader = nil
  1338  	c.urlParams_.Set("alt", alt)
  1339  	c.urlParams_.Set("prettyPrint", "false")
  1340  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
  1341  	urls += "?" + c.urlParams_.Encode()
  1342  	req, err := http.NewRequest("DELETE", urls, body)
  1343  	if err != nil {
  1344  		return nil, err
  1345  	}
  1346  	req.Header = reqHeaders
  1347  	googleapi.Expand(req.URL, map[string]string{
  1348  		"name": c.name,
  1349  	})
  1350  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1351  }
  1352  
  1353  // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.delete" call.
  1354  // Any non-2xx status code is an error. Response headers are in either
  1355  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1356  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1357  // whether the returned error was because http.StatusNotModified was returned.
  1358  func (c *ProjectsLocationsContactCentersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1359  	gensupport.SetOptions(c.urlParams_, opts...)
  1360  	res, err := c.doRequest("json")
  1361  	if res != nil && res.StatusCode == http.StatusNotModified {
  1362  		if res.Body != nil {
  1363  			res.Body.Close()
  1364  		}
  1365  		return nil, gensupport.WrapError(&googleapi.Error{
  1366  			Code:   res.StatusCode,
  1367  			Header: res.Header,
  1368  		})
  1369  	}
  1370  	if err != nil {
  1371  		return nil, err
  1372  	}
  1373  	defer googleapi.CloseBody(res)
  1374  	if err := googleapi.CheckResponse(res); err != nil {
  1375  		return nil, gensupport.WrapError(err)
  1376  	}
  1377  	ret := &Operation{
  1378  		ServerResponse: googleapi.ServerResponse{
  1379  			Header:         res.Header,
  1380  			HTTPStatusCode: res.StatusCode,
  1381  		},
  1382  	}
  1383  	target := &ret
  1384  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1385  		return nil, err
  1386  	}
  1387  	return ret, nil
  1388  }
  1389  
  1390  type ProjectsLocationsContactCentersGetCall struct {
  1391  	s            *Service
  1392  	name         string
  1393  	urlParams_   gensupport.URLParams
  1394  	ifNoneMatch_ string
  1395  	ctx_         context.Context
  1396  	header_      http.Header
  1397  }
  1398  
  1399  // Get: Gets details of a single ContactCenter.
  1400  //
  1401  // - name: Name of the resource.
  1402  func (r *ProjectsLocationsContactCentersService) Get(name string) *ProjectsLocationsContactCentersGetCall {
  1403  	c := &ProjectsLocationsContactCentersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1404  	c.name = name
  1405  	return c
  1406  }
  1407  
  1408  // Fields allows partial responses to be retrieved. See
  1409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1410  // details.
  1411  func (c *ProjectsLocationsContactCentersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersGetCall {
  1412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1413  	return c
  1414  }
  1415  
  1416  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1417  // object's ETag matches the given value. This is useful for getting updates
  1418  // only after the object has changed since the last request.
  1419  func (c *ProjectsLocationsContactCentersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsContactCentersGetCall {
  1420  	c.ifNoneMatch_ = entityTag
  1421  	return c
  1422  }
  1423  
  1424  // Context sets the context to be used in this call's Do method.
  1425  func (c *ProjectsLocationsContactCentersGetCall) Context(ctx context.Context) *ProjectsLocationsContactCentersGetCall {
  1426  	c.ctx_ = ctx
  1427  	return c
  1428  }
  1429  
  1430  // Header returns a http.Header that can be modified by the caller to add
  1431  // headers to the request.
  1432  func (c *ProjectsLocationsContactCentersGetCall) Header() http.Header {
  1433  	if c.header_ == nil {
  1434  		c.header_ = make(http.Header)
  1435  	}
  1436  	return c.header_
  1437  }
  1438  
  1439  func (c *ProjectsLocationsContactCentersGetCall) doRequest(alt string) (*http.Response, error) {
  1440  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1441  	if c.ifNoneMatch_ != "" {
  1442  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1443  	}
  1444  	var body io.Reader = nil
  1445  	c.urlParams_.Set("alt", alt)
  1446  	c.urlParams_.Set("prettyPrint", "false")
  1447  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
  1448  	urls += "?" + c.urlParams_.Encode()
  1449  	req, err := http.NewRequest("GET", urls, body)
  1450  	if err != nil {
  1451  		return nil, err
  1452  	}
  1453  	req.Header = reqHeaders
  1454  	googleapi.Expand(req.URL, map[string]string{
  1455  		"name": c.name,
  1456  	})
  1457  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1458  }
  1459  
  1460  // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.get" call.
  1461  // Any non-2xx status code is an error. Response headers are in either
  1462  // *ContactCenter.ServerResponse.Header or (if a response was returned at all)
  1463  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1464  // whether the returned error was because http.StatusNotModified was returned.
  1465  func (c *ProjectsLocationsContactCentersGetCall) Do(opts ...googleapi.CallOption) (*ContactCenter, error) {
  1466  	gensupport.SetOptions(c.urlParams_, opts...)
  1467  	res, err := c.doRequest("json")
  1468  	if res != nil && res.StatusCode == http.StatusNotModified {
  1469  		if res.Body != nil {
  1470  			res.Body.Close()
  1471  		}
  1472  		return nil, gensupport.WrapError(&googleapi.Error{
  1473  			Code:   res.StatusCode,
  1474  			Header: res.Header,
  1475  		})
  1476  	}
  1477  	if err != nil {
  1478  		return nil, err
  1479  	}
  1480  	defer googleapi.CloseBody(res)
  1481  	if err := googleapi.CheckResponse(res); err != nil {
  1482  		return nil, gensupport.WrapError(err)
  1483  	}
  1484  	ret := &ContactCenter{
  1485  		ServerResponse: googleapi.ServerResponse{
  1486  			Header:         res.Header,
  1487  			HTTPStatusCode: res.StatusCode,
  1488  		},
  1489  	}
  1490  	target := &ret
  1491  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1492  		return nil, err
  1493  	}
  1494  	return ret, nil
  1495  }
  1496  
  1497  type ProjectsLocationsContactCentersListCall struct {
  1498  	s            *Service
  1499  	parent       string
  1500  	urlParams_   gensupport.URLParams
  1501  	ifNoneMatch_ string
  1502  	ctx_         context.Context
  1503  	header_      http.Header
  1504  }
  1505  
  1506  // List: Lists ContactCenters in a given project and location.
  1507  //
  1508  // - parent: Parent value for ListContactCentersRequest.
  1509  func (r *ProjectsLocationsContactCentersService) List(parent string) *ProjectsLocationsContactCentersListCall {
  1510  	c := &ProjectsLocationsContactCentersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1511  	c.parent = parent
  1512  	return c
  1513  }
  1514  
  1515  // Filter sets the optional parameter "filter": Filtering results
  1516  func (c *ProjectsLocationsContactCentersListCall) Filter(filter string) *ProjectsLocationsContactCentersListCall {
  1517  	c.urlParams_.Set("filter", filter)
  1518  	return c
  1519  }
  1520  
  1521  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  1522  // results
  1523  func (c *ProjectsLocationsContactCentersListCall) OrderBy(orderBy string) *ProjectsLocationsContactCentersListCall {
  1524  	c.urlParams_.Set("orderBy", orderBy)
  1525  	return c
  1526  }
  1527  
  1528  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  1529  // may return fewer items than requested. If unspecified, server will pick an
  1530  // appropriate default.
  1531  func (c *ProjectsLocationsContactCentersListCall) PageSize(pageSize int64) *ProjectsLocationsContactCentersListCall {
  1532  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1533  	return c
  1534  }
  1535  
  1536  // PageToken sets the optional parameter "pageToken": A token identifying a
  1537  // page of results the server should return.
  1538  func (c *ProjectsLocationsContactCentersListCall) PageToken(pageToken string) *ProjectsLocationsContactCentersListCall {
  1539  	c.urlParams_.Set("pageToken", pageToken)
  1540  	return c
  1541  }
  1542  
  1543  // Fields allows partial responses to be retrieved. See
  1544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1545  // details.
  1546  func (c *ProjectsLocationsContactCentersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersListCall {
  1547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1548  	return c
  1549  }
  1550  
  1551  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1552  // object's ETag matches the given value. This is useful for getting updates
  1553  // only after the object has changed since the last request.
  1554  func (c *ProjectsLocationsContactCentersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsContactCentersListCall {
  1555  	c.ifNoneMatch_ = entityTag
  1556  	return c
  1557  }
  1558  
  1559  // Context sets the context to be used in this call's Do method.
  1560  func (c *ProjectsLocationsContactCentersListCall) Context(ctx context.Context) *ProjectsLocationsContactCentersListCall {
  1561  	c.ctx_ = ctx
  1562  	return c
  1563  }
  1564  
  1565  // Header returns a http.Header that can be modified by the caller to add
  1566  // headers to the request.
  1567  func (c *ProjectsLocationsContactCentersListCall) Header() http.Header {
  1568  	if c.header_ == nil {
  1569  		c.header_ = make(http.Header)
  1570  	}
  1571  	return c.header_
  1572  }
  1573  
  1574  func (c *ProjectsLocationsContactCentersListCall) doRequest(alt string) (*http.Response, error) {
  1575  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1576  	if c.ifNoneMatch_ != "" {
  1577  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1578  	}
  1579  	var body io.Reader = nil
  1580  	c.urlParams_.Set("alt", alt)
  1581  	c.urlParams_.Set("prettyPrint", "false")
  1582  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/contactCenters")
  1583  	urls += "?" + c.urlParams_.Encode()
  1584  	req, err := http.NewRequest("GET", urls, body)
  1585  	if err != nil {
  1586  		return nil, err
  1587  	}
  1588  	req.Header = reqHeaders
  1589  	googleapi.Expand(req.URL, map[string]string{
  1590  		"parent": c.parent,
  1591  	})
  1592  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1593  }
  1594  
  1595  // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.list" call.
  1596  // Any non-2xx status code is an error. Response headers are in either
  1597  // *ListContactCentersResponse.ServerResponse.Header or (if a response was
  1598  // returned at all) in error.(*googleapi.Error).Header. Use
  1599  // googleapi.IsNotModified to check whether the returned error was because
  1600  // http.StatusNotModified was returned.
  1601  func (c *ProjectsLocationsContactCentersListCall) Do(opts ...googleapi.CallOption) (*ListContactCentersResponse, error) {
  1602  	gensupport.SetOptions(c.urlParams_, opts...)
  1603  	res, err := c.doRequest("json")
  1604  	if res != nil && res.StatusCode == http.StatusNotModified {
  1605  		if res.Body != nil {
  1606  			res.Body.Close()
  1607  		}
  1608  		return nil, gensupport.WrapError(&googleapi.Error{
  1609  			Code:   res.StatusCode,
  1610  			Header: res.Header,
  1611  		})
  1612  	}
  1613  	if err != nil {
  1614  		return nil, err
  1615  	}
  1616  	defer googleapi.CloseBody(res)
  1617  	if err := googleapi.CheckResponse(res); err != nil {
  1618  		return nil, gensupport.WrapError(err)
  1619  	}
  1620  	ret := &ListContactCentersResponse{
  1621  		ServerResponse: googleapi.ServerResponse{
  1622  			Header:         res.Header,
  1623  			HTTPStatusCode: res.StatusCode,
  1624  		},
  1625  	}
  1626  	target := &ret
  1627  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1628  		return nil, err
  1629  	}
  1630  	return ret, nil
  1631  }
  1632  
  1633  // Pages invokes f for each page of results.
  1634  // A non-nil error returned from f will halt the iteration.
  1635  // The provided context supersedes any context provided to the Context method.
  1636  func (c *ProjectsLocationsContactCentersListCall) Pages(ctx context.Context, f func(*ListContactCentersResponse) error) error {
  1637  	c.ctx_ = ctx
  1638  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1639  	for {
  1640  		x, err := c.Do()
  1641  		if err != nil {
  1642  			return err
  1643  		}
  1644  		if err := f(x); err != nil {
  1645  			return err
  1646  		}
  1647  		if x.NextPageToken == "" {
  1648  			return nil
  1649  		}
  1650  		c.PageToken(x.NextPageToken)
  1651  	}
  1652  }
  1653  
  1654  type ProjectsLocationsContactCentersPatchCall struct {
  1655  	s             *Service
  1656  	name          string
  1657  	contactcenter *ContactCenter
  1658  	urlParams_    gensupport.URLParams
  1659  	ctx_          context.Context
  1660  	header_       http.Header
  1661  }
  1662  
  1663  // Patch: Updates the parameters of a single ContactCenter.
  1664  //
  1665  // - name: name of resource.
  1666  func (r *ProjectsLocationsContactCentersService) Patch(name string, contactcenter *ContactCenter) *ProjectsLocationsContactCentersPatchCall {
  1667  	c := &ProjectsLocationsContactCentersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1668  	c.name = name
  1669  	c.contactcenter = contactcenter
  1670  	return c
  1671  }
  1672  
  1673  // RequestId sets the optional parameter "requestId": An optional request ID to
  1674  // identify requests. Specify a unique request ID so that if you must retry
  1675  // your request, the server will know to ignore the request if it has already
  1676  // been completed. The server will guarantee that for at least 60 minutes since
  1677  // the first request. For example, consider a situation where you make an
  1678  // initial request and the request times out. If you make the request again
  1679  // with the same request ID, the server can check if original operation with
  1680  // the same request ID was received, and if so, will ignore the second request.
  1681  // This prevents clients from accidentally creating duplicate commitments. The
  1682  // request ID must be a valid UUID with the exception that zero UUID is not
  1683  // supported (00000000-0000-0000-0000-000000000000).
  1684  func (c *ProjectsLocationsContactCentersPatchCall) RequestId(requestId string) *ProjectsLocationsContactCentersPatchCall {
  1685  	c.urlParams_.Set("requestId", requestId)
  1686  	return c
  1687  }
  1688  
  1689  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  1690  // used to specify the fields to be overwritten in the ContactCenter resource
  1691  // by the update. The fields specified in the update_mask are relative to the
  1692  // resource, not the full request. A field will be overwritten if it is in the
  1693  // mask. If the user does not provide a mask then all fields will be
  1694  // overwritten.
  1695  func (c *ProjectsLocationsContactCentersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsContactCentersPatchCall {
  1696  	c.urlParams_.Set("updateMask", updateMask)
  1697  	return c
  1698  }
  1699  
  1700  // Fields allows partial responses to be retrieved. See
  1701  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1702  // details.
  1703  func (c *ProjectsLocationsContactCentersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersPatchCall {
  1704  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1705  	return c
  1706  }
  1707  
  1708  // Context sets the context to be used in this call's Do method.
  1709  func (c *ProjectsLocationsContactCentersPatchCall) Context(ctx context.Context) *ProjectsLocationsContactCentersPatchCall {
  1710  	c.ctx_ = ctx
  1711  	return c
  1712  }
  1713  
  1714  // Header returns a http.Header that can be modified by the caller to add
  1715  // headers to the request.
  1716  func (c *ProjectsLocationsContactCentersPatchCall) Header() http.Header {
  1717  	if c.header_ == nil {
  1718  		c.header_ = make(http.Header)
  1719  	}
  1720  	return c.header_
  1721  }
  1722  
  1723  func (c *ProjectsLocationsContactCentersPatchCall) doRequest(alt string) (*http.Response, error) {
  1724  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1725  	var body io.Reader = nil
  1726  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.contactcenter)
  1727  	if err != nil {
  1728  		return nil, err
  1729  	}
  1730  	c.urlParams_.Set("alt", alt)
  1731  	c.urlParams_.Set("prettyPrint", "false")
  1732  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
  1733  	urls += "?" + c.urlParams_.Encode()
  1734  	req, err := http.NewRequest("PATCH", urls, body)
  1735  	if err != nil {
  1736  		return nil, err
  1737  	}
  1738  	req.Header = reqHeaders
  1739  	googleapi.Expand(req.URL, map[string]string{
  1740  		"name": c.name,
  1741  	})
  1742  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1743  }
  1744  
  1745  // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.patch" call.
  1746  // Any non-2xx status code is an error. Response headers are in either
  1747  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1748  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1749  // whether the returned error was because http.StatusNotModified was returned.
  1750  func (c *ProjectsLocationsContactCentersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1751  	gensupport.SetOptions(c.urlParams_, opts...)
  1752  	res, err := c.doRequest("json")
  1753  	if res != nil && res.StatusCode == http.StatusNotModified {
  1754  		if res.Body != nil {
  1755  			res.Body.Close()
  1756  		}
  1757  		return nil, gensupport.WrapError(&googleapi.Error{
  1758  			Code:   res.StatusCode,
  1759  			Header: res.Header,
  1760  		})
  1761  	}
  1762  	if err != nil {
  1763  		return nil, err
  1764  	}
  1765  	defer googleapi.CloseBody(res)
  1766  	if err := googleapi.CheckResponse(res); err != nil {
  1767  		return nil, gensupport.WrapError(err)
  1768  	}
  1769  	ret := &Operation{
  1770  		ServerResponse: googleapi.ServerResponse{
  1771  			Header:         res.Header,
  1772  			HTTPStatusCode: res.StatusCode,
  1773  		},
  1774  	}
  1775  	target := &ret
  1776  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1777  		return nil, err
  1778  	}
  1779  	return ret, nil
  1780  }
  1781  
  1782  type ProjectsLocationsOperationsCancelCall struct {
  1783  	s                      *Service
  1784  	name                   string
  1785  	canceloperationrequest *CancelOperationRequest
  1786  	urlParams_             gensupport.URLParams
  1787  	ctx_                   context.Context
  1788  	header_                http.Header
  1789  }
  1790  
  1791  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  1792  // server makes a best effort to cancel the operation, but success is not
  1793  // guaranteed. If the server doesn't support this method, it returns
  1794  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  1795  // other methods to check whether the cancellation succeeded or whether the
  1796  // operation completed despite cancellation. On successful cancellation, the
  1797  // operation is not deleted; instead, it becomes an operation with an
  1798  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  1799  // `Code.CANCELLED`.
  1800  //
  1801  // - name: The name of the operation resource to be cancelled.
  1802  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  1803  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1804  	c.name = name
  1805  	c.canceloperationrequest = canceloperationrequest
  1806  	return c
  1807  }
  1808  
  1809  // Fields allows partial responses to be retrieved. See
  1810  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1811  // details.
  1812  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  1813  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1814  	return c
  1815  }
  1816  
  1817  // Context sets the context to be used in this call's Do method.
  1818  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  1819  	c.ctx_ = ctx
  1820  	return c
  1821  }
  1822  
  1823  // Header returns a http.Header that can be modified by the caller to add
  1824  // headers to the request.
  1825  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  1826  	if c.header_ == nil {
  1827  		c.header_ = make(http.Header)
  1828  	}
  1829  	return c.header_
  1830  }
  1831  
  1832  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  1833  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1834  	var body io.Reader = nil
  1835  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  1836  	if err != nil {
  1837  		return nil, err
  1838  	}
  1839  	c.urlParams_.Set("alt", alt)
  1840  	c.urlParams_.Set("prettyPrint", "false")
  1841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
  1842  	urls += "?" + c.urlParams_.Encode()
  1843  	req, err := http.NewRequest("POST", urls, body)
  1844  	if err != nil {
  1845  		return nil, err
  1846  	}
  1847  	req.Header = reqHeaders
  1848  	googleapi.Expand(req.URL, map[string]string{
  1849  		"name": c.name,
  1850  	})
  1851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1852  }
  1853  
  1854  // Do executes the "contactcenteraiplatform.projects.locations.operations.cancel" call.
  1855  // Any non-2xx status code is an error. Response headers are in either
  1856  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1857  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1858  // whether the returned error was because http.StatusNotModified was returned.
  1859  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1860  	gensupport.SetOptions(c.urlParams_, opts...)
  1861  	res, err := c.doRequest("json")
  1862  	if res != nil && res.StatusCode == http.StatusNotModified {
  1863  		if res.Body != nil {
  1864  			res.Body.Close()
  1865  		}
  1866  		return nil, gensupport.WrapError(&googleapi.Error{
  1867  			Code:   res.StatusCode,
  1868  			Header: res.Header,
  1869  		})
  1870  	}
  1871  	if err != nil {
  1872  		return nil, err
  1873  	}
  1874  	defer googleapi.CloseBody(res)
  1875  	if err := googleapi.CheckResponse(res); err != nil {
  1876  		return nil, gensupport.WrapError(err)
  1877  	}
  1878  	ret := &Empty{
  1879  		ServerResponse: googleapi.ServerResponse{
  1880  			Header:         res.Header,
  1881  			HTTPStatusCode: res.StatusCode,
  1882  		},
  1883  	}
  1884  	target := &ret
  1885  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1886  		return nil, err
  1887  	}
  1888  	return ret, nil
  1889  }
  1890  
  1891  type ProjectsLocationsOperationsDeleteCall struct {
  1892  	s          *Service
  1893  	name       string
  1894  	urlParams_ gensupport.URLParams
  1895  	ctx_       context.Context
  1896  	header_    http.Header
  1897  }
  1898  
  1899  // Delete: Deletes a long-running operation. This method indicates that the
  1900  // client is no longer interested in the operation result. It does not cancel
  1901  // the operation. If the server doesn't support this method, it returns
  1902  // `google.rpc.Code.UNIMPLEMENTED`.
  1903  //
  1904  // - name: The name of the operation resource to be deleted.
  1905  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  1906  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1907  	c.name = name
  1908  	return c
  1909  }
  1910  
  1911  // Fields allows partial responses to be retrieved. See
  1912  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1913  // details.
  1914  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  1915  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1916  	return c
  1917  }
  1918  
  1919  // Context sets the context to be used in this call's Do method.
  1920  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  1921  	c.ctx_ = ctx
  1922  	return c
  1923  }
  1924  
  1925  // Header returns a http.Header that can be modified by the caller to add
  1926  // headers to the request.
  1927  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  1928  	if c.header_ == nil {
  1929  		c.header_ = make(http.Header)
  1930  	}
  1931  	return c.header_
  1932  }
  1933  
  1934  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1935  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1936  	var body io.Reader = nil
  1937  	c.urlParams_.Set("alt", alt)
  1938  	c.urlParams_.Set("prettyPrint", "false")
  1939  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
  1940  	urls += "?" + c.urlParams_.Encode()
  1941  	req, err := http.NewRequest("DELETE", urls, body)
  1942  	if err != nil {
  1943  		return nil, err
  1944  	}
  1945  	req.Header = reqHeaders
  1946  	googleapi.Expand(req.URL, map[string]string{
  1947  		"name": c.name,
  1948  	})
  1949  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1950  }
  1951  
  1952  // Do executes the "contactcenteraiplatform.projects.locations.operations.delete" call.
  1953  // Any non-2xx status code is an error. Response headers are in either
  1954  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1955  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1956  // whether the returned error was because http.StatusNotModified was returned.
  1957  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1958  	gensupport.SetOptions(c.urlParams_, opts...)
  1959  	res, err := c.doRequest("json")
  1960  	if res != nil && res.StatusCode == http.StatusNotModified {
  1961  		if res.Body != nil {
  1962  			res.Body.Close()
  1963  		}
  1964  		return nil, gensupport.WrapError(&googleapi.Error{
  1965  			Code:   res.StatusCode,
  1966  			Header: res.Header,
  1967  		})
  1968  	}
  1969  	if err != nil {
  1970  		return nil, err
  1971  	}
  1972  	defer googleapi.CloseBody(res)
  1973  	if err := googleapi.CheckResponse(res); err != nil {
  1974  		return nil, gensupport.WrapError(err)
  1975  	}
  1976  	ret := &Empty{
  1977  		ServerResponse: googleapi.ServerResponse{
  1978  			Header:         res.Header,
  1979  			HTTPStatusCode: res.StatusCode,
  1980  		},
  1981  	}
  1982  	target := &ret
  1983  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1984  		return nil, err
  1985  	}
  1986  	return ret, nil
  1987  }
  1988  
  1989  type ProjectsLocationsOperationsGetCall struct {
  1990  	s            *Service
  1991  	name         string
  1992  	urlParams_   gensupport.URLParams
  1993  	ifNoneMatch_ string
  1994  	ctx_         context.Context
  1995  	header_      http.Header
  1996  }
  1997  
  1998  // Get: Gets the latest state of a long-running operation. Clients can use this
  1999  // method to poll the operation result at intervals as recommended by the API
  2000  // service.
  2001  //
  2002  // - name: The name of the operation resource.
  2003  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  2004  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2005  	c.name = name
  2006  	return c
  2007  }
  2008  
  2009  // Fields allows partial responses to be retrieved. See
  2010  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2011  // details.
  2012  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  2013  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2014  	return c
  2015  }
  2016  
  2017  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2018  // object's ETag matches the given value. This is useful for getting updates
  2019  // only after the object has changed since the last request.
  2020  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  2021  	c.ifNoneMatch_ = entityTag
  2022  	return c
  2023  }
  2024  
  2025  // Context sets the context to be used in this call's Do method.
  2026  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  2027  	c.ctx_ = ctx
  2028  	return c
  2029  }
  2030  
  2031  // Header returns a http.Header that can be modified by the caller to add
  2032  // headers to the request.
  2033  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  2034  	if c.header_ == nil {
  2035  		c.header_ = make(http.Header)
  2036  	}
  2037  	return c.header_
  2038  }
  2039  
  2040  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2041  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2042  	if c.ifNoneMatch_ != "" {
  2043  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2044  	}
  2045  	var body io.Reader = nil
  2046  	c.urlParams_.Set("alt", alt)
  2047  	c.urlParams_.Set("prettyPrint", "false")
  2048  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
  2049  	urls += "?" + c.urlParams_.Encode()
  2050  	req, err := http.NewRequest("GET", urls, body)
  2051  	if err != nil {
  2052  		return nil, err
  2053  	}
  2054  	req.Header = reqHeaders
  2055  	googleapi.Expand(req.URL, map[string]string{
  2056  		"name": c.name,
  2057  	})
  2058  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2059  }
  2060  
  2061  // Do executes the "contactcenteraiplatform.projects.locations.operations.get" call.
  2062  // Any non-2xx status code is an error. Response headers are in either
  2063  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2064  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2065  // whether the returned error was because http.StatusNotModified was returned.
  2066  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2067  	gensupport.SetOptions(c.urlParams_, opts...)
  2068  	res, err := c.doRequest("json")
  2069  	if res != nil && res.StatusCode == http.StatusNotModified {
  2070  		if res.Body != nil {
  2071  			res.Body.Close()
  2072  		}
  2073  		return nil, gensupport.WrapError(&googleapi.Error{
  2074  			Code:   res.StatusCode,
  2075  			Header: res.Header,
  2076  		})
  2077  	}
  2078  	if err != nil {
  2079  		return nil, err
  2080  	}
  2081  	defer googleapi.CloseBody(res)
  2082  	if err := googleapi.CheckResponse(res); err != nil {
  2083  		return nil, gensupport.WrapError(err)
  2084  	}
  2085  	ret := &Operation{
  2086  		ServerResponse: googleapi.ServerResponse{
  2087  			Header:         res.Header,
  2088  			HTTPStatusCode: res.StatusCode,
  2089  		},
  2090  	}
  2091  	target := &ret
  2092  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2093  		return nil, err
  2094  	}
  2095  	return ret, nil
  2096  }
  2097  
  2098  type ProjectsLocationsOperationsListCall struct {
  2099  	s            *Service
  2100  	name         string
  2101  	urlParams_   gensupport.URLParams
  2102  	ifNoneMatch_ string
  2103  	ctx_         context.Context
  2104  	header_      http.Header
  2105  }
  2106  
  2107  // List: Lists operations that match the specified filter in the request. If
  2108  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  2109  //
  2110  // - name: The name of the operation's parent resource.
  2111  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  2112  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2113  	c.name = name
  2114  	return c
  2115  }
  2116  
  2117  // Filter sets the optional parameter "filter": The standard list filter.
  2118  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  2119  	c.urlParams_.Set("filter", filter)
  2120  	return c
  2121  }
  2122  
  2123  // PageSize sets the optional parameter "pageSize": The standard list page
  2124  // size.
  2125  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  2126  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2127  	return c
  2128  }
  2129  
  2130  // PageToken sets the optional parameter "pageToken": The standard list page
  2131  // token.
  2132  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  2133  	c.urlParams_.Set("pageToken", pageToken)
  2134  	return c
  2135  }
  2136  
  2137  // Fields allows partial responses to be retrieved. See
  2138  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2139  // details.
  2140  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  2141  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2142  	return c
  2143  }
  2144  
  2145  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2146  // object's ETag matches the given value. This is useful for getting updates
  2147  // only after the object has changed since the last request.
  2148  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  2149  	c.ifNoneMatch_ = entityTag
  2150  	return c
  2151  }
  2152  
  2153  // Context sets the context to be used in this call's Do method.
  2154  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  2155  	c.ctx_ = ctx
  2156  	return c
  2157  }
  2158  
  2159  // Header returns a http.Header that can be modified by the caller to add
  2160  // headers to the request.
  2161  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  2162  	if c.header_ == nil {
  2163  		c.header_ = make(http.Header)
  2164  	}
  2165  	return c.header_
  2166  }
  2167  
  2168  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2169  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2170  	if c.ifNoneMatch_ != "" {
  2171  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2172  	}
  2173  	var body io.Reader = nil
  2174  	c.urlParams_.Set("alt", alt)
  2175  	c.urlParams_.Set("prettyPrint", "false")
  2176  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations")
  2177  	urls += "?" + c.urlParams_.Encode()
  2178  	req, err := http.NewRequest("GET", urls, body)
  2179  	if err != nil {
  2180  		return nil, err
  2181  	}
  2182  	req.Header = reqHeaders
  2183  	googleapi.Expand(req.URL, map[string]string{
  2184  		"name": c.name,
  2185  	})
  2186  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2187  }
  2188  
  2189  // Do executes the "contactcenteraiplatform.projects.locations.operations.list" call.
  2190  // Any non-2xx status code is an error. Response headers are in either
  2191  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  2192  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2193  // check whether the returned error was because http.StatusNotModified was
  2194  // returned.
  2195  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2196  	gensupport.SetOptions(c.urlParams_, opts...)
  2197  	res, err := c.doRequest("json")
  2198  	if res != nil && res.StatusCode == http.StatusNotModified {
  2199  		if res.Body != nil {
  2200  			res.Body.Close()
  2201  		}
  2202  		return nil, gensupport.WrapError(&googleapi.Error{
  2203  			Code:   res.StatusCode,
  2204  			Header: res.Header,
  2205  		})
  2206  	}
  2207  	if err != nil {
  2208  		return nil, err
  2209  	}
  2210  	defer googleapi.CloseBody(res)
  2211  	if err := googleapi.CheckResponse(res); err != nil {
  2212  		return nil, gensupport.WrapError(err)
  2213  	}
  2214  	ret := &ListOperationsResponse{
  2215  		ServerResponse: googleapi.ServerResponse{
  2216  			Header:         res.Header,
  2217  			HTTPStatusCode: res.StatusCode,
  2218  		},
  2219  	}
  2220  	target := &ret
  2221  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2222  		return nil, err
  2223  	}
  2224  	return ret, nil
  2225  }
  2226  
  2227  // Pages invokes f for each page of results.
  2228  // A non-nil error returned from f will halt the iteration.
  2229  // The provided context supersedes any context provided to the Context method.
  2230  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2231  	c.ctx_ = ctx
  2232  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2233  	for {
  2234  		x, err := c.Do()
  2235  		if err != nil {
  2236  			return err
  2237  		}
  2238  		if err := f(x); err != nil {
  2239  			return err
  2240  		}
  2241  		if x.NextPageToken == "" {
  2242  			return nil
  2243  		}
  2244  		c.PageToken(x.NextPageToken)
  2245  	}
  2246  }
  2247  

View as plain text