Debian Codegraph @

contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go

raw
1 // Copyright 2026 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 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "contactcenteraiplatform:v1alpha1"
93 const apiName = "contactcenteraiplatform"
94 const apiVersion = "v1alpha1"
95 const basePath = "https://contactcenteraiplatform.googleapis.com/"
96 const basePathTemplate = "https://contactcenteraiplatform.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://contactcenteraiplatform.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
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 // Component: Defines a logical CCAIP component that e.g. “EMAIL”, "CRM".
231 // For more information see go/ccaip-private-path-v2. Each logical component is
232 // associated with a list of service attachments.
233 type Component struct {
234 // Name: Name of the component.
235 Name string `json:"name,omitempty"`
236 // ServiceAttachmentNames: Associated service attachments. The service
237 // attachment names that will be used for sending private traffic to the CCAIP
238 // tenant project. Example service attachment name:
239 // "projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-d
240 // efault".
241 ServiceAttachmentNames []string `json:"serviceAttachmentNames,omitempty"`
242 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
243 // include in API requests. By default, fields with empty or default values are
244 // omitted from API requests. See
245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
246 // details.
247 ForceSendFields []string `json:"-"`
248 // NullFields is a list of field names (e.g. "Name") to include in API requests
249 // with the JSON null value. By default, fields with empty values are omitted
250 // from API requests. See
251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
252 NullFields []string `json:"-"`
253 }
254
255 func (s Component) MarshalJSON() ([]byte, error) {
256 type NoMethod Component
257 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
258 }
259
260 // ContactCenter: Message describing ContactCenter object
261 type ContactCenter struct {
262 // AdminUser: Optional. Info about the first admin user, such as given name and
263 // family name.
264 AdminUser *AdminUser `json:"adminUser,omitempty"`
265 // AdvancedReportingEnabled: Optional. Whether the advanced reporting feature
266 // is enabled.
267 AdvancedReportingEnabled bool `json:"advancedReportingEnabled,omitempty"`
268 // CcaipManagedUsers: Optional. Whether to enable users to be created in the
269 // CCAIP-instance concurrently to having users in Cloud identity
270 CcaipManagedUsers bool `json:"ccaipManagedUsers,omitempty"`
271 // CreateTime: Output only. [Output only] Create time stamp
272 CreateTime string `json:"createTime,omitempty"`
273 // Critical: Optional. Critical release channel.
274 Critical *Critical `json:"critical,omitempty"`
275 // CustomerDomainPrefix: Required. Immutable. At least 2 and max 16 char long,
276 // must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).
277 CustomerDomainPrefix string `json:"customerDomainPrefix,omitempty"`
278 // DeleteTime: Output only. Timestamp in UTC of when this resource was
279 // soft-deleted.
280 DeleteTime string `json:"deleteTime,omitempty"`
281 // DisplayName: Required. A user friendly name for the ContactCenter.
282 DisplayName string `json:"displayName,omitempty"`
283 // Early: Optional. Early release channel.
284 Early *Early `json:"early,omitempty"`
285 // ExpireTime: Output only. Timestamp in UTC of when this resource is
286 // considered expired.
287 ExpireTime string `json:"expireTime,omitempty"`
288 // FeatureConfig: Optional. Feature configuration to populate the feature
289 // flags.
290 FeatureConfig *FeatureConfig `json:"featureConfig,omitempty"`
291 // InstanceConfig: The configuration of this instance, it is currently
292 // immutable once created.
293 InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
294 // KmsKey: Immutable. The KMS key name to encrypt the user input
295 // (`ContactCenter`).
296 KmsKey string `json:"kmsKey,omitempty"`
297 // Labels: Labels as key value pairs
298 Labels map[string]string `json:"labels,omitempty"`
299 // Name: name of resource
300 Name string `json:"name,omitempty"`
301 // Normal: Optional. Normal release channel.
302 Normal *Normal `json:"normal,omitempty"`
303 // PrivateAccess: Optional. VPC-SC related networking configuration.
304 PrivateAccess *PrivateAccess `json:"privateAccess,omitempty"`
305 // PrivateComponents: Output only. TODO(b/283407860) Deprecate this field.
306 PrivateComponents []string `json:"privateComponents,omitempty"`
307 // PurgeTime: Output only. Timestamp in UTC of when this resource is going to
308 // be hard-deleted.
309 PurgeTime string `json:"purgeTime,omitempty"`
310 // ReleaseVersion: Output only. UJET release version, unique for each new
311 // release.
312 ReleaseVersion string `json:"releaseVersion,omitempty"`
313 // SamlParams: Optional. Params that sets up Google as IdP.
314 SamlParams *SAMLParams `json:"samlParams,omitempty"`
315 // State: Output only. The state of this contact center.
316 //
317 // Possible values:
318 // "STATE_UNSPECIFIED" - The default value. This value is used if the state
319 // is omitted.
320 // "STATE_DEPLOYING" - State DEPLOYING
321 // "STATE_DEPLOYED" - State DEPLOYED
322 // "STATE_TERMINATING" - State TERMINATING
323 // "STATE_FAILED" - State FAILED
324 // "STATE_TERMINATING_FAILED" - State TERMINATING_FAILED
325 // "STATE_TERMINATED" - Reused for soft-deleted state because semantically
326 // equivalent to `DELETED` as implied by go/aip/164.
327 // "STATE_IN_GRACE_PERIOD" - State IN_GRACE_PERIOD
328 // "STATE_FAILING_OVER" - State in STATE_FAILING_OVER. This State must ONLY
329 // be used by Multiregional Instances when a failover was triggered. Customers
330 // are not able to update instances in this state.
331 // "STATE_DEGRADED" - State DEGRADED. This State must ONLY be used by
332 // Multiregional Instances after a failover was executed successfully.
333 // Customers are not able to update instances in this state.
334 // "STATE_REPAIRING" - State REPAIRING. This State must ONLY be used by
335 // Multiregional Instances after a fallback was triggered. Customers are not
336 // able to update instancs in this state.
337 // "STATE_EXPIRING" - Flagged by an automation as soon to be expired.
338 State string `json:"state,omitempty"`
339 // UpdateTime: Output only. [Output only] Update time stamp
340 UpdateTime string `json:"updateTime,omitempty"`
341 // Uris: Output only. URIs to access the deployed ContactCenters.
342 Uris *URIs `json:"uris,omitempty"`
343 // UserEmail: Optional. Email address of the first admin user.
344 UserEmail string `json:"userEmail,omitempty"`
345
346 // ServerResponse contains the HTTP response code and headers from the server.
347 googleapi.ServerResponse `json:"-"`
348 // ForceSendFields is a list of field names (e.g. "AdminUser") to
349 // unconditionally include in API requests. By default, fields with empty or
350 // default values are omitted from API requests. See
351 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
352 // details.
353 ForceSendFields []string `json:"-"`
354 // NullFields is a list of field names (e.g. "AdminUser") to include in API
355 // requests with the JSON null value. By default, fields with empty values are
356 // omitted from API requests. See
357 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
358 NullFields []string `json:"-"`
359 }
360
361 func (s ContactCenter) MarshalJSON() ([]byte, error) {
362 type NoMethod ContactCenter
363 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
364 }
365
366 // ContactCenterQuota: Represents a quota for contact centers.
367 type ContactCenterQuota struct {
368 // ContactCenterCountLimit: Deprecated: Use the Quota fields instead. Reflects
369 // the count limit of contact centers on a billing account.
370 ContactCenterCountLimit int64 `json:"contactCenterCountLimit,omitempty"`
371 // ContactCenterCountSum: Deprecated: Use the Quota fields instead. Reflects
372 // the count sum of contact centers on a billing account.
373 ContactCenterCountSum int64 `json:"contactCenterCountSum,omitempty"`
374 // Quotas: Quota details per contact center instance type.
375 Quotas []*Quota `json:"quotas,omitempty"`
376
377 // ServerResponse contains the HTTP response code and headers from the server.
378 googleapi.ServerResponse `json:"-"`
379 // ForceSendFields is a list of field names (e.g. "ContactCenterCountLimit") to
380 // unconditionally include in API requests. By default, fields with empty or
381 // default values are omitted from API requests. See
382 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
383 // details.
384 ForceSendFields []string `json:"-"`
385 // NullFields is a list of field names (e.g. "ContactCenterCountLimit") to
386 // include in API requests with the JSON null value. By default, fields with
387 // empty values are omitted from API requests. See
388 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
389 NullFields []string `json:"-"`
390 }
391
392 func (s ContactCenterQuota) MarshalJSON() ([]byte, error) {
393 type NoMethod ContactCenterQuota
394 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
395 }
396
397 // Critical: Instances in this Channel will receive updates after all instances
398 // in `Normal` were updated. They also will only be updated outside of their
399 // peak hours.
400 type Critical struct {
401 // PeakHours: Required. Hours during which the instance should not be updated.
402 PeakHours []*WeeklySchedule `json:"peakHours,omitempty"`
403 // ForceSendFields is a list of field names (e.g. "PeakHours") to
404 // unconditionally include in API requests. By default, fields with empty or
405 // default values are omitted from API requests. See
406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
407 // details.
408 ForceSendFields []string `json:"-"`
409 // NullFields is a list of field names (e.g. "PeakHours") to include in API
410 // requests with the JSON null value. By default, fields with empty values are
411 // omitted from API requests. See
412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
413 NullFields []string `json:"-"`
414 }
415
416 func (s Critical) MarshalJSON() ([]byte, error) {
417 type NoMethod Critical
418 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
419 }
420
421 // Date: Represents a whole or partial calendar date, such as a birthday. The
422 // time of day and time zone are either specified elsewhere or are
423 // insignificant. The date is relative to the Gregorian Calendar. This can
424 // represent one of the following: * A full date, with non-zero year, month,
425 // and day values. * A month and day, with a zero year (for example, an
426 // anniversary). * A year on its own, with a zero month and a zero day. * A
427 // year and month, with a zero day (for example, a credit card expiration
428 // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
429 // google.protobuf.Timestamp
430 type Date struct {
431 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
432 // or 0 to specify a year by itself or a year and month where the day isn't
433 // significant.
434 Day int64 `json:"day,omitempty"`
435 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
436 // a month and day.
437 Month int64 `json:"month,omitempty"`
438 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
439 // without a year.
440 Year int64 `json:"year,omitempty"`
441 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally
442 // include in API requests. By default, fields with empty or default values are
443 // omitted from API requests. See
444 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
445 // details.
446 ForceSendFields []string `json:"-"`
447 // NullFields is a list of field names (e.g. "Day") to include in API requests
448 // with the JSON null value. By default, fields with empty values are omitted
449 // from API requests. See
450 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
451 NullFields []string `json:"-"`
452 }
453
454 func (s Date) MarshalJSON() ([]byte, error) {
455 type NoMethod Date
456 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
457 }
458
459 // DateList: List of dates.
460 type DateList struct {
461 // Values: Optional. Values in the list.
462 Values []*Date `json:"values,omitempty"`
463 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
464 // include in API requests. By default, fields with empty or default values are
465 // omitted from API requests. See
466 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
467 // details.
468 ForceSendFields []string `json:"-"`
469 // NullFields is a list of field names (e.g. "Values") to include in API
470 // requests with the JSON null value. By default, fields with empty values are
471 // omitted from API requests. See
472 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
473 NullFields []string `json:"-"`
474 }
475
476 func (s DateList) MarshalJSON() ([]byte, error) {
477 type NoMethod DateList
478 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
479 }
480
481 // DateTime: Represents civil time (or occasionally physical time). This type
482 // can represent a civil time in one of a few possible ways: * When utc_offset
483 // is set and time_zone is unset: a civil time on a calendar day with a
484 // particular offset from UTC. * When time_zone is set and utc_offset is unset:
485 // a civil time on a calendar day in a particular time zone. * When neither
486 // time_zone nor utc_offset is set: a civil time on a calendar day in local
487 // time. The date is relative to the Proleptic Gregorian Calendar. If year,
488 // month, or day are 0, the DateTime is considered not to have a specific year,
489 // month, or day respectively. This type may also be used to represent a
490 // physical time if all the date and time fields are set and either case of the
491 // `time_offset` oneof is set. Consider using `Timestamp` message for physical
492 // time instead. If your use case also would like to store the user's timezone,
493 // that can be done in another field. This type is more flexible than some
494 // applications may want. Make sure to document and validate your application's
495 // limitations.
496 type DateTime struct {
497 // Day: Optional. Day of month. Must be from 1 to 31 and valid for the year and
498 // month, or 0 if specifying a datetime without a day.
499 Day int64 `json:"day,omitempty"`
500 // Hours: Optional. Hours of day in 24 hour format. Should be from 0 to 23,
501 // defaults to 0 (midnight). An API may choose to allow the value "24:00:00"
502 // for scenarios like business closing time.
503 Hours int64 `json:"hours,omitempty"`
504 // Minutes: Optional. Minutes of hour of day. Must be from 0 to 59, defaults to
505 // 0.
506 Minutes int64 `json:"minutes,omitempty"`
507 // Month: Optional. Month of year. Must be from 1 to 12, or 0 if specifying a
508 // datetime without a month.
509 Month int64 `json:"month,omitempty"`
510 // Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0 to
511 // 999,999,999, defaults to 0.
512 Nanos int64 `json:"nanos,omitempty"`
513 // Seconds: Optional. Seconds of minutes of the time. Must normally be from 0
514 // to 59, defaults to 0. An API may allow the value 60 if it allows
515 // leap-seconds.
516 Seconds int64 `json:"seconds,omitempty"`
517 // TimeZone: Time zone.
518 TimeZone *TimeZone `json:"timeZone,omitempty"`
519 // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and +18
520 // hours. For example, a UTC offset of -4:00 would be represented as { seconds:
521 // -14400 }.
522 UtcOffset string `json:"utcOffset,omitempty"`
523 // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
524 // datetime without a year.
525 Year int64 `json:"year,omitempty"`
526 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally
527 // include in API requests. By default, fields with empty or default values are
528 // omitted from API requests. See
529 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
530 // details.
531 ForceSendFields []string `json:"-"`
532 // NullFields is a list of field names (e.g. "Day") to include in API requests
533 // with the JSON null value. By default, fields with empty values are omitted
534 // from API requests. See
535 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
536 NullFields []string `json:"-"`
537 }
538
539 func (s DateTime) MarshalJSON() ([]byte, error) {
540 type NoMethod DateTime
541 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
542 }
543
544 // Early: LINT.IfChange First Channel to receive the updates. Meant to dev/test
545 // instances
546 type Early struct {
547 }
548
549 // EmployeeInfo: Information about a particular employee for planning purposes.
550 type EmployeeInfo struct {
551 // Id: Required. Unique ID of this employee.
552 Id string `json:"id,omitempty"`
553 // UnwantedEventIntervals: Optional. A list of unwanted event intervals for
554 // this employee. The start time of the interval must be in the planning
555 // horizon.
556 UnwantedEventIntervals []*UnwantedEventInterval `json:"unwantedEventIntervals,omitempty"`
557 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
558 // include in API requests. By default, fields with empty or default values are
559 // omitted from API requests. See
560 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
561 // details.
562 ForceSendFields []string `json:"-"`
563 // NullFields is a list of field names (e.g. "Id") to include in API requests
564 // with the JSON null value. By default, fields with empty values are omitted
565 // from API requests. See
566 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
567 NullFields []string `json:"-"`
568 }
569
570 func (s EmployeeInfo) MarshalJSON() ([]byte, error) {
571 type NoMethod EmployeeInfo
572 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
573 }
574
575 // Empty: A generic empty message that you can re-use to avoid defining
576 // duplicated empty messages in your APIs. A typical example is to use it as
577 // the request or the response type of an API method. For instance: service Foo
578 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
579 type Empty struct {
580 // ServerResponse contains the HTTP response code and headers from the server.
581 googleapi.ServerResponse `json:"-"`
582 }
583
584 // EventTemplate: Template specifying rules for generating a single event that
585 // occurs during a shift. An event may represent a meeting, break, lunch, etc.
586 type EventTemplate struct {
587 // DurationMinutes: Required. Fixed duration in minutes of this event.
588 DurationMinutes int64 `json:"durationMinutes,omitempty"`
589 // Id: Required. Unique ID of this template.
590 Id string `json:"id,omitempty"`
591 // MaximumMinutesAfterShiftStart: Optional. Maximum number of minutes after the
592 // beginning of a shift that this event can start.
593 MaximumMinutesAfterShiftStart int64 `json:"maximumMinutesAfterShiftStart,omitempty"`
594 // MinimumMinutesAfterShiftStart: Optional. Minimum number of minutes after the
595 // beginning of a shift that this event can start.
596 MinimumMinutesAfterShiftStart int64 `json:"minimumMinutesAfterShiftStart,omitempty"`
597 // StartTimeIncrementMinutes: Required. The time increment (in minutes) used to
598 // generate the set of possible event start times between
599 // `minimum_minutes_after_shift_start` and `maximum_minutes_after_shift_start`.
600 // For example, if the minimum minutes after shift start are 30, maximum
601 // minutes after shift start are 45, and the start time increment is 5 minutes,
602 // the event can take place 30, 35, 40, or 45 minutes after the start of the
603 // shift.
604 StartTimeIncrementMinutes int64 `json:"startTimeIncrementMinutes,omitempty"`
605 // ForceSendFields is a list of field names (e.g. "DurationMinutes") to
606 // unconditionally include in API requests. By default, fields with empty or
607 // default values are omitted from API requests. See
608 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
609 // details.
610 ForceSendFields []string `json:"-"`
611 // NullFields is a list of field names (e.g. "DurationMinutes") to include in
612 // API requests with the JSON null value. By default, fields with empty values
613 // are omitted from API requests. See
614 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
615 NullFields []string `json:"-"`
616 }
617
618 func (s EventTemplate) MarshalJSON() ([]byte, error) {
619 type NoMethod EventTemplate
620 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
621 }
622
623 type FeatureConfig struct {
624 // AgentDesktopEnabled: Optional. If true - enables the agent desktop feature.
625 // Default is false.
626 AgentDesktopEnabled bool `json:"agentDesktopEnabled,omitempty"`
627 // ForceSendFields is a list of field names (e.g. "AgentDesktopEnabled") to
628 // unconditionally include in API requests. By default, fields with empty or
629 // default values are omitted from API requests. See
630 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
631 // details.
632 ForceSendFields []string `json:"-"`
633 // NullFields is a list of field names (e.g. "AgentDesktopEnabled") to include
634 // in API requests with the JSON null value. By default, fields with empty
635 // values are omitted from API requests. See
636 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
637 NullFields []string `json:"-"`
638 }
639
640 func (s FeatureConfig) MarshalJSON() ([]byte, error) {
641 type NoMethod FeatureConfig
642 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
643 }
644
645 // GenerateShiftsRequest: Request with constraints for generating shifts. The
646 // shifts generated must adhere to these constraints.
647 type GenerateShiftsRequest struct {
648 // EmployeeInfo: Optional. Employee information that should be considered when
649 // generating shifts.
650 EmployeeInfo []*EmployeeInfo `json:"employeeInfo,omitempty"`
651 // PlanningHorizon: Required. The solver will generate the maximum number of
652 // shifts per shift template.
653 PlanningHorizon *PlanningHorizon `json:"planningHorizon,omitempty"`
654 // ShiftTemplates: Required. Set of shift templates specifying rules for
655 // generating shifts. A shift template can be used for generating multiple
656 // shifts.
657 ShiftTemplates []*ShiftTemplate `json:"shiftTemplates,omitempty"`
658 // SolverConfig: Required. Parameters for the solver.
659 SolverConfig *SolverConfig `json:"solverConfig,omitempty"`
660 // WorkforceDemands: Required. All the workforce demands that the generated
661 // shifts need to cover. The planning horizon is defined between the earliest
662 // start time and the latest end time across all the entries. This field cannot
663 // be empty.
664 WorkforceDemands *WorkforceDemandList `json:"workforceDemands,omitempty"`
665 // ForceSendFields is a list of field names (e.g. "EmployeeInfo") to
666 // unconditionally include in API requests. By default, fields with empty or
667 // default values are omitted from API requests. See
668 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
669 // details.
670 ForceSendFields []string `json:"-"`
671 // NullFields is a list of field names (e.g. "EmployeeInfo") to include in API
672 // requests with the JSON null value. By default, fields with empty values are
673 // omitted from API requests. See
674 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
675 NullFields []string `json:"-"`
676 }
677
678 func (s GenerateShiftsRequest) MarshalJSON() ([]byte, error) {
679 type NoMethod GenerateShiftsRequest
680 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
681 }
682
683 // GoogleCloudCommonOperationMetadata: Represents the metadata of the
684 // long-running operation.
685 type GoogleCloudCommonOperationMetadata struct {
686 // ApiVersion: Output only. API version used to start the operation.
687 ApiVersion string `json:"apiVersion,omitempty"`
688 // CancelRequested: Output only. Identifies whether the user has requested
689 // cancellation of the operation. Operations that have been cancelled
690 // successfully have google.longrunning.Operation.error value with a
691 // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
692 CancelRequested bool `json:"cancelRequested,omitempty"`
693 // CreateTime: Output only. The time the operation was created.
694 CreateTime string `json:"createTime,omitempty"`
695 // EndTime: Output only. The time the operation finished running.
696 EndTime string `json:"endTime,omitempty"`
697 // StatusDetail: Output only. Human-readable status of the operation, if any.
698 StatusDetail string `json:"statusDetail,omitempty"`
699 // Target: Output only. Server-defined resource path for the target of the
700 // operation.
701 Target string `json:"target,omitempty"`
702 // Verb: Output only. Name of the verb executed by the operation.
703 Verb string `json:"verb,omitempty"`
704 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
705 // unconditionally include in API requests. By default, fields with empty or
706 // default values are omitted from API requests. See
707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
708 // details.
709 ForceSendFields []string `json:"-"`
710 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
711 // requests with the JSON null value. By default, fields with empty values are
712 // omitted from API requests. See
713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
714 NullFields []string `json:"-"`
715 }
716
717 func (s GoogleCloudCommonOperationMetadata) MarshalJSON() ([]byte, error) {
718 type NoMethod GoogleCloudCommonOperationMetadata
719 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
720 }
721
722 // InstanceConfig: Message storing the instance configuration.
723 type InstanceConfig struct {
724 // InstanceSize: The instance size of this the instance configuration.
725 //
726 // Possible values:
727 // "INSTANCE_SIZE_UNSPECIFIED" - The default value. This value is used if the
728 // state is omitted.
729 // "STANDARD_SMALL" - Instance Size STANDARD_SMALL.
730 // "STANDARD_MEDIUM" - Instance Size STANDARD_MEDIUM.
731 // "STANDARD_LARGE" - Instance Size STANDARD_LARGE.
732 // "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE.
733 // "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE.
734 // "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE.
735 // "MULTIREGION_SMALL" - Instance Size MULTIREGION_SMALL
736 // "MULTIREGION_MEDIUM" - Instance Size MULTIREGION_MEDIUM
737 // "MULTIREGION_LARGE" - Instance Size MULTIREGION_LARGE
738 // "MULTIREGION_XLARGE" - Instance Size MULTIREGION_XLARGE
739 // "MULTIREGION_2XLARGE" - Instance Size MULTIREGION_2XLARGE.
740 // "MULTIREGION_3XLARGE" - Instance Size MULTIREGION_3XLARGE.
741 // "DEV_SMALL" - Instance Size DEV_SMALL
742 // "SANDBOX_SMALL" - Instance Size SANDBOX_SMALL
743 // "TRIAL_SMALL" - Instance Size TRIAL_SMALL
744 // "TIME_LIMITED_TRIAL_SMALL" - Instance Size TIME_LIMITED_TRIAL_SMALL
745 InstanceSize string `json:"instanceSize,omitempty"`
746 // ForceSendFields is a list of field names (e.g. "InstanceSize") to
747 // unconditionally include in API requests. By default, fields with empty or
748 // default values are omitted from API requests. See
749 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
750 // details.
751 ForceSendFields []string `json:"-"`
752 // NullFields is a list of field names (e.g. "InstanceSize") to include in API
753 // requests with the JSON null value. By default, fields with empty values are
754 // omitted from API requests. See
755 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
756 NullFields []string `json:"-"`
757 }
758
759 func (s InstanceConfig) MarshalJSON() ([]byte, error) {
760 type NoMethod InstanceConfig
761 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
762 }
763
764 // ListContactCentersResponse: Message for response to listing ContactCenters
765 type ListContactCentersResponse struct {
766 // ContactCenters: The list of ContactCenter
767 ContactCenters []*ContactCenter `json:"contactCenters,omitempty"`
768 // NextPageToken: A token identifying a page of results the server should
769 // return.
770 NextPageToken string `json:"nextPageToken,omitempty"`
771 // Unreachable: Locations that could not be reached.
772 Unreachable []string `json:"unreachable,omitempty"`
773
774 // ServerResponse contains the HTTP response code and headers from the server.
775 googleapi.ServerResponse `json:"-"`
776 // ForceSendFields is a list of field names (e.g. "ContactCenters") to
777 // unconditionally include in API requests. By default, fields with empty or
778 // default values are omitted from API requests. See
779 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
780 // details.
781 ForceSendFields []string `json:"-"`
782 // NullFields is a list of field names (e.g. "ContactCenters") to include in
783 // API requests with the JSON null value. By default, fields with empty values
784 // are omitted from API requests. See
785 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
786 NullFields []string `json:"-"`
787 }
788
789 func (s ListContactCentersResponse) MarshalJSON() ([]byte, error) {
790 type NoMethod ListContactCentersResponse
791 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
792 }
793
794 // ListLocationsResponse: The response message for Locations.ListLocations.
795 type ListLocationsResponse struct {
796 // Locations: A list of locations that matches the specified filter in the
797 // request.
798 Locations []*Location `json:"locations,omitempty"`
799 // NextPageToken: The standard List next-page token.
800 NextPageToken string `json:"nextPageToken,omitempty"`
801
802 // ServerResponse contains the HTTP response code and headers from the server.
803 googleapi.ServerResponse `json:"-"`
804 // ForceSendFields is a list of field names (e.g. "Locations") to
805 // unconditionally include in API requests. By default, fields with empty or
806 // default values are omitted from API requests. See
807 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
808 // details.
809 ForceSendFields []string `json:"-"`
810 // NullFields is a list of field names (e.g. "Locations") to include in API
811 // requests with the JSON null value. By default, fields with empty values are
812 // omitted from API requests. See
813 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
814 NullFields []string `json:"-"`
815 }
816
817 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
818 type NoMethod ListLocationsResponse
819 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
820 }
821
822 // ListOperationsResponse: The response message for Operations.ListOperations.
823 type ListOperationsResponse struct {
824 // NextPageToken: The standard List next-page token.
825 NextPageToken string `json:"nextPageToken,omitempty"`
826 // Operations: A list of operations that matches the specified filter in the
827 // request.
828 Operations []*Operation `json:"operations,omitempty"`
829 // Unreachable: Unordered list. Unreachable resources. Populated when the
830 // request sets `ListOperationsRequest.return_partial_success` and reads across
831 // collections. For example, when attempting to list all resources across all
832 // supported locations.
833 Unreachable []string `json:"unreachable,omitempty"`
834
835 // ServerResponse contains the HTTP response code and headers from the server.
836 googleapi.ServerResponse `json:"-"`
837 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
838 // unconditionally include in API requests. By default, fields with empty or
839 // default values are omitted from API requests. See
840 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
841 // details.
842 ForceSendFields []string `json:"-"`
843 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
844 // requests with the JSON null value. By default, fields with empty values are
845 // omitted from API requests. See
846 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
847 NullFields []string `json:"-"`
848 }
849
850 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
851 type NoMethod ListOperationsResponse
852 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
853 }
854
855 // Location: A resource that represents a Google Cloud location.
856 type Location struct {
857 // DisplayName: The friendly name for this location, typically a nearby city
858 // name. For example, "Tokyo".
859 DisplayName string `json:"displayName,omitempty"`
860 // Labels: Cross-service attributes for the location. For example
861 // {"cloud.googleapis.com/region": "us-east1"}
862 Labels map[string]string `json:"labels,omitempty"`
863 // LocationId: The canonical id for this location. For example: "us-east1".
864 LocationId string `json:"locationId,omitempty"`
865 // Metadata: Service-specific metadata. For example the available capacity at
866 // the given location.
867 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
868 // Name: Resource name for the location, which may vary between
869 // implementations. For example:
870 // "projects/example-project/locations/us-east1"
871 Name string `json:"name,omitempty"`
872
873 // ServerResponse contains the HTTP response code and headers from the server.
874 googleapi.ServerResponse `json:"-"`
875 // ForceSendFields is a list of field names (e.g. "DisplayName") to
876 // unconditionally include in API requests. By default, fields with empty or
877 // default values are omitted from API requests. See
878 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
879 // details.
880 ForceSendFields []string `json:"-"`
881 // NullFields is a list of field names (e.g. "DisplayName") to include in API
882 // requests with the JSON null value. By default, fields with empty values are
883 // omitted from API requests. See
884 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
885 NullFields []string `json:"-"`
886 }
887
888 func (s Location) MarshalJSON() ([]byte, error) {
889 type NoMethod Location
890 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
891 }
892
893 // Normal: Instances in this Channel will receive updates after all instances
894 // in `Early` were updated + 2 days.
895 type Normal struct {
896 }
897
898 // Operation: This resource represents a long-running operation that is the
899 // result of a network API call.
900 type Operation struct {
901 // Done: If the value is `false`, it means the operation is still in progress.
902 // If `true`, the operation is completed, and either `error` or `response` is
903 // available.
904 Done bool `json:"done,omitempty"`
905 // Error: The error result of the operation in case of failure or cancellation.
906 Error *Status `json:"error,omitempty"`
907 // Metadata: Service-specific metadata associated with the operation. It
908 // typically contains progress information and common metadata such as create
909 // time. Some services might not provide such metadata. Any method that returns
910 // a long-running operation should document the metadata type, if any.
911 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
912 // Name: The server-assigned name, which is only unique within the same service
913 // that originally returns it. If you use the default HTTP mapping, the `name`
914 // should be a resource name ending with `operations/{unique_id}`.
915 Name string `json:"name,omitempty"`
916 // Response: The normal, successful response of the operation. If the original
917 // method returns no data on success, such as `Delete`, the response is
918 // `google.protobuf.Empty`. If the original method is standard
919 // `Get`/`Create`/`Update`, the response should be the resource. For other
920 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
921 // original method name. For example, if the original method name is
922 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
923 Response googleapi.RawMessage `json:"response,omitempty"`
924
925 // ServerResponse contains the HTTP response code and headers from the server.
926 googleapi.ServerResponse `json:"-"`
927 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
928 // include in API requests. By default, fields with empty or default values are
929 // omitted from API requests. See
930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
931 // details.
932 ForceSendFields []string `json:"-"`
933 // NullFields is a list of field names (e.g. "Done") to include in API requests
934 // with the JSON null value. By default, fields with empty values are omitted
935 // from API requests. See
936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
937 NullFields []string `json:"-"`
938 }
939
940 func (s Operation) MarshalJSON() ([]byte, error) {
941 type NoMethod Operation
942 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
943 }
944
945 // OperationMetadata: Represents the metadata of the long-running operation.
946 type OperationMetadata struct {
947 // ApiVersion: Output only. API version used to start the operation.
948 ApiVersion string `json:"apiVersion,omitempty"`
949 // ContactCenter: Contact center information for this request
950 ContactCenter *ContactCenter `json:"contactCenter,omitempty"`
951 // CreateTime: Output only. The time the operation was created.
952 CreateTime string `json:"createTime,omitempty"`
953 // EndTime: Output only. The time the operation finished running.
954 EndTime string `json:"endTime,omitempty"`
955 // RequestedCancellation: Output only. Identifies whether the user has
956 // requested cancellation of the operation. Operations that have been cancelled
957 // successfully have Operation.error value with a google.rpc.Status.code of 1,
958 // corresponding to `Code.CANCELLED`.
959 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
960 // StatusMessage: Output only. Human-readable status of the operation, if any.
961 StatusMessage string `json:"statusMessage,omitempty"`
962 // Target: Output only. Server-defined resource path for the target of the
963 // operation.
964 Target string `json:"target,omitempty"`
965 // Verb: Output only. Name of the verb executed by the operation.
966 Verb string `json:"verb,omitempty"`
967 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
968 // unconditionally include in API requests. By default, fields with empty or
969 // default values are omitted from API requests. See
970 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
971 // details.
972 ForceSendFields []string `json:"-"`
973 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
974 // requests with the JSON null value. By default, fields with empty values are
975 // omitted from API requests. See
976 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
977 NullFields []string `json:"-"`
978 }
979
980 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
981 type NoMethod OperationMetadata
982 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
983 }
984
985 // PlanningHorizon: Specifies the time interval during which the solver should
986 // generate shifts. The start time must be before the end time.
987 type PlanningHorizon struct {
988 // EndTime: Required. End of the time interval for the given demand
989 // (exclusive). These values are read down to the minute; seconds and all
990 // smaller units are ignored.
991 EndTime *DateTime `json:"endTime,omitempty"`
992 // StartTime: Required. Start of the time interval for the given demand
993 // (inclusive). These values are read down to the minute; seconds and all
994 // smaller units are ignored.
995 StartTime *DateTime `json:"startTime,omitempty"`
996 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
997 // include in API requests. By default, fields with empty or default values are
998 // omitted from API requests. See
999 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1000 // details.
1001 ForceSendFields []string `json:"-"`
1002 // NullFields is a list of field names (e.g. "EndTime") to include in API
1003 // requests with the JSON null value. By default, fields with empty values are
1004 // omitted from API requests. See
1005 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1006 NullFields []string `json:"-"`
1007 }
1008
1009 func (s PlanningHorizon) MarshalJSON() ([]byte, error) {
1010 type NoMethod PlanningHorizon
1011 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1012 }
1013
1014 // PrivateAccess: Defines ingress and egress private traffic settings for CCAIP
1015 // instances.
1016 type PrivateAccess struct {
1017 // EgressSettings: List of egress components that should not be accessed via
1018 // the Internet. For more information see go/ccaip-private-path-v2.
1019 EgressSettings []*Component `json:"egressSettings,omitempty"`
1020 // IngressSettings: List of ingress components that should not be accessed via
1021 // the Internet. For more information see go/ccaip-private-path-v2.
1022 IngressSettings []*Component `json:"ingressSettings,omitempty"`
1023 // PscSetting: Private service connect settings.
1024 PscSetting *PscSetting `json:"pscSetting,omitempty"`
1025 // ForceSendFields is a list of field names (e.g. "EgressSettings") to
1026 // unconditionally include in API requests. By default, fields with empty or
1027 // default values are omitted from API requests. See
1028 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1029 // details.
1030 ForceSendFields []string `json:"-"`
1031 // NullFields is a list of field names (e.g. "EgressSettings") to include in
1032 // API requests with the JSON null value. By default, fields with empty values
1033 // are omitted from API requests. See
1034 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1035 NullFields []string `json:"-"`
1036 }
1037
1038 func (s PrivateAccess) MarshalJSON() ([]byte, error) {
1039 type NoMethod PrivateAccess
1040 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1041 }
1042
1043 // PscSetting: Private service connect settings.
1044 type PscSetting struct {
1045 // AllowedConsumerProjectIds: The list of project ids that are allowed to send
1046 // traffic to the service attachment. This field should be filled only for the
1047 // ingress components.
1048 AllowedConsumerProjectIds []string `json:"allowedConsumerProjectIds,omitempty"`
1049 // ProducerProjectIds: Output only. The CCAIP tenant project ids.
1050 ProducerProjectIds []string `json:"producerProjectIds,omitempty"`
1051 // ForceSendFields is a list of field names (e.g. "AllowedConsumerProjectIds")
1052 // to unconditionally include in API requests. By default, fields with empty or
1053 // default values are omitted from API requests. See
1054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1055 // details.
1056 ForceSendFields []string `json:"-"`
1057 // NullFields is a list of field names (e.g. "AllowedConsumerProjectIds") to
1058 // include in API requests with the JSON null value. By default, fields with
1059 // empty values are omitted from API requests. See
1060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1061 NullFields []string `json:"-"`
1062 }
1063
1064 func (s PscSetting) MarshalJSON() ([]byte, error) {
1065 type NoMethod PscSetting
1066 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1067 }
1068
1069 // Quota: Quota details.
1070 type Quota struct {
1071 // ContactCenterCountLimit: Reflects the count limit of contact centers on a
1072 // billing account.
1073 ContactCenterCountLimit int64 `json:"contactCenterCountLimit,omitempty"`
1074 // ContactCenterCountSum: Reflects the count sum of contact centers on a
1075 // billing account.
1076 ContactCenterCountSum int64 `json:"contactCenterCountSum,omitempty"`
1077 // ContactCenterInstanceSize: Contact center instance type.
1078 //
1079 // Possible values:
1080 // "INSTANCE_SIZE_UNSPECIFIED" - The default value. This value is used if the
1081 // state is omitted.
1082 // "STANDARD_SMALL" - Instance Size STANDARD_SMALL.
1083 // "STANDARD_MEDIUM" - Instance Size STANDARD_MEDIUM.
1084 // "STANDARD_LARGE" - Instance Size STANDARD_LARGE.
1085 // "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE.
1086 // "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE.
1087 // "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE.
1088 // "MULTIREGION_SMALL" - Instance Size MULTIREGION_SMALL
1089 // "MULTIREGION_MEDIUM" - Instance Size MULTIREGION_MEDIUM
1090 // "MULTIREGION_LARGE" - Instance Size MULTIREGION_LARGE
1091 // "MULTIREGION_XLARGE" - Instance Size MULTIREGION_XLARGE
1092 // "MULTIREGION_2XLARGE" - Instance Size MULTIREGION_2XLARGE.
1093 // "MULTIREGION_3XLARGE" - Instance Size MULTIREGION_3XLARGE.
1094 // "DEV_SMALL" - Instance Size DEV_SMALL
1095 // "SANDBOX_SMALL" - Instance Size SANDBOX_SMALL
1096 // "TRIAL_SMALL" - Instance Size TRIAL_SMALL
1097 // "TIME_LIMITED_TRIAL_SMALL" - Instance Size TIME_LIMITED_TRIAL_SMALL
1098 ContactCenterInstanceSize string `json:"contactCenterInstanceSize,omitempty"`
1099 // ForceSendFields is a list of field names (e.g. "ContactCenterCountLimit") to
1100 // unconditionally include in API requests. By default, fields with empty or
1101 // default values are omitted from API requests. See
1102 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1103 // details.
1104 ForceSendFields []string `json:"-"`
1105 // NullFields is a list of field names (e.g. "ContactCenterCountLimit") to
1106 // include in API requests with the JSON null value. By default, fields with
1107 // empty values are omitted from API requests. See
1108 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1109 NullFields []string `json:"-"`
1110 }
1111
1112 func (s Quota) MarshalJSON() ([]byte, error) {
1113 type NoMethod Quota
1114 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1115 }
1116
1117 // SAMLParams: Message storing SAML params to enable Google as IDP.
1118 type SAMLParams struct {
1119 // AuthenticationContexts: Additional contexts used for authentication.
1120 //
1121 // Possible values:
1122 // "AUTHENTICATION_CONTEXT_UNSPECIFIED" - The Unspecified class indicates
1123 // that the authentication was performed by unspecified means.
1124 // "INTERNET_PROTOCOL" - The Internet Protocol class is applicable when a
1125 // principal is authenticated through the use of a provided IP address.
1126 // "INTERNET_PROTOCOL_PASSWORD" - The Internet Protocol Password class is
1127 // applicable when a principal is authenticated through the use of a provided
1128 // IP address, in addition to a username/password.
1129 // "KERBEROS" - This class is applicable when the principal has authenticated
1130 // using a password to a local authentication authority, in order to acquire a
1131 // Kerberos ticket. That Kerberos ticket is then used for subsequent network
1132 // authentication.
1133 // "MOBILE_ONE_FACTOR_UNREGISTERED" - Reflects no mobile customer
1134 // registration procedures and an authentication of the mobile device without
1135 // requiring explicit end-user interaction. This context class authenticates
1136 // only the device and never the user; it is useful when services other than
1137 // the mobile operator want to add a secure device authentication to their
1138 // authentication process.
1139 // "MOBILE_TWO_FACTOR_UNREGISTERED" - Reflects no mobile customer
1140 // registration procedures and a two-factor based authentication, such as
1141 // secure device and user PIN. This context class is useful when a service
1142 // other than the mobile operator wants to link their customer ID to a mobile
1143 // supplied two-factor authentication service by capturing mobile phone data at
1144 // enrollment.
1145 // "MOBILE_ONE_FACTOR_CONTRACT" - Reflects mobile contract customer
1146 // registration procedures and a single factor authentication. For example, a
1147 // digital signing device with tamper resistant memory for key storage, such as
1148 // the mobile MSISDN, but no required PIN or biometric for real-time user
1149 // authentication.
1150 // "MOBILE_TWO_FACTOR_CONTRACT" - Reflects mobile contract customer
1151 // registration procedures and a two-factor based authentication. For example,
1152 // a digital signing device with tamper resistant memory for key storage, such
1153 // as a GSM SIM, that requires explicit proof of user identity and intent, such
1154 // as a PIN or biometric.
1155 // "PASSWORD" - The Password class is applicable when a principal
1156 // authenticates to an authentication authority through the presentation of a
1157 // password over an unprotected HTTP session.
1158 // "PASSWORD_PROTECTED_TRANSPORT" - The PasswordProtectedTransport class is
1159 // applicable when a principal authenticates to an authentication authority
1160 // through the presentation of a password over a protected session.
1161 // "PREVIOUS_SESSION" - The PreviousSession class is applicable when a
1162 // principal had authenticated to an authentication authority at some point in
1163 // the past using any authentication context supported by that authentication
1164 // authority
1165 // "PUBLIC_KEY_X509" - The X509 context class indicates that the principal
1166 // authenticated by means of a digital signature where the key was validated as
1167 // part of an X.509 Public Key Infrastructure.
1168 // "PUBLIC_KEY_PGP" - The PGP context class indicates that the principal
1169 // authenticated by means of a digital signature where the key was validated as
1170 // part of a PGP Public Key Infrastructure.
1171 // "PUBLIC_KEY_SPKI" - The SPKI context class indicates that the principal
1172 // authenticated by means of a digital signature where the key was validated
1173 // via an SPKI Infrastructure.
1174 // "PUBLIC_KEY_XML_DIGITAL_SIGNATURE" - This context class indicates that the
1175 // principal authenticated by means of a digital signature according to the
1176 // processing rules specified in the XML Digital Signature specification
1177 // [XMLSig].
1178 // "SMARTCARD" - The Smartcard class is identified when a principal
1179 // authenticates to an authentication authority using a smartcard.
1180 // "SMARTCARD_PKI" - The SmartcardPKI class is applicable when a principal
1181 // authenticates to an authentication authority through a two-factor
1182 // authentication mechanism using a smartcard with enclosed private key and a
1183 // PIN.
1184 // "SOFTWARE_PKI" - The Software-PKI class is applicable when a principal
1185 // uses an X.509 certificate stored in software to authenticate to the
1186 // authentication authority.
1187 // "TELEPHONY" - This class is used to indicate that the principal
1188 // authenticated via the provision of a fixed-line telephone number,
1189 // transported via a telephony protocol such as ADSL.
1190 // "TELEPHONY_NOMADIC" - Indicates that the principal is "roaming" (perhaps
1191 // using a phone card) and authenticates via the means of the line number, a
1192 // user suffix, and a password element.
1193 // "TELEPHONY_PERSONALIZED" - This class is used to indicate that the
1194 // principal authenticated via the provision of a fixed-line telephone number
1195 // and a user suffix, transported via a telephony protocol such as ADSL.
1196 // "TELEPHONY_AUTHENTICATED" - Indicates that the principal authenticated via
1197 // the means of the line number, a user suffix, and a password element.
1198 // "SECURE_REMOTE_PASSWORD" - The Secure Remote Password class is applicable
1199 // when the authentication was performed by means of Secure Remote Password as
1200 // specified in [RFC 2945].
1201 // "SSL_TLS_CERTIFICATE_BASED" - This class indicates that the principal
1202 // authenticated by means of a client certificate, secured with the SSL/TLS
1203 // transport.
1204 // "TIME_SYNC_TOKEN" - The TimeSyncToken class is applicable when a principal
1205 // authenticates through a time synchronization token.
1206 AuthenticationContexts []string `json:"authenticationContexts,omitempty"`
1207 // Certificate: SAML certificate
1208 Certificate string `json:"certificate,omitempty"`
1209 // EmailMapping: IdP field that maps to the user’s email address
1210 EmailMapping string `json:"emailMapping,omitempty"`
1211 // EntityId: Entity id URL
1212 EntityId string `json:"entityId,omitempty"`
1213 // SsoUri: Single sign-on URL
1214 SsoUri string `json:"ssoUri,omitempty"`
1215 // UserEmail: Email address of the first admin users.
1216 UserEmail string `json:"userEmail,omitempty"`
1217 // ForceSendFields is a list of field names (e.g. "AuthenticationContexts") to
1218 // unconditionally include in API requests. By default, fields with empty or
1219 // default values are omitted from API requests. See
1220 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1221 // details.
1222 ForceSendFields []string `json:"-"`
1223 // NullFields is a list of field names (e.g. "AuthenticationContexts") to
1224 // include in API requests with the JSON null value. By default, fields with
1225 // empty values are omitted from API requests. See
1226 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1227 NullFields []string `json:"-"`
1228 }
1229
1230 func (s SAMLParams) MarshalJSON() ([]byte, error) {
1231 type NoMethod SAMLParams
1232 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1233 }
1234
1235 // ShiftTemplate: Template specifying rules for generating shifts. A shift is a
1236 // unit of work that specifies a start time, end time, and may contain events
1237 // (e.g. lunch, breaks etc.). Shifts will be assigned to specific dates in the
1238 // response.
1239 type ShiftTemplate struct {
1240 // AssignableEmployeeIds: Optional. A list of specific employee IDs that can be
1241 // assigned to shifts generated by this template. If this field is present,
1242 // there will be `EmployeeSchedule`s in the response for which the
1243 // `EmployeeSchedule.employee_id` field is set to one of the IDs in this list.
1244 // The number of employee schedules with an assigned employee ID will be
1245 // between `minimum_employee_count` and `maximum_employee_count`. If this field
1246 // is empty, between `minimum_employee_count` and `maximum_employee_count`
1247 // employees can be assigned to shifts generated by this template and the
1248 // employee schedules won't have an assigned employee ID. Currently, only one
1249 // assignable employee ID is supported.
1250 AssignableEmployeeIds []string `json:"assignableEmployeeIds,omitempty"`
1251 // DaysOffCountPerWeek: Optional. Fixed number of days off per week. An
1252 // employee has a given day off if they are not assigned to a shift that starts
1253 // on that day. A week is 7 days and begins on Sunday.
1254 DaysOffCountPerWeek int64 `json:"daysOffCountPerWeek,omitempty"`
1255 // DaysOffDates: Optional. Fixed dates when shifts from this template should
1256 // not be generated.
1257 DaysOffDates *DateList `json:"daysOffDates,omitempty"`
1258 // DurationMinutes: Required. Fixed duration of a shift generated by this
1259 // template.
1260 DurationMinutes int64 `json:"durationMinutes,omitempty"`
1261 // EarliestStartTime: Required. Earliest time in the day that a shift can
1262 // start. This value is specified with hours and minutes; seconds and nanos are
1263 // ignored.
1264 EarliestStartTime *TimeOfDay `json:"earliestStartTime,omitempty"`
1265 // EventTemplates: Optional. Rules for generating events for each shift.
1266 // Exactly one event will be included in each shift for each `EventTemplate`
1267 // specified.
1268 EventTemplates []*EventTemplate `json:"eventTemplates,omitempty"`
1269 // Id: Required. Unique ID of this template.
1270 Id string `json:"id,omitempty"`
1271 // LatestStartTime: Required. Latest time in the day that a shift can start.
1272 // This value is specified with hours and minutes; seconds and nanos are
1273 // ignored. If this value is less than the `earliest_start_time`, it may imply
1274 // an overnight shift.
1275 LatestStartTime *TimeOfDay `json:"latestStartTime,omitempty"`
1276 // MaximumEmployeeCount: Required. Maximum number of employees that can be
1277 // assigned to all shifts generated by this template on working days.
1278 MaximumEmployeeCount int64 `json:"maximumEmployeeCount,omitempty"`
1279 // MinimumEmployeeCount: Optional. Minimum number of employees that can be
1280 // assigned to all shifts generated by this template on working days.
1281 MinimumEmployeeCount int64 `json:"minimumEmployeeCount,omitempty"`
1282 // MinimumIntereventGapMinutes: Optional. Minimum minutes between the end of
1283 // one event and the start of the next.
1284 MinimumIntereventGapMinutes int64 `json:"minimumIntereventGapMinutes,omitempty"`
1285 // StartTimeIncrementMinutes: Optional. The time increment (in minutes) used to
1286 // generate the set of possible start times between `earliest_start_time` and
1287 // `latest_start_time`. For example, if the earliest start time is 8:00, the
1288 // latest start time is 8:30, and the start time increment is 10 minutes, then
1289 // all possible start times for this shift template are: 8:00, 8:10, 8:20, and
1290 // 8:30.
1291 StartTimeIncrementMinutes int64 `json:"startTimeIncrementMinutes,omitempty"`
1292 // ForceSendFields is a list of field names (e.g. "AssignableEmployeeIds") to
1293 // unconditionally include in API requests. By default, fields with empty or
1294 // default values are omitted from API requests. See
1295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1296 // details.
1297 ForceSendFields []string `json:"-"`
1298 // NullFields is a list of field names (e.g. "AssignableEmployeeIds") to
1299 // include in API requests with the JSON null value. By default, fields with
1300 // empty values are omitted from API requests. See
1301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1302 NullFields []string `json:"-"`
1303 }
1304
1305 func (s ShiftTemplate) MarshalJSON() ([]byte, error) {
1306 type NoMethod ShiftTemplate
1307 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1308 }
1309
1310 // SolverConfig: Specifies additional parameters for the solver generating
1311 // shifts.
1312 type SolverConfig struct {
1313 // MaximumProcessingDuration: Optional. Maximum time the solver should spend on
1314 // the problem. If not set, defaults to 1 minute. The choice of a time limit
1315 // should depend on the size of the problem. To give an example, when solving a
1316 // 7-day instance with 2 `ShiftTemplates`, each with ~20 possible start times
1317 // and holding 2 events with ~30 possible start times, and two days off per
1318 // week, recommended values are: <10s for fast solutions (and likely
1319 // suboptimal), (10s, 300s) for good quality solutions, and >300s for an
1320 // exhaustive search. Larger instances may require longer time limits. This
1321 // value is not a hard limit and it does not account for the communication
1322 // overhead. The expected latency to solve the problem may slightly exceed this
1323 // value.
1324 MaximumProcessingDuration string `json:"maximumProcessingDuration,omitempty"`
1325 // ScheduleType: Required. Specifies the type of schedule to generate.
1326 //
1327 // Possible values:
1328 // "SCHEDULE_TYPE_UNSPECIFIED" - Unspecified schedule type. Should not be
1329 // used.
1330 // "SINGLE_SHIFT" - Each `EmployeeSchedule` will include exactly one shift.
1331 // "WEEKLY_WITH_FIXED_EVENTS" - `EmployeeSchedule`s will include several
1332 // shifts to generate a week-long schedule. The start and end time of events in
1333 // a particular `EmployeeSchedule` will be identical. All the shifts have the
1334 // same start and end time.
1335 // "WEEKLY_WITH_VARIABLE_EVENTS" - `EmployeeSchedule`s will include several
1336 // shifts to generate a week-long schedule. The start and end time of events in
1337 // a particular `EmployeeSchedule` can vary. All the shifts have the same start
1338 // and end time. This option may result in longer solve times.
1339 ScheduleType string `json:"scheduleType,omitempty"`
1340 // ForceSendFields is a list of field names (e.g. "MaximumProcessingDuration")
1341 // to unconditionally include in API requests. By default, fields with empty or
1342 // default values are omitted from API requests. See
1343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1344 // details.
1345 ForceSendFields []string `json:"-"`
1346 // NullFields is a list of field names (e.g. "MaximumProcessingDuration") to
1347 // include in API requests with the JSON null value. By default, fields with
1348 // empty values are omitted from API requests. See
1349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1350 NullFields []string `json:"-"`
1351 }
1352
1353 func (s SolverConfig) MarshalJSON() ([]byte, error) {
1354 type NoMethod SolverConfig
1355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1356 }
1357
1358 // Status: The `Status` type defines a logical error model that is suitable for
1359 // different programming environments, including REST APIs and RPC APIs. It is
1360 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
1361 // pieces of data: error code, error message, and error details. You can find
1362 // out more about this error model and how to work with it in the API Design
1363 // Guide (https://cloud.google.com/apis/design/errors).
1364 type Status struct {
1365 // Code: The status code, which should be an enum value of google.rpc.Code.
1366 Code int64 `json:"code,omitempty"`
1367 // Details: A list of messages that carry the error details. There is a common
1368 // set of message types for APIs to use.
1369 Details []googleapi.RawMessage `json:"details,omitempty"`
1370 // Message: A developer-facing error message, which should be in English. Any
1371 // user-facing error message should be localized and sent in the
1372 // google.rpc.Status.details field, or localized by the client.
1373 Message string `json:"message,omitempty"`
1374 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1375 // include in API requests. By default, fields with empty or default values are
1376 // omitted from API requests. See
1377 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1378 // details.
1379 ForceSendFields []string `json:"-"`
1380 // NullFields is a list of field names (e.g. "Code") to include in API requests
1381 // with the JSON null value. By default, fields with empty values are omitted
1382 // from API requests. See
1383 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1384 NullFields []string `json:"-"`
1385 }
1386
1387 func (s Status) MarshalJSON() ([]byte, error) {
1388 type NoMethod Status
1389 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1390 }
1391
1392 // TimeOfDay: Represents a time of day. The date and time zone are either not
1393 // significant or are specified elsewhere. An API may choose to allow leap
1394 // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
1395 type TimeOfDay struct {
1396 // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0
1397 // and typically must be less than or equal to 23. An API may choose to allow
1398 // the value "24:00:00" for scenarios like business closing time.
1399 Hours int64 `json:"hours,omitempty"`
1400 // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less
1401 // than or equal to 59.
1402 Minutes int64 `json:"minutes,omitempty"`
1403 // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal
1404 // to 0 and less than or equal to 999,999,999.
1405 Nanos int64 `json:"nanos,omitempty"`
1406 // Seconds: Seconds of a minute. Must be greater than or equal to 0 and
1407 // typically must be less than or equal to 59. An API may allow the value 60 if
1408 // it allows leap-seconds.
1409 Seconds int64 `json:"seconds,omitempty"`
1410 // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
1411 // include in API requests. By default, fields with empty or default values are
1412 // omitted from API requests. See
1413 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1414 // details.
1415 ForceSendFields []string `json:"-"`
1416 // NullFields is a list of field names (e.g. "Hours") to include in API
1417 // requests with the JSON null value. By default, fields with empty values are
1418 // omitted from API requests. See
1419 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1420 NullFields []string `json:"-"`
1421 }
1422
1423 func (s TimeOfDay) MarshalJSON() ([]byte, error) {
1424 type NoMethod TimeOfDay
1425 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1426 }
1427
1428 // TimeZone: Represents a time zone from the IANA Time Zone Database
1429 // (https://www.iana.org/time-zones).
1430 type TimeZone struct {
1431 // Id: IANA Time Zone Database time zone. For example "America/New_York".
1432 Id string `json:"id,omitempty"`
1433 // Version: Optional. IANA Time Zone Database version number. For example
1434 // "2019a".
1435 Version string `json:"version,omitempty"`
1436 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
1437 // include in API requests. By default, fields with empty or default values are
1438 // omitted from API requests. See
1439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1440 // details.
1441 ForceSendFields []string `json:"-"`
1442 // NullFields is a list of field names (e.g. "Id") to include in API requests
1443 // with the JSON null value. By default, fields with empty values are omitted
1444 // from API requests. See
1445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1446 NullFields []string `json:"-"`
1447 }
1448
1449 func (s TimeZone) MarshalJSON() ([]byte, error) {
1450 type NoMethod TimeZone
1451 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1452 }
1453
1454 // URIs: Message storing the URIs of the ContactCenter.
1455 type URIs struct {
1456 // ChatBotUri: Chat Bot Uri of the ContactCenter
1457 ChatBotUri string `json:"chatBotUri,omitempty"`
1458 // MediaUri: Media Uri of the ContactCenter.
1459 MediaUri string `json:"mediaUri,omitempty"`
1460 // RootUri: Root Uri of the ContactCenter.
1461 RootUri string `json:"rootUri,omitempty"`
1462 // VirtualAgentStreamingServiceUri: Virtual Agent Streaming Service Uri of the
1463 // ContactCenter.
1464 VirtualAgentStreamingServiceUri string `json:"virtualAgentStreamingServiceUri,omitempty"`
1465 // ForceSendFields is a list of field names (e.g. "ChatBotUri") to
1466 // unconditionally include in API requests. By default, fields with empty or
1467 // default values are omitted from API requests. See
1468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1469 // details.
1470 ForceSendFields []string `json:"-"`
1471 // NullFields is a list of field names (e.g. "ChatBotUri") to include in API
1472 // requests with the JSON null value. By default, fields with empty values are
1473 // omitted from API requests. See
1474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1475 NullFields []string `json:"-"`
1476 }
1477
1478 func (s URIs) MarshalJSON() ([]byte, error) {
1479 type NoMethod URIs
1480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1481 }
1482
1483 // UnwantedEventInterval: Specifies a time interval during which the overlap
1484 // with events (generated from event templates) should be minimal.
1485 type UnwantedEventInterval struct {
1486 // DurationMinutes: Required. Duration of the event.
1487 DurationMinutes int64 `json:"durationMinutes,omitempty"`
1488 // StartTime: Required. Start time of the event.
1489 StartTime *DateTime `json:"startTime,omitempty"`
1490 // ForceSendFields is a list of field names (e.g. "DurationMinutes") to
1491 // unconditionally include in API requests. By default, fields with empty or
1492 // default values are omitted from API requests. See
1493 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1494 // details.
1495 ForceSendFields []string `json:"-"`
1496 // NullFields is a list of field names (e.g. "DurationMinutes") to include in
1497 // API requests with the JSON null value. By default, fields with empty values
1498 // are omitted from API requests. See
1499 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1500 NullFields []string `json:"-"`
1501 }
1502
1503 func (s UnwantedEventInterval) MarshalJSON() ([]byte, error) {
1504 type NoMethod UnwantedEventInterval
1505 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1506 }
1507
1508 // WeeklySchedule: Message representing a weekly schedule.
1509 type WeeklySchedule struct {
1510 // Days: Required. Days of the week this schedule applies to.
1511 //
1512 // Possible values:
1513 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
1514 // "MONDAY" - Monday
1515 // "TUESDAY" - Tuesday
1516 // "WEDNESDAY" - Wednesday
1517 // "THURSDAY" - Thursday
1518 // "FRIDAY" - Friday
1519 // "SATURDAY" - Saturday
1520 // "SUNDAY" - Sunday
1521 Days []string `json:"days,omitempty"`
1522 // Duration: Optional. Duration of the schedule.
1523 Duration string `json:"duration,omitempty"`
1524 // EndTime: Optional. Daily end time of the schedule. If `end_time` is before
1525 // `start_time`, the schedule will be considered as ending on the next day.
1526 EndTime *TimeOfDay `json:"endTime,omitempty"`
1527 // StartTime: Required. Daily start time of the schedule.
1528 StartTime *TimeOfDay `json:"startTime,omitempty"`
1529 // ForceSendFields is a list of field names (e.g. "Days") to unconditionally
1530 // include in API requests. By default, fields with empty or default values are
1531 // omitted from API requests. See
1532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1533 // details.
1534 ForceSendFields []string `json:"-"`
1535 // NullFields is a list of field names (e.g. "Days") to include in API requests
1536 // with the JSON null value. By default, fields with empty values are omitted
1537 // from API requests. See
1538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1539 NullFields []string `json:"-"`
1540 }
1541
1542 func (s WeeklySchedule) MarshalJSON() ([]byte, error) {
1543 type NoMethod WeeklySchedule
1544 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1545 }
1546
1547 // WorkforceDemand: Specifies the number of employees required to cover the
1548 // demand in the given time interval. The length of the interval must be
1549 // strictly positive.
1550 type WorkforceDemand struct {
1551 // EmployeeCount: Optional. Number of employees needed to cover the demand for
1552 // this interval.
1553 EmployeeCount int64 `json:"employeeCount,omitempty"`
1554 // EndTime: Required. End of the time interval for the given demand
1555 // (exclusive). These values are read down to the minute; seconds and all
1556 // smaller units are ignored.
1557 EndTime *DateTime `json:"endTime,omitempty"`
1558 // StartTime: Required. Start of the time interval for the given demand
1559 // (inclusive). These values are read down to the minute; seconds and all
1560 // smaller units are ignored.
1561 StartTime *DateTime `json:"startTime,omitempty"`
1562 // ForceSendFields is a list of field names (e.g. "EmployeeCount") to
1563 // unconditionally include in API requests. By default, fields with empty or
1564 // default values are omitted from API requests. See
1565 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1566 // details.
1567 ForceSendFields []string `json:"-"`
1568 // NullFields is a list of field names (e.g. "EmployeeCount") to include in API
1569 // requests with the JSON null value. By default, fields with empty values are
1570 // omitted from API requests. See
1571 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1572 NullFields []string `json:"-"`
1573 }
1574
1575 func (s WorkforceDemand) MarshalJSON() ([]byte, error) {
1576 type NoMethod WorkforceDemand
1577 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1578 }
1579
1580 // WorkforceDemandList: List of workforce demands.
1581 type WorkforceDemandList struct {
1582 // Values: Optional. Values in the list.
1583 Values []*WorkforceDemand `json:"values,omitempty"`
1584 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
1585 // include in API requests. By default, fields with empty or default values are
1586 // omitted from API requests. See
1587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1588 // details.
1589 ForceSendFields []string `json:"-"`
1590 // NullFields is a list of field names (e.g. "Values") to include in API
1591 // requests with the JSON null value. By default, fields with empty values are
1592 // omitted from API requests. See
1593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1594 NullFields []string `json:"-"`
1595 }
1596
1597 func (s WorkforceDemandList) MarshalJSON() ([]byte, error) {
1598 type NoMethod WorkforceDemandList
1599 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1600 }
1601
1602 type ProjectsLocationsGenerateShiftsCall struct {
1603 s *Service
1604 parent string
1605 generateshiftsrequest *GenerateShiftsRequest
1606 urlParams_ gensupport.URLParams
1607 ctx_ context.Context
1608 header_ http.Header
1609 }
1610
1611 // GenerateShifts: Generates shifts constrained by various parameters.
1612 //
1613 // - parent: Name of the parent resource associated with the request. Format:
1614 // projects/{project}/locations/{location}.
1615 func (r *ProjectsLocationsService) GenerateShifts(parent string, generateshiftsrequest *GenerateShiftsRequest) *ProjectsLocationsGenerateShiftsCall {
1616 c := &ProjectsLocationsGenerateShiftsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1617 c.parent = parent
1618 c.generateshiftsrequest = generateshiftsrequest
1619 return c
1620 }
1621
1622 // Fields allows partial responses to be retrieved. See
1623 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1624 // details.
1625 func (c *ProjectsLocationsGenerateShiftsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGenerateShiftsCall {
1626 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1627 return c
1628 }
1629
1630 // Context sets the context to be used in this call's Do method.
1631 func (c *ProjectsLocationsGenerateShiftsCall) Context(ctx context.Context) *ProjectsLocationsGenerateShiftsCall {
1632 c.ctx_ = ctx
1633 return c
1634 }
1635
1636 // Header returns a http.Header that can be modified by the caller to add
1637 // headers to the request.
1638 func (c *ProjectsLocationsGenerateShiftsCall) Header() http.Header {
1639 if c.header_ == nil {
1640 c.header_ = make(http.Header)
1641 }
1642 return c.header_
1643 }
1644
1645 func (c *ProjectsLocationsGenerateShiftsCall) doRequest(alt string) (*http.Response, error) {
1646 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1647 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.generateshiftsrequest)
1648 if err != nil {
1649 return nil, err
1650 }
1651 c.urlParams_.Set("alt", alt)
1652 c.urlParams_.Set("prettyPrint", "false")
1653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}:generateShifts")
1654 urls += "?" + c.urlParams_.Encode()
1655 req, err := http.NewRequest("POST", urls, body)
1656 if err != nil {
1657 return nil, err
1658 }
1659 req.Header = reqHeaders
1660 googleapi.Expand(req.URL, map[string]string{
1661 "parent": c.parent,
1662 })
1663 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.generateShifts", "request", internallog.HTTPRequest(req, body.Bytes()))
1664 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1665 }
1666
1667 // Do executes the "contactcenteraiplatform.projects.locations.generateShifts" call.
1668 // Any non-2xx status code is an error. Response headers are in either
1669 // *Operation.ServerResponse.Header or (if a response was returned at all) in
1670 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1671 // whether the returned error was because http.StatusNotModified was returned.
1672 func (c *ProjectsLocationsGenerateShiftsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1673 gensupport.SetOptions(c.urlParams_, opts...)
1674 res, err := c.doRequest("json")
1675 if res != nil && res.StatusCode == http.StatusNotModified {
1676 if res.Body != nil {
1677 res.Body.Close()
1678 }
1679 return nil, gensupport.WrapError(&googleapi.Error{
1680 Code: res.StatusCode,
1681 Header: res.Header,
1682 })
1683 }
1684 if err != nil {
1685 return nil, err
1686 }
1687 defer googleapi.CloseBody(res)
1688 if err := googleapi.CheckResponse(res); err != nil {
1689 return nil, gensupport.WrapError(err)
1690 }
1691 ret := &Operation{
1692 ServerResponse: googleapi.ServerResponse{
1693 Header: res.Header,
1694 HTTPStatusCode: res.StatusCode,
1695 },
1696 }
1697 target := &ret
1698 b, err := gensupport.DecodeResponseBytes(target, res)
1699 if err != nil {
1700 return nil, err
1701 }
1702 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.generateShifts", "response", internallog.HTTPResponse(res, b))
1703 return ret, nil
1704 }
1705
1706 type ProjectsLocationsGetCall struct {
1707 s *Service
1708 name string
1709 urlParams_ gensupport.URLParams
1710 ifNoneMatch_ string
1711 ctx_ context.Context
1712 header_ http.Header
1713 }
1714
1715 // Get: Gets information about a location.
1716 //
1717 // - name: Resource name for the location.
1718 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
1719 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1720 c.name = name
1721 return c
1722 }
1723
1724 // Fields allows partial responses to be retrieved. See
1725 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1726 // details.
1727 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
1728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1729 return c
1730 }
1731
1732 // IfNoneMatch sets an optional parameter which makes the operation fail if the
1733 // object's ETag matches the given value. This is useful for getting updates
1734 // only after the object has changed since the last request.
1735 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
1736 c.ifNoneMatch_ = entityTag
1737 return c
1738 }
1739
1740 // Context sets the context to be used in this call's Do method.
1741 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
1742 c.ctx_ = ctx
1743 return c
1744 }
1745
1746 // Header returns a http.Header that can be modified by the caller to add
1747 // headers to the request.
1748 func (c *ProjectsLocationsGetCall) Header() http.Header {
1749 if c.header_ == nil {
1750 c.header_ = make(http.Header)
1751 }
1752 return c.header_
1753 }
1754
1755 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
1756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1757 if c.ifNoneMatch_ != "" {
1758 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1759 }
1760 c.urlParams_.Set("alt", alt)
1761 c.urlParams_.Set("prettyPrint", "false")
1762 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
1763 urls += "?" + c.urlParams_.Encode()
1764 req, err := http.NewRequest("GET", urls, nil)
1765 if err != nil {
1766 return nil, err
1767 }
1768 req.Header = reqHeaders
1769 googleapi.Expand(req.URL, map[string]string{
1770 "name": c.name,
1771 })
1772 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
1773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1774 }
1775
1776 // Do executes the "contactcenteraiplatform.projects.locations.get" call.
1777 // Any non-2xx status code is an error. Response headers are in either
1778 // *Location.ServerResponse.Header or (if a response was returned at all) in
1779 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1780 // whether the returned error was because http.StatusNotModified was returned.
1781 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
1782 gensupport.SetOptions(c.urlParams_, opts...)
1783 res, err := c.doRequest("json")
1784 if res != nil && res.StatusCode == http.StatusNotModified {
1785 if res.Body != nil {
1786 res.Body.Close()
1787 }
1788 return nil, gensupport.WrapError(&googleapi.Error{
1789 Code: res.StatusCode,
1790 Header: res.Header,
1791 })
1792 }
1793 if err != nil {
1794 return nil, err
1795 }
1796 defer googleapi.CloseBody(res)
1797 if err := googleapi.CheckResponse(res); err != nil {
1798 return nil, gensupport.WrapError(err)
1799 }
1800 ret := &Location{
1801 ServerResponse: googleapi.ServerResponse{
1802 Header: res.Header,
1803 HTTPStatusCode: res.StatusCode,
1804 },
1805 }
1806 target := &ret
1807 b, err := gensupport.DecodeResponseBytes(target, res)
1808 if err != nil {
1809 return nil, err
1810 }
1811 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.get", "response", internallog.HTTPResponse(res, b))
1812 return ret, nil
1813 }
1814
1815 type ProjectsLocationsListCall struct {
1816 s *Service
1817 name string
1818 urlParams_ gensupport.URLParams
1819 ifNoneMatch_ string
1820 ctx_ context.Context
1821 header_ http.Header
1822 }
1823
1824 // List: Lists information about the supported locations for this service. This
1825 // method lists locations based on the resource scope provided in the
1826 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
1827 // empty, the method lists the public locations available to all projects. *
1828 // **Project-specific locations**: If `name` follows the format
1829 // `projects/{project}`, the method lists locations visible to that specific
1830 // project. This includes public, private, or other project-specific locations
1831 // enabled for the project. For gRPC and client library implementations, the
1832 // resource name is passed as the `name` field. For direct service calls, the
1833 // resource name is incorporated into the request path based on the specific
1834 // service implementation and version.
1835 //
1836 // - name: The resource that owns the locations collection, if applicable.
1837 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
1838 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1839 c.name = name
1840 return c
1841 }
1842
1843 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
1844 // use this field. It is unsupported and is ignored unless explicitly
1845 // documented otherwise. This is primarily for internal usage.
1846 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
1847 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
1848 return c
1849 }
1850
1851 // Filter sets the optional parameter "filter": A filter to narrow down results
1852 // to a preferred subset. The filtering language accepts strings like
1853 // "displayName=tokyo", and is documented in more detail in AIP-160
1854 // (https://google.aip.dev/160).
1855 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
1856 c.urlParams_.Set("filter", filter)
1857 return c
1858 }
1859
1860 // PageSize sets the optional parameter "pageSize": The maximum number of
1861 // results to return. If not set, the service selects a default.
1862 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
1863 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1864 return c
1865 }
1866
1867 // PageToken sets the optional parameter "pageToken": A page token received
1868 // from the `next_page_token` field in the response. Send that page token to
1869 // receive the subsequent page.
1870 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
1871 c.urlParams_.Set("pageToken", pageToken)
1872 return c
1873 }
1874
1875 // Fields allows partial responses to be retrieved. See
1876 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1877 // details.
1878 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
1879 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1880 return c
1881 }
1882
1883 // IfNoneMatch sets an optional parameter which makes the operation fail if the
1884 // object's ETag matches the given value. This is useful for getting updates
1885 // only after the object has changed since the last request.
1886 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
1887 c.ifNoneMatch_ = entityTag
1888 return c
1889 }
1890
1891 // Context sets the context to be used in this call's Do method.
1892 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
1893 c.ctx_ = ctx
1894 return c
1895 }
1896
1897 // Header returns a http.Header that can be modified by the caller to add
1898 // headers to the request.
1899 func (c *ProjectsLocationsListCall) Header() http.Header {
1900 if c.header_ == nil {
1901 c.header_ = make(http.Header)
1902 }
1903 return c.header_
1904 }
1905
1906 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
1907 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1908 if c.ifNoneMatch_ != "" {
1909 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1910 }
1911 c.urlParams_.Set("alt", alt)
1912 c.urlParams_.Set("prettyPrint", "false")
1913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations")
1914 urls += "?" + c.urlParams_.Encode()
1915 req, err := http.NewRequest("GET", urls, nil)
1916 if err != nil {
1917 return nil, err
1918 }
1919 req.Header = reqHeaders
1920 googleapi.Expand(req.URL, map[string]string{
1921 "name": c.name,
1922 })
1923 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
1924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1925 }
1926
1927 // Do executes the "contactcenteraiplatform.projects.locations.list" call.
1928 // Any non-2xx status code is an error. Response headers are in either
1929 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
1930 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1931 // check whether the returned error was because http.StatusNotModified was
1932 // returned.
1933 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
1934 gensupport.SetOptions(c.urlParams_, opts...)
1935 res, err := c.doRequest("json")
1936 if res != nil && res.StatusCode == http.StatusNotModified {
1937 if res.Body != nil {
1938 res.Body.Close()
1939 }
1940 return nil, gensupport.WrapError(&googleapi.Error{
1941 Code: res.StatusCode,
1942 Header: res.Header,
1943 })
1944 }
1945 if err != nil {
1946 return nil, err
1947 }
1948 defer googleapi.CloseBody(res)
1949 if err := googleapi.CheckResponse(res); err != nil {
1950 return nil, gensupport.WrapError(err)
1951 }
1952 ret := &ListLocationsResponse{
1953 ServerResponse: googleapi.ServerResponse{
1954 Header: res.Header,
1955 HTTPStatusCode: res.StatusCode,
1956 },
1957 }
1958 target := &ret
1959 b, err := gensupport.DecodeResponseBytes(target, res)
1960 if err != nil {
1961 return nil, err
1962 }
1963 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.list", "response", internallog.HTTPResponse(res, b))
1964 return ret, nil
1965 }
1966
1967 // Pages invokes f for each page of results.
1968 // A non-nil error returned from f will halt the iteration.
1969 // The provided context supersedes any context provided to the Context method.
1970 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
1971 c.ctx_ = ctx
1972 defer c.PageToken(c.urlParams_.Get("pageToken"))
1973 for {
1974 x, err := c.Do()
1975 if err != nil {
1976 return err
1977 }
1978 if err := f(x); err != nil {
1979 return err
1980 }
1981 if x.NextPageToken == "" {
1982 return nil
1983 }
1984 c.PageToken(x.NextPageToken)
1985 }
1986 }
1987
1988 type ProjectsLocationsQueryContactCenterQuotaCall struct {
1989 s *Service
1990 parent string
1991 urlParams_ gensupport.URLParams
1992 ifNoneMatch_ string
1993 ctx_ context.Context
1994 header_ http.Header
1995 }
1996
1997 // QueryContactCenterQuota: Queries the contact center quota, an aggregation
1998 // over all the projects, that belongs to the billing account, which the input
1999 // project belongs to.
2000 //
2001 // - parent: Parent project resource id.
2002 func (r *ProjectsLocationsService) QueryContactCenterQuota(parent string) *ProjectsLocationsQueryContactCenterQuotaCall {
2003 c := &ProjectsLocationsQueryContactCenterQuotaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2004 c.parent = parent
2005 return c
2006 }
2007
2008 // Fields allows partial responses to be retrieved. See
2009 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2010 // details.
2011 func (c *ProjectsLocationsQueryContactCenterQuotaCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueryContactCenterQuotaCall {
2012 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2013 return c
2014 }
2015
2016 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2017 // object's ETag matches the given value. This is useful for getting updates
2018 // only after the object has changed since the last request.
2019 func (c *ProjectsLocationsQueryContactCenterQuotaCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueryContactCenterQuotaCall {
2020 c.ifNoneMatch_ = entityTag
2021 return c
2022 }
2023
2024 // Context sets the context to be used in this call's Do method.
2025 func (c *ProjectsLocationsQueryContactCenterQuotaCall) Context(ctx context.Context) *ProjectsLocationsQueryContactCenterQuotaCall {
2026 c.ctx_ = ctx
2027 return c
2028 }
2029
2030 // Header returns a http.Header that can be modified by the caller to add
2031 // headers to the request.
2032 func (c *ProjectsLocationsQueryContactCenterQuotaCall) Header() http.Header {
2033 if c.header_ == nil {
2034 c.header_ = make(http.Header)
2035 }
2036 return c.header_
2037 }
2038
2039 func (c *ProjectsLocationsQueryContactCenterQuotaCall) doRequest(alt string) (*http.Response, error) {
2040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2041 if c.ifNoneMatch_ != "" {
2042 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2043 }
2044 c.urlParams_.Set("alt", alt)
2045 c.urlParams_.Set("prettyPrint", "false")
2046 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}:queryContactCenterQuota")
2047 urls += "?" + c.urlParams_.Encode()
2048 req, err := http.NewRequest("GET", urls, nil)
2049 if err != nil {
2050 return nil, err
2051 }
2052 req.Header = reqHeaders
2053 googleapi.Expand(req.URL, map[string]string{
2054 "parent": c.parent,
2055 })
2056 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.queryContactCenterQuota", "request", internallog.HTTPRequest(req, nil))
2057 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2058 }
2059
2060 // Do executes the "contactcenteraiplatform.projects.locations.queryContactCenterQuota" call.
2061 // Any non-2xx status code is an error. Response headers are in either
2062 // *ContactCenterQuota.ServerResponse.Header or (if a response was returned at
2063 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2064 // check whether the returned error was because http.StatusNotModified was
2065 // returned.
2066 func (c *ProjectsLocationsQueryContactCenterQuotaCall) Do(opts ...googleapi.CallOption) (*ContactCenterQuota, 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 := &ContactCenterQuota{
2086 ServerResponse: googleapi.ServerResponse{
2087 Header: res.Header,
2088 HTTPStatusCode: res.StatusCode,
2089 },
2090 }
2091 target := &ret
2092 b, err := gensupport.DecodeResponseBytes(target, res)
2093 if err != nil {
2094 return nil, err
2095 }
2096 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.queryContactCenterQuota", "response", internallog.HTTPResponse(res, b))
2097 return ret, nil
2098 }
2099
2100 type ProjectsLocationsContactCentersCreateCall struct {
2101 s *Service
2102 parent string
2103 contactcenter *ContactCenter
2104 urlParams_ gensupport.URLParams
2105 ctx_ context.Context
2106 header_ http.Header
2107 }
2108
2109 // Create: Creates a new ContactCenter in a given project and location.
2110 //
2111 // - parent: Value for parent.
2112 func (r *ProjectsLocationsContactCentersService) Create(parent string, contactcenter *ContactCenter) *ProjectsLocationsContactCentersCreateCall {
2113 c := &ProjectsLocationsContactCentersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2114 c.parent = parent
2115 c.contactcenter = contactcenter
2116 return c
2117 }
2118
2119 // ContactCenterId sets the optional parameter "contactCenterId": Required. Id
2120 // of the requesting object If auto-generating Id server-side, remove this
2121 // field and contact_center_id from the method_signature of Create RPC
2122 func (c *ProjectsLocationsContactCentersCreateCall) ContactCenterId(contactCenterId string) *ProjectsLocationsContactCentersCreateCall {
2123 c.urlParams_.Set("contactCenterId", contactCenterId)
2124 return c
2125 }
2126
2127 // RequestId sets the optional parameter "requestId": An optional request ID to
2128 // identify requests. Specify a unique request ID so that if you must retry
2129 // your request, the server will know to ignore the request if it has already
2130 // been completed. The server will guarantee that for at least 60 minutes since
2131 // the first request. For example, consider a situation where you make an
2132 // initial request and the request times out. If you make the request again
2133 // with the same request ID, the server can check if original operation with
2134 // the same request ID was received, and if so, will ignore the second request.
2135 // This prevents clients from accidentally creating duplicate commitments. The
2136 // request ID must be a valid UUID with the exception that zero UUID is not
2137 // supported (00000000-0000-0000-0000-000000000000).
2138 func (c *ProjectsLocationsContactCentersCreateCall) RequestId(requestId string) *ProjectsLocationsContactCentersCreateCall {
2139 c.urlParams_.Set("requestId", requestId)
2140 return c
2141 }
2142
2143 // Fields allows partial responses to be retrieved. See
2144 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2145 // details.
2146 func (c *ProjectsLocationsContactCentersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersCreateCall {
2147 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2148 return c
2149 }
2150
2151 // Context sets the context to be used in this call's Do method.
2152 func (c *ProjectsLocationsContactCentersCreateCall) Context(ctx context.Context) *ProjectsLocationsContactCentersCreateCall {
2153 c.ctx_ = ctx
2154 return c
2155 }
2156
2157 // Header returns a http.Header that can be modified by the caller to add
2158 // headers to the request.
2159 func (c *ProjectsLocationsContactCentersCreateCall) Header() http.Header {
2160 if c.header_ == nil {
2161 c.header_ = make(http.Header)
2162 }
2163 return c.header_
2164 }
2165
2166 func (c *ProjectsLocationsContactCentersCreateCall) doRequest(alt string) (*http.Response, error) {
2167 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2168 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.contactcenter)
2169 if err != nil {
2170 return nil, err
2171 }
2172 c.urlParams_.Set("alt", alt)
2173 c.urlParams_.Set("prettyPrint", "false")
2174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/contactCenters")
2175 urls += "?" + c.urlParams_.Encode()
2176 req, err := http.NewRequest("POST", urls, body)
2177 if err != nil {
2178 return nil, err
2179 }
2180 req.Header = reqHeaders
2181 googleapi.Expand(req.URL, map[string]string{
2182 "parent": c.parent,
2183 })
2184 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.create", "request", internallog.HTTPRequest(req, body.Bytes()))
2185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2186 }
2187
2188 // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.create" call.
2189 // Any non-2xx status code is an error. Response headers are in either
2190 // *Operation.ServerResponse.Header or (if a response was returned at all) in
2191 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2192 // whether the returned error was because http.StatusNotModified was returned.
2193 func (c *ProjectsLocationsContactCentersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2194 gensupport.SetOptions(c.urlParams_, opts...)
2195 res, err := c.doRequest("json")
2196 if res != nil && res.StatusCode == http.StatusNotModified {
2197 if res.Body != nil {
2198 res.Body.Close()
2199 }
2200 return nil, gensupport.WrapError(&googleapi.Error{
2201 Code: res.StatusCode,
2202 Header: res.Header,
2203 })
2204 }
2205 if err != nil {
2206 return nil, err
2207 }
2208 defer googleapi.CloseBody(res)
2209 if err := googleapi.CheckResponse(res); err != nil {
2210 return nil, gensupport.WrapError(err)
2211 }
2212 ret := &Operation{
2213 ServerResponse: googleapi.ServerResponse{
2214 Header: res.Header,
2215 HTTPStatusCode: res.StatusCode,
2216 },
2217 }
2218 target := &ret
2219 b, err := gensupport.DecodeResponseBytes(target, res)
2220 if err != nil {
2221 return nil, err
2222 }
2223 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.create", "response", internallog.HTTPResponse(res, b))
2224 return ret, nil
2225 }
2226
2227 type ProjectsLocationsContactCentersDeleteCall struct {
2228 s *Service
2229 name string
2230 urlParams_ gensupport.URLParams
2231 ctx_ context.Context
2232 header_ http.Header
2233 }
2234
2235 // Delete: Deletes a single ContactCenter.
2236 //
2237 // - name: Name of the resource.
2238 func (r *ProjectsLocationsContactCentersService) Delete(name string) *ProjectsLocationsContactCentersDeleteCall {
2239 c := &ProjectsLocationsContactCentersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2240 c.name = name
2241 return c
2242 }
2243
2244 // RequestId sets the optional parameter "requestId": An optional request ID to
2245 // identify requests. Specify a unique request ID so that if you must retry
2246 // your request, the server will know to ignore the request if it has already
2247 // been completed. The server will guarantee that for at least 60 minutes after
2248 // the first request. For example, consider a situation where you make an
2249 // initial request and the request times out. If you make the request again
2250 // with the same request ID, the server can check if original operation with
2251 // the same request ID was received, and if so, will ignore the second request.
2252 // This prevents clients from accidentally creating duplicate commitments. The
2253 // request ID must be a valid UUID with the exception that zero UUID is not
2254 // supported (00000000-0000-0000-0000-000000000000).
2255 func (c *ProjectsLocationsContactCentersDeleteCall) RequestId(requestId string) *ProjectsLocationsContactCentersDeleteCall {
2256 c.urlParams_.Set("requestId", requestId)
2257 return c
2258 }
2259
2260 // Fields allows partial responses to be retrieved. See
2261 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2262 // details.
2263 func (c *ProjectsLocationsContactCentersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersDeleteCall {
2264 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2265 return c
2266 }
2267
2268 // Context sets the context to be used in this call's Do method.
2269 func (c *ProjectsLocationsContactCentersDeleteCall) Context(ctx context.Context) *ProjectsLocationsContactCentersDeleteCall {
2270 c.ctx_ = ctx
2271 return c
2272 }
2273
2274 // Header returns a http.Header that can be modified by the caller to add
2275 // headers to the request.
2276 func (c *ProjectsLocationsContactCentersDeleteCall) Header() http.Header {
2277 if c.header_ == nil {
2278 c.header_ = make(http.Header)
2279 }
2280 return c.header_
2281 }
2282
2283 func (c *ProjectsLocationsContactCentersDeleteCall) doRequest(alt string) (*http.Response, error) {
2284 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2285 c.urlParams_.Set("alt", alt)
2286 c.urlParams_.Set("prettyPrint", "false")
2287 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2288 urls += "?" + c.urlParams_.Encode()
2289 req, err := http.NewRequest("DELETE", urls, nil)
2290 if err != nil {
2291 return nil, err
2292 }
2293 req.Header = reqHeaders
2294 googleapi.Expand(req.URL, map[string]string{
2295 "name": c.name,
2296 })
2297 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.delete", "request", internallog.HTTPRequest(req, nil))
2298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2299 }
2300
2301 // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.delete" call.
2302 // Any non-2xx status code is an error. Response headers are in either
2303 // *Operation.ServerResponse.Header or (if a response was returned at all) in
2304 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2305 // whether the returned error was because http.StatusNotModified was returned.
2306 func (c *ProjectsLocationsContactCentersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2307 gensupport.SetOptions(c.urlParams_, opts...)
2308 res, err := c.doRequest("json")
2309 if res != nil && res.StatusCode == http.StatusNotModified {
2310 if res.Body != nil {
2311 res.Body.Close()
2312 }
2313 return nil, gensupport.WrapError(&googleapi.Error{
2314 Code: res.StatusCode,
2315 Header: res.Header,
2316 })
2317 }
2318 if err != nil {
2319 return nil, err
2320 }
2321 defer googleapi.CloseBody(res)
2322 if err := googleapi.CheckResponse(res); err != nil {
2323 return nil, gensupport.WrapError(err)
2324 }
2325 ret := &Operation{
2326 ServerResponse: googleapi.ServerResponse{
2327 Header: res.Header,
2328 HTTPStatusCode: res.StatusCode,
2329 },
2330 }
2331 target := &ret
2332 b, err := gensupport.DecodeResponseBytes(target, res)
2333 if err != nil {
2334 return nil, err
2335 }
2336 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.delete", "response", internallog.HTTPResponse(res, b))
2337 return ret, nil
2338 }
2339
2340 type ProjectsLocationsContactCentersGetCall struct {
2341 s *Service
2342 name string
2343 urlParams_ gensupport.URLParams
2344 ifNoneMatch_ string
2345 ctx_ context.Context
2346 header_ http.Header
2347 }
2348
2349 // Get: Gets details of a single ContactCenter.
2350 //
2351 // - name: Name of the resource.
2352 func (r *ProjectsLocationsContactCentersService) Get(name string) *ProjectsLocationsContactCentersGetCall {
2353 c := &ProjectsLocationsContactCentersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2354 c.name = name
2355 return c
2356 }
2357
2358 // Fields allows partial responses to be retrieved. See
2359 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2360 // details.
2361 func (c *ProjectsLocationsContactCentersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersGetCall {
2362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2363 return c
2364 }
2365
2366 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2367 // object's ETag matches the given value. This is useful for getting updates
2368 // only after the object has changed since the last request.
2369 func (c *ProjectsLocationsContactCentersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsContactCentersGetCall {
2370 c.ifNoneMatch_ = entityTag
2371 return c
2372 }
2373
2374 // Context sets the context to be used in this call's Do method.
2375 func (c *ProjectsLocationsContactCentersGetCall) Context(ctx context.Context) *ProjectsLocationsContactCentersGetCall {
2376 c.ctx_ = ctx
2377 return c
2378 }
2379
2380 // Header returns a http.Header that can be modified by the caller to add
2381 // headers to the request.
2382 func (c *ProjectsLocationsContactCentersGetCall) Header() http.Header {
2383 if c.header_ == nil {
2384 c.header_ = make(http.Header)
2385 }
2386 return c.header_
2387 }
2388
2389 func (c *ProjectsLocationsContactCentersGetCall) doRequest(alt string) (*http.Response, error) {
2390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2391 if c.ifNoneMatch_ != "" {
2392 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2393 }
2394 c.urlParams_.Set("alt", alt)
2395 c.urlParams_.Set("prettyPrint", "false")
2396 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2397 urls += "?" + c.urlParams_.Encode()
2398 req, err := http.NewRequest("GET", urls, nil)
2399 if err != nil {
2400 return nil, err
2401 }
2402 req.Header = reqHeaders
2403 googleapi.Expand(req.URL, map[string]string{
2404 "name": c.name,
2405 })
2406 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.get", "request", internallog.HTTPRequest(req, nil))
2407 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2408 }
2409
2410 // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.get" call.
2411 // Any non-2xx status code is an error. Response headers are in either
2412 // *ContactCenter.ServerResponse.Header or (if a response was returned at all)
2413 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2414 // whether the returned error was because http.StatusNotModified was returned.
2415 func (c *ProjectsLocationsContactCentersGetCall) Do(opts ...googleapi.CallOption) (*ContactCenter, error) {
2416 gensupport.SetOptions(c.urlParams_, opts...)
2417 res, err := c.doRequest("json")
2418 if res != nil && res.StatusCode == http.StatusNotModified {
2419 if res.Body != nil {
2420 res.Body.Close()
2421 }
2422 return nil, gensupport.WrapError(&googleapi.Error{
2423 Code: res.StatusCode,
2424 Header: res.Header,
2425 })
2426 }
2427 if err != nil {
2428 return nil, err
2429 }
2430 defer googleapi.CloseBody(res)
2431 if err := googleapi.CheckResponse(res); err != nil {
2432 return nil, gensupport.WrapError(err)
2433 }
2434 ret := &ContactCenter{
2435 ServerResponse: googleapi.ServerResponse{
2436 Header: res.Header,
2437 HTTPStatusCode: res.StatusCode,
2438 },
2439 }
2440 target := &ret
2441 b, err := gensupport.DecodeResponseBytes(target, res)
2442 if err != nil {
2443 return nil, err
2444 }
2445 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.get", "response", internallog.HTTPResponse(res, b))
2446 return ret, nil
2447 }
2448
2449 type ProjectsLocationsContactCentersListCall struct {
2450 s *Service
2451 parent string
2452 urlParams_ gensupport.URLParams
2453 ifNoneMatch_ string
2454 ctx_ context.Context
2455 header_ http.Header
2456 }
2457
2458 // List: Lists ContactCenters in a given project and location.
2459 //
2460 // - parent: Parent value for ListContactCentersRequest.
2461 func (r *ProjectsLocationsContactCentersService) List(parent string) *ProjectsLocationsContactCentersListCall {
2462 c := &ProjectsLocationsContactCentersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2463 c.parent = parent
2464 return c
2465 }
2466
2467 // Filter sets the optional parameter "filter": Filtering results
2468 func (c *ProjectsLocationsContactCentersListCall) Filter(filter string) *ProjectsLocationsContactCentersListCall {
2469 c.urlParams_.Set("filter", filter)
2470 return c
2471 }
2472
2473 // OrderBy sets the optional parameter "orderBy": Hint for how to order the
2474 // results
2475 func (c *ProjectsLocationsContactCentersListCall) OrderBy(orderBy string) *ProjectsLocationsContactCentersListCall {
2476 c.urlParams_.Set("orderBy", orderBy)
2477 return c
2478 }
2479
2480 // PageSize sets the optional parameter "pageSize": Requested page size. Server
2481 // may return fewer items than requested. If unspecified, server will pick an
2482 // appropriate default.
2483 func (c *ProjectsLocationsContactCentersListCall) PageSize(pageSize int64) *ProjectsLocationsContactCentersListCall {
2484 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2485 return c
2486 }
2487
2488 // PageToken sets the optional parameter "pageToken": A token identifying a
2489 // page of results the server should return.
2490 func (c *ProjectsLocationsContactCentersListCall) PageToken(pageToken string) *ProjectsLocationsContactCentersListCall {
2491 c.urlParams_.Set("pageToken", pageToken)
2492 return c
2493 }
2494
2495 // Fields allows partial responses to be retrieved. See
2496 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2497 // details.
2498 func (c *ProjectsLocationsContactCentersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersListCall {
2499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2500 return c
2501 }
2502
2503 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2504 // object's ETag matches the given value. This is useful for getting updates
2505 // only after the object has changed since the last request.
2506 func (c *ProjectsLocationsContactCentersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsContactCentersListCall {
2507 c.ifNoneMatch_ = entityTag
2508 return c
2509 }
2510
2511 // Context sets the context to be used in this call's Do method.
2512 func (c *ProjectsLocationsContactCentersListCall) Context(ctx context.Context) *ProjectsLocationsContactCentersListCall {
2513 c.ctx_ = ctx
2514 return c
2515 }
2516
2517 // Header returns a http.Header that can be modified by the caller to add
2518 // headers to the request.
2519 func (c *ProjectsLocationsContactCentersListCall) Header() http.Header {
2520 if c.header_ == nil {
2521 c.header_ = make(http.Header)
2522 }
2523 return c.header_
2524 }
2525
2526 func (c *ProjectsLocationsContactCentersListCall) doRequest(alt string) (*http.Response, error) {
2527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2528 if c.ifNoneMatch_ != "" {
2529 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2530 }
2531 c.urlParams_.Set("alt", alt)
2532 c.urlParams_.Set("prettyPrint", "false")
2533 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/contactCenters")
2534 urls += "?" + c.urlParams_.Encode()
2535 req, err := http.NewRequest("GET", urls, nil)
2536 if err != nil {
2537 return nil, err
2538 }
2539 req.Header = reqHeaders
2540 googleapi.Expand(req.URL, map[string]string{
2541 "parent": c.parent,
2542 })
2543 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.list", "request", internallog.HTTPRequest(req, nil))
2544 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2545 }
2546
2547 // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.list" call.
2548 // Any non-2xx status code is an error. Response headers are in either
2549 // *ListContactCentersResponse.ServerResponse.Header or (if a response was
2550 // returned at all) in error.(*googleapi.Error).Header. Use
2551 // googleapi.IsNotModified to check whether the returned error was because
2552 // http.StatusNotModified was returned.
2553 func (c *ProjectsLocationsContactCentersListCall) Do(opts ...googleapi.CallOption) (*ListContactCentersResponse, error) {
2554 gensupport.SetOptions(c.urlParams_, opts...)
2555 res, err := c.doRequest("json")
2556 if res != nil && res.StatusCode == http.StatusNotModified {
2557 if res.Body != nil {
2558 res.Body.Close()
2559 }
2560 return nil, gensupport.WrapError(&googleapi.Error{
2561 Code: res.StatusCode,
2562 Header: res.Header,
2563 })
2564 }
2565 if err != nil {
2566 return nil, err
2567 }
2568 defer googleapi.CloseBody(res)
2569 if err := googleapi.CheckResponse(res); err != nil {
2570 return nil, gensupport.WrapError(err)
2571 }
2572 ret := &ListContactCentersResponse{
2573 ServerResponse: googleapi.ServerResponse{
2574 Header: res.Header,
2575 HTTPStatusCode: res.StatusCode,
2576 },
2577 }
2578 target := &ret
2579 b, err := gensupport.DecodeResponseBytes(target, res)
2580 if err != nil {
2581 return nil, err
2582 }
2583 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.list", "response", internallog.HTTPResponse(res, b))
2584 return ret, nil
2585 }
2586
2587 // Pages invokes f for each page of results.
2588 // A non-nil error returned from f will halt the iteration.
2589 // The provided context supersedes any context provided to the Context method.
2590 func (c *ProjectsLocationsContactCentersListCall) Pages(ctx context.Context, f func(*ListContactCentersResponse) error) error {
2591 c.ctx_ = ctx
2592 defer c.PageToken(c.urlParams_.Get("pageToken"))
2593 for {
2594 x, err := c.Do()
2595 if err != nil {
2596 return err
2597 }
2598 if err := f(x); err != nil {
2599 return err
2600 }
2601 if x.NextPageToken == "" {
2602 return nil
2603 }
2604 c.PageToken(x.NextPageToken)
2605 }
2606 }
2607
2608 type ProjectsLocationsContactCentersPatchCall struct {
2609 s *Service
2610 name string
2611 contactcenter *ContactCenter
2612 urlParams_ gensupport.URLParams
2613 ctx_ context.Context
2614 header_ http.Header
2615 }
2616
2617 // Patch: Updates the parameters of a single ContactCenter.
2618 //
2619 // - name: name of resource.
2620 func (r *ProjectsLocationsContactCentersService) Patch(name string, contactcenter *ContactCenter) *ProjectsLocationsContactCentersPatchCall {
2621 c := &ProjectsLocationsContactCentersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2622 c.name = name
2623 c.contactcenter = contactcenter
2624 return c
2625 }
2626
2627 // RequestId sets the optional parameter "requestId": An optional request ID to
2628 // identify requests. Specify a unique request ID so that if you must retry
2629 // your request, the server will know to ignore the request if it has already
2630 // been completed. The server will guarantee that for at least 60 minutes since
2631 // the first request. For example, consider a situation where you make an
2632 // initial request and the request times out. If you make the request again
2633 // with the same request ID, the server can check if original operation with
2634 // the same request ID was received, and if so, will ignore the second request.
2635 // This prevents clients from accidentally creating duplicate commitments. The
2636 // request ID must be a valid UUID with the exception that zero UUID is not
2637 // supported (00000000-0000-0000-0000-000000000000).
2638 func (c *ProjectsLocationsContactCentersPatchCall) RequestId(requestId string) *ProjectsLocationsContactCentersPatchCall {
2639 c.urlParams_.Set("requestId", requestId)
2640 return c
2641 }
2642
2643 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
2644 // used to specify the fields to be overwritten in the ContactCenter resource
2645 // by the update. The fields specified in the update_mask are relative to the
2646 // resource, not the full request. A field will be overwritten if it is in the
2647 // mask. If the user does not provide a mask then all fields will be
2648 // overwritten.
2649 func (c *ProjectsLocationsContactCentersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsContactCentersPatchCall {
2650 c.urlParams_.Set("updateMask", updateMask)
2651 return c
2652 }
2653
2654 // Fields allows partial responses to be retrieved. See
2655 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2656 // details.
2657 func (c *ProjectsLocationsContactCentersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersPatchCall {
2658 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2659 return c
2660 }
2661
2662 // Context sets the context to be used in this call's Do method.
2663 func (c *ProjectsLocationsContactCentersPatchCall) Context(ctx context.Context) *ProjectsLocationsContactCentersPatchCall {
2664 c.ctx_ = ctx
2665 return c
2666 }
2667
2668 // Header returns a http.Header that can be modified by the caller to add
2669 // headers to the request.
2670 func (c *ProjectsLocationsContactCentersPatchCall) Header() http.Header {
2671 if c.header_ == nil {
2672 c.header_ = make(http.Header)
2673 }
2674 return c.header_
2675 }
2676
2677 func (c *ProjectsLocationsContactCentersPatchCall) doRequest(alt string) (*http.Response, error) {
2678 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2679 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.contactcenter)
2680 if err != nil {
2681 return nil, err
2682 }
2683 c.urlParams_.Set("alt", alt)
2684 c.urlParams_.Set("prettyPrint", "false")
2685 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2686 urls += "?" + c.urlParams_.Encode()
2687 req, err := http.NewRequest("PATCH", urls, body)
2688 if err != nil {
2689 return nil, err
2690 }
2691 req.Header = reqHeaders
2692 googleapi.Expand(req.URL, map[string]string{
2693 "name": c.name,
2694 })
2695 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
2696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2697 }
2698
2699 // Do executes the "contactcenteraiplatform.projects.locations.contactCenters.patch" call.
2700 // Any non-2xx status code is an error. Response headers are in either
2701 // *Operation.ServerResponse.Header or (if a response was returned at all) in
2702 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2703 // whether the returned error was because http.StatusNotModified was returned.
2704 func (c *ProjectsLocationsContactCentersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2705 gensupport.SetOptions(c.urlParams_, opts...)
2706 res, err := c.doRequest("json")
2707 if res != nil && res.StatusCode == http.StatusNotModified {
2708 if res.Body != nil {
2709 res.Body.Close()
2710 }
2711 return nil, gensupport.WrapError(&googleapi.Error{
2712 Code: res.StatusCode,
2713 Header: res.Header,
2714 })
2715 }
2716 if err != nil {
2717 return nil, err
2718 }
2719 defer googleapi.CloseBody(res)
2720 if err := googleapi.CheckResponse(res); err != nil {
2721 return nil, gensupport.WrapError(err)
2722 }
2723 ret := &Operation{
2724 ServerResponse: googleapi.ServerResponse{
2725 Header: res.Header,
2726 HTTPStatusCode: res.StatusCode,
2727 },
2728 }
2729 target := &ret
2730 b, err := gensupport.DecodeResponseBytes(target, res)
2731 if err != nil {
2732 return nil, err
2733 }
2734 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.contactCenters.patch", "response", internallog.HTTPResponse(res, b))
2735 return ret, nil
2736 }
2737
2738 type ProjectsLocationsOperationsCancelCall struct {
2739 s *Service
2740 name string
2741 canceloperationrequest *CancelOperationRequest
2742 urlParams_ gensupport.URLParams
2743 ctx_ context.Context
2744 header_ http.Header
2745 }
2746
2747 // Cancel: Starts asynchronous cancellation on a long-running operation. The
2748 // server makes a best effort to cancel the operation, but success is not
2749 // guaranteed. If the server doesn't support this method, it returns
2750 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
2751 // other methods to check whether the cancellation succeeded or whether the
2752 // operation completed despite cancellation. On successful cancellation, the
2753 // operation is not deleted; instead, it becomes an operation with an
2754 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
2755 // `Code.CANCELLED`.
2756 //
2757 // - name: The name of the operation resource to be cancelled.
2758 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
2759 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2760 c.name = name
2761 c.canceloperationrequest = canceloperationrequest
2762 return c
2763 }
2764
2765 // Fields allows partial responses to be retrieved. See
2766 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2767 // details.
2768 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
2769 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2770 return c
2771 }
2772
2773 // Context sets the context to be used in this call's Do method.
2774 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
2775 c.ctx_ = ctx
2776 return c
2777 }
2778
2779 // Header returns a http.Header that can be modified by the caller to add
2780 // headers to the request.
2781 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
2782 if c.header_ == nil {
2783 c.header_ = make(http.Header)
2784 }
2785 return c.header_
2786 }
2787
2788 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
2789 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2790 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
2791 if err != nil {
2792 return nil, err
2793 }
2794 c.urlParams_.Set("alt", alt)
2795 c.urlParams_.Set("prettyPrint", "false")
2796 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
2797 urls += "?" + c.urlParams_.Encode()
2798 req, err := http.NewRequest("POST", urls, body)
2799 if err != nil {
2800 return nil, err
2801 }
2802 req.Header = reqHeaders
2803 googleapi.Expand(req.URL, map[string]string{
2804 "name": c.name,
2805 })
2806 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
2807 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2808 }
2809
2810 // Do executes the "contactcenteraiplatform.projects.locations.operations.cancel" call.
2811 // Any non-2xx status code is an error. Response headers are in either
2812 // *Empty.ServerResponse.Header or (if a response was returned at all) in
2813 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2814 // whether the returned error was because http.StatusNotModified was returned.
2815 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2816 gensupport.SetOptions(c.urlParams_, opts...)
2817 res, err := c.doRequest("json")
2818 if res != nil && res.StatusCode == http.StatusNotModified {
2819 if res.Body != nil {
2820 res.Body.Close()
2821 }
2822 return nil, gensupport.WrapError(&googleapi.Error{
2823 Code: res.StatusCode,
2824 Header: res.Header,
2825 })
2826 }
2827 if err != nil {
2828 return nil, err
2829 }
2830 defer googleapi.CloseBody(res)
2831 if err := googleapi.CheckResponse(res); err != nil {
2832 return nil, gensupport.WrapError(err)
2833 }
2834 ret := &Empty{
2835 ServerResponse: googleapi.ServerResponse{
2836 Header: res.Header,
2837 HTTPStatusCode: res.StatusCode,
2838 },
2839 }
2840 target := &ret
2841 b, err := gensupport.DecodeResponseBytes(target, res)
2842 if err != nil {
2843 return nil, err
2844 }
2845 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
2846 return ret, nil
2847 }
2848
2849 type ProjectsLocationsOperationsDeleteCall struct {
2850 s *Service
2851 name string
2852 urlParams_ gensupport.URLParams
2853 ctx_ context.Context
2854 header_ http.Header
2855 }
2856
2857 // Delete: Deletes a long-running operation. This method indicates that the
2858 // client is no longer interested in the operation result. It does not cancel
2859 // the operation. If the server doesn't support this method, it returns
2860 // `google.rpc.Code.UNIMPLEMENTED`.
2861 //
2862 // - name: The name of the operation resource to be deleted.
2863 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
2864 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2865 c.name = name
2866 return c
2867 }
2868
2869 // Fields allows partial responses to be retrieved. See
2870 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2871 // details.
2872 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
2873 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2874 return c
2875 }
2876
2877 // Context sets the context to be used in this call's Do method.
2878 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
2879 c.ctx_ = ctx
2880 return c
2881 }
2882
2883 // Header returns a http.Header that can be modified by the caller to add
2884 // headers to the request.
2885 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
2886 if c.header_ == nil {
2887 c.header_ = make(http.Header)
2888 }
2889 return c.header_
2890 }
2891
2892 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2894 c.urlParams_.Set("alt", alt)
2895 c.urlParams_.Set("prettyPrint", "false")
2896 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2897 urls += "?" + c.urlParams_.Encode()
2898 req, err := http.NewRequest("DELETE", urls, nil)
2899 if err != nil {
2900 return nil, err
2901 }
2902 req.Header = reqHeaders
2903 googleapi.Expand(req.URL, map[string]string{
2904 "name": c.name,
2905 })
2906 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
2907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2908 }
2909
2910 // Do executes the "contactcenteraiplatform.projects.locations.operations.delete" call.
2911 // Any non-2xx status code is an error. Response headers are in either
2912 // *Empty.ServerResponse.Header or (if a response was returned at all) in
2913 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2914 // whether the returned error was because http.StatusNotModified was returned.
2915 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2916 gensupport.SetOptions(c.urlParams_, opts...)
2917 res, err := c.doRequest("json")
2918 if res != nil && res.StatusCode == http.StatusNotModified {
2919 if res.Body != nil {
2920 res.Body.Close()
2921 }
2922 return nil, gensupport.WrapError(&googleapi.Error{
2923 Code: res.StatusCode,
2924 Header: res.Header,
2925 })
2926 }
2927 if err != nil {
2928 return nil, err
2929 }
2930 defer googleapi.CloseBody(res)
2931 if err := googleapi.CheckResponse(res); err != nil {
2932 return nil, gensupport.WrapError(err)
2933 }
2934 ret := &Empty{
2935 ServerResponse: googleapi.ServerResponse{
2936 Header: res.Header,
2937 HTTPStatusCode: res.StatusCode,
2938 },
2939 }
2940 target := &ret
2941 b, err := gensupport.DecodeResponseBytes(target, res)
2942 if err != nil {
2943 return nil, err
2944 }
2945 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
2946 return ret, nil
2947 }
2948
2949 type ProjectsLocationsOperationsGetCall struct {
2950 s *Service
2951 name string
2952 urlParams_ gensupport.URLParams
2953 ifNoneMatch_ string
2954 ctx_ context.Context
2955 header_ http.Header
2956 }
2957
2958 // Get: Gets the latest state of a long-running operation. Clients can use this
2959 // method to poll the operation result at intervals as recommended by the API
2960 // service.
2961 //
2962 // - name: The name of the operation resource.
2963 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
2964 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2965 c.name = name
2966 return c
2967 }
2968
2969 // Fields allows partial responses to be retrieved. See
2970 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2971 // details.
2972 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
2973 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2974 return c
2975 }
2976
2977 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2978 // object's ETag matches the given value. This is useful for getting updates
2979 // only after the object has changed since the last request.
2980 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
2981 c.ifNoneMatch_ = entityTag
2982 return c
2983 }
2984
2985 // Context sets the context to be used in this call's Do method.
2986 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
2987 c.ctx_ = ctx
2988 return c
2989 }
2990
2991 // Header returns a http.Header that can be modified by the caller to add
2992 // headers to the request.
2993 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
2994 if c.header_ == nil {
2995 c.header_ = make(http.Header)
2996 }
2997 return c.header_
2998 }
2999
3000 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3001 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3002 if c.ifNoneMatch_ != "" {
3003 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3004 }
3005 c.urlParams_.Set("alt", alt)
3006 c.urlParams_.Set("prettyPrint", "false")
3007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3008 urls += "?" + c.urlParams_.Encode()
3009 req, err := http.NewRequest("GET", urls, nil)
3010 if err != nil {
3011 return nil, err
3012 }
3013 req.Header = reqHeaders
3014 googleapi.Expand(req.URL, map[string]string{
3015 "name": c.name,
3016 })
3017 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
3018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3019 }
3020
3021 // Do executes the "contactcenteraiplatform.projects.locations.operations.get" call.
3022 // Any non-2xx status code is an error. Response headers are in either
3023 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3024 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3025 // whether the returned error was because http.StatusNotModified was returned.
3026 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3027 gensupport.SetOptions(c.urlParams_, opts...)
3028 res, err := c.doRequest("json")
3029 if res != nil && res.StatusCode == http.StatusNotModified {
3030 if res.Body != nil {
3031 res.Body.Close()
3032 }
3033 return nil, gensupport.WrapError(&googleapi.Error{
3034 Code: res.StatusCode,
3035 Header: res.Header,
3036 })
3037 }
3038 if err != nil {
3039 return nil, err
3040 }
3041 defer googleapi.CloseBody(res)
3042 if err := googleapi.CheckResponse(res); err != nil {
3043 return nil, gensupport.WrapError(err)
3044 }
3045 ret := &Operation{
3046 ServerResponse: googleapi.ServerResponse{
3047 Header: res.Header,
3048 HTTPStatusCode: res.StatusCode,
3049 },
3050 }
3051 target := &ret
3052 b, err := gensupport.DecodeResponseBytes(target, res)
3053 if err != nil {
3054 return nil, err
3055 }
3056 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
3057 return ret, nil
3058 }
3059
3060 type ProjectsLocationsOperationsListCall struct {
3061 s *Service
3062 name string
3063 urlParams_ gensupport.URLParams
3064 ifNoneMatch_ string
3065 ctx_ context.Context
3066 header_ http.Header
3067 }
3068
3069 // List: Lists operations that match the specified filter in the request. If
3070 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
3071 //
3072 // - name: The name of the operation's parent resource.
3073 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
3074 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3075 c.name = name
3076 return c
3077 }
3078
3079 // Filter sets the optional parameter "filter": The standard list filter.
3080 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
3081 c.urlParams_.Set("filter", filter)
3082 return c
3083 }
3084
3085 // PageSize sets the optional parameter "pageSize": The standard list page
3086 // size.
3087 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
3088 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3089 return c
3090 }
3091
3092 // PageToken sets the optional parameter "pageToken": The standard list page
3093 // token.
3094 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
3095 c.urlParams_.Set("pageToken", pageToken)
3096 return c
3097 }
3098
3099 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
3100 // When set to `true`, operations that are reachable are returned as normal,
3101 // and those that are unreachable are returned in the
3102 // ListOperationsResponse.unreachable field. This can only be `true` when
3103 // reading across collections. For example, when `parent` is set to
3104 // "projects/example/locations/-". This field is not supported by default and
3105 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
3106 // otherwise in service or product specific documentation.
3107 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
3108 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
3109 return c
3110 }
3111
3112 // Fields allows partial responses to be retrieved. See
3113 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3114 // details.
3115 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
3116 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3117 return c
3118 }
3119
3120 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3121 // object's ETag matches the given value. This is useful for getting updates
3122 // only after the object has changed since the last request.
3123 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
3124 c.ifNoneMatch_ = entityTag
3125 return c
3126 }
3127
3128 // Context sets the context to be used in this call's Do method.
3129 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
3130 c.ctx_ = ctx
3131 return c
3132 }
3133
3134 // Header returns a http.Header that can be modified by the caller to add
3135 // headers to the request.
3136 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
3137 if c.header_ == nil {
3138 c.header_ = make(http.Header)
3139 }
3140 return c.header_
3141 }
3142
3143 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
3144 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3145 if c.ifNoneMatch_ != "" {
3146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3147 }
3148 c.urlParams_.Set("alt", alt)
3149 c.urlParams_.Set("prettyPrint", "false")
3150 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations")
3151 urls += "?" + c.urlParams_.Encode()
3152 req, err := http.NewRequest("GET", urls, nil)
3153 if err != nil {
3154 return nil, err
3155 }
3156 req.Header = reqHeaders
3157 googleapi.Expand(req.URL, map[string]string{
3158 "name": c.name,
3159 })
3160 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
3161 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3162 }
3163
3164 // Do executes the "contactcenteraiplatform.projects.locations.operations.list" call.
3165 // Any non-2xx status code is an error. Response headers are in either
3166 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
3167 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3168 // check whether the returned error was because http.StatusNotModified was
3169 // returned.
3170 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
3171 gensupport.SetOptions(c.urlParams_, opts...)
3172 res, err := c.doRequest("json")
3173 if res != nil && res.StatusCode == http.StatusNotModified {
3174 if res.Body != nil {
3175 res.Body.Close()
3176 }
3177 return nil, gensupport.WrapError(&googleapi.Error{
3178 Code: res.StatusCode,
3179 Header: res.Header,
3180 })
3181 }
3182 if err != nil {
3183 return nil, err
3184 }
3185 defer googleapi.CloseBody(res)
3186 if err := googleapi.CheckResponse(res); err != nil {
3187 return nil, gensupport.WrapError(err)
3188 }
3189 ret := &ListOperationsResponse{
3190 ServerResponse: googleapi.ServerResponse{
3191 Header: res.Header,
3192 HTTPStatusCode: res.StatusCode,
3193 },
3194 }
3195 target := &ret
3196 b, err := gensupport.DecodeResponseBytes(target, res)
3197 if err != nil {
3198 return nil, err
3199 }
3200 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "contactcenteraiplatform.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
3201 return ret, nil
3202 }
3203
3204 // Pages invokes f for each page of results.
3205 // A non-nil error returned from f will halt the iteration.
3206 // The provided context supersedes any context provided to the Context method.
3207 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3208 c.ctx_ = ctx
3209 defer c.PageToken(c.urlParams_.Get("pageToken"))
3210 for {
3211 x, err := c.Do()
3212 if err != nil {
3213 return err
3214 }
3215 if err := f(x); err != nil {
3216 return err
3217 }
3218 if x.NextPageToken == "" {
3219 return nil
3220 }
3221 c.PageToken(x.NextPageToken)
3222 }
3223 }