1// Copyright 2021 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 policysimulator provides access to the Policy Simulator API.
8//
9// For product documentation, see: https://cloud.google.com/iam/docs/simulating-access
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/policysimulator/v1beta1"
16//   ...
17//   ctx := context.Background()
18//   policysimulatorService, err := policysimulator.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package policysimulator // import "google.golang.org/api/policysimulator/v1beta1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "policysimulator:v1beta1"
75const apiName = "policysimulator"
76const apiVersion = "v1beta1"
77const basePath = "https://policysimulator.googleapis.com/"
78const mtlsBasePath = "https://policysimulator.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud data and see the
83	// email address for your Google Account.
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
96	client, endpoint, err := htransport.NewClient(ctx, opts...)
97	if err != nil {
98		return nil, err
99	}
100	s, err := New(client)
101	if err != nil {
102		return nil, err
103	}
104	if endpoint != "" {
105		s.BasePath = endpoint
106	}
107	return s, nil
108}
109
110// New creates a new Service. It uses the provided http.Client for requests.
111//
112// Deprecated: please use NewService instead.
113// To provide a custom HTTP client, use option.WithHTTPClient.
114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
115func New(client *http.Client) (*Service, error) {
116	if client == nil {
117		return nil, errors.New("client is nil")
118	}
119	s := &Service{client: client, BasePath: basePath}
120	s.Folders = NewFoldersService(s)
121	s.Operations = NewOperationsService(s)
122	s.Organizations = NewOrganizationsService(s)
123	s.Projects = NewProjectsService(s)
124	return s, nil
125}
126
127type Service struct {
128	client    *http.Client
129	BasePath  string // API endpoint base URL
130	UserAgent string // optional additional User-Agent fragment
131
132	Folders *FoldersService
133
134	Operations *OperationsService
135
136	Organizations *OrganizationsService
137
138	Projects *ProjectsService
139}
140
141func (s *Service) userAgent() string {
142	if s.UserAgent == "" {
143		return googleapi.UserAgent
144	}
145	return googleapi.UserAgent + " " + s.UserAgent
146}
147
148func NewFoldersService(s *Service) *FoldersService {
149	rs := &FoldersService{s: s}
150	rs.Locations = NewFoldersLocationsService(s)
151	return rs
152}
153
154type FoldersService struct {
155	s *Service
156
157	Locations *FoldersLocationsService
158}
159
160func NewFoldersLocationsService(s *Service) *FoldersLocationsService {
161	rs := &FoldersLocationsService{s: s}
162	rs.Replays = NewFoldersLocationsReplaysService(s)
163	return rs
164}
165
166type FoldersLocationsService struct {
167	s *Service
168
169	Replays *FoldersLocationsReplaysService
170}
171
172func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService {
173	rs := &FoldersLocationsReplaysService{s: s}
174	rs.Results = NewFoldersLocationsReplaysResultsService(s)
175	return rs
176}
177
178type FoldersLocationsReplaysService struct {
179	s *Service
180
181	Results *FoldersLocationsReplaysResultsService
182}
183
184func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService {
185	rs := &FoldersLocationsReplaysResultsService{s: s}
186	return rs
187}
188
189type FoldersLocationsReplaysResultsService struct {
190	s *Service
191}
192
193func NewOperationsService(s *Service) *OperationsService {
194	rs := &OperationsService{s: s}
195	return rs
196}
197
198type OperationsService struct {
199	s *Service
200}
201
202func NewOrganizationsService(s *Service) *OrganizationsService {
203	rs := &OrganizationsService{s: s}
204	rs.Locations = NewOrganizationsLocationsService(s)
205	return rs
206}
207
208type OrganizationsService struct {
209	s *Service
210
211	Locations *OrganizationsLocationsService
212}
213
214func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
215	rs := &OrganizationsLocationsService{s: s}
216	rs.Replays = NewOrganizationsLocationsReplaysService(s)
217	return rs
218}
219
220type OrganizationsLocationsService struct {
221	s *Service
222
223	Replays *OrganizationsLocationsReplaysService
224}
225
226func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService {
227	rs := &OrganizationsLocationsReplaysService{s: s}
228	rs.Results = NewOrganizationsLocationsReplaysResultsService(s)
229	return rs
230}
231
232type OrganizationsLocationsReplaysService struct {
233	s *Service
234
235	Results *OrganizationsLocationsReplaysResultsService
236}
237
238func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService {
239	rs := &OrganizationsLocationsReplaysResultsService{s: s}
240	return rs
241}
242
243type OrganizationsLocationsReplaysResultsService struct {
244	s *Service
245}
246
247func NewProjectsService(s *Service) *ProjectsService {
248	rs := &ProjectsService{s: s}
249	rs.Locations = NewProjectsLocationsService(s)
250	return rs
251}
252
253type ProjectsService struct {
254	s *Service
255
256	Locations *ProjectsLocationsService
257}
258
259func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
260	rs := &ProjectsLocationsService{s: s}
261	rs.Replays = NewProjectsLocationsReplaysService(s)
262	return rs
263}
264
265type ProjectsLocationsService struct {
266	s *Service
267
268	Replays *ProjectsLocationsReplaysService
269}
270
271func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService {
272	rs := &ProjectsLocationsReplaysService{s: s}
273	rs.Results = NewProjectsLocationsReplaysResultsService(s)
274	return rs
275}
276
277type ProjectsLocationsReplaysService struct {
278	s *Service
279
280	Results *ProjectsLocationsReplaysResultsService
281}
282
283func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService {
284	rs := &ProjectsLocationsReplaysResultsService{s: s}
285	return rs
286}
287
288type ProjectsLocationsReplaysResultsService struct {
289	s *Service
290}
291
292// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`,
293// or simulation.
294type GoogleCloudPolicysimulatorV1Replay struct {
295	// Config: Required. The configuration used for the `Replay`.
296	Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"`
297
298	// Name: Output only. The resource name of the `Replay`, which has the
299	// following format:
300	// `{projects|folders|organizations}/{resource-id}/locations/global/repla
301	// ys/{replay-id}`, where `{resource-id}` is the ID of the project,
302	// folder, or organization that owns the Replay. Example:
303	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d
304	// 7d-8e03-479ce1833c36`
305	Name string `json:"name,omitempty"`
306
307	// ResultsSummary: Output only. Summary statistics about the replayed
308	// log entries.
309	ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"`
310
311	// State: Output only. The current state of the `Replay`.
312	//
313	// Possible values:
314	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
315	//   "PENDING" - The `Replay` has not started yet.
316	//   "RUNNING" - The `Replay` is currently running.
317	//   "SUCCEEDED" - The `Replay` has successfully completed.
318	//   "FAILED" - The `Replay` has finished with an error.
319	State string `json:"state,omitempty"`
320
321	// ForceSendFields is a list of field names (e.g. "Config") to
322	// unconditionally include in API requests. By default, fields with
323	// empty or default values are omitted from API requests. However, any
324	// non-pointer, non-interface field appearing in ForceSendFields will be
325	// sent to the server regardless of whether the field is empty or not.
326	// This may be used to include empty fields in Patch requests.
327	ForceSendFields []string `json:"-"`
328
329	// NullFields is a list of field names (e.g. "Config") to include in API
330	// requests with the JSON null value. By default, fields with empty
331	// values are omitted from API requests. However, any field with an
332	// empty value appearing in NullFields will be sent to the server as
333	// null. It is an error if a field in this list has a non-empty value.
334	// This may be used to include null fields in Patch requests.
335	NullFields []string `json:"-"`
336}
337
338func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) {
339	type NoMethod GoogleCloudPolicysimulatorV1Replay
340	raw := NoMethod(*s)
341	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
342}
343
344// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for
345// a Replay.
346type GoogleCloudPolicysimulatorV1ReplayConfig struct {
347	// LogSource: The logs to use as input for the Replay.
348	//
349	// Possible values:
350	//   "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log
351	// source is unspecified, the Replay defaults to using
352	// `RECENT_ACCESSES`.
353	//   "RECENT_ACCESSES" - All access logs from the last 90 days. These
354	// logs may not include logs from the most recent 7 days.
355	LogSource string `json:"logSource,omitempty"`
356
357	// PolicyOverlay: A mapping of the resources that you want to simulate
358	// policies for and the policies that you want to simulate. Keys are the
359	// full resource names for the resources. For example,
360	// `//cloudresourcemanager.googleapis.com/projects/my-project`. For
361	// examples of full resource names for Google Cloud services, see
362	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
363	// Values are Policy objects representing the policies that you want to
364	// simulate. Replays automatically take into account any IAM policies
365	// inherited through the resource hierarchy, and any policies set on
366	// descendant resources. You do not need to include these policies in
367	// the policy overlay.
368	PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"`
369
370	// ForceSendFields is a list of field names (e.g. "LogSource") to
371	// unconditionally include in API requests. By default, fields with
372	// empty or default values are omitted from API requests. However, any
373	// non-pointer, non-interface field appearing in ForceSendFields will be
374	// sent to the server regardless of whether the field is empty or not.
375	// This may be used to include empty fields in Patch requests.
376	ForceSendFields []string `json:"-"`
377
378	// NullFields is a list of field names (e.g. "LogSource") to include in
379	// API requests with the JSON null value. By default, fields with empty
380	// values are omitted from API requests. However, any field with an
381	// empty value appearing in NullFields will be sent to the server as
382	// null. It is an error if a field in this list has a non-empty value.
383	// This may be used to include null fields in Patch requests.
384	NullFields []string `json:"-"`
385}
386
387func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) {
388	type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig
389	raw := NoMethod(*s)
390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
391}
392
393// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a
394// Replay operation.
395type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct {
396	// StartTime: Time when the request was received.
397	StartTime string `json:"startTime,omitempty"`
398
399	// ForceSendFields is a list of field names (e.g. "StartTime") to
400	// unconditionally include in API requests. By default, fields with
401	// empty or default values are omitted from API requests. However, any
402	// non-pointer, non-interface field appearing in ForceSendFields will be
403	// sent to the server regardless of whether the field is empty or not.
404	// This may be used to include empty fields in Patch requests.
405	ForceSendFields []string `json:"-"`
406
407	// NullFields is a list of field names (e.g. "StartTime") to include in
408	// API requests with the JSON null value. By default, fields with empty
409	// values are omitted from API requests. However, any field with an
410	// empty value appearing in NullFields will be sent to the server as
411	// null. It is an error if a field in this list has a non-empty value.
412	// This may be used to include null fields in Patch requests.
413	NullFields []string `json:"-"`
414}
415
416func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) {
417	type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata
418	raw := NoMethod(*s)
419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
420}
421
422// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics
423// about the replayed log entries.
424type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct {
425	// DifferenceCount: The number of replayed log entries with a difference
426	// between baseline and simulated policies.
427	DifferenceCount int64 `json:"differenceCount,omitempty"`
428
429	// ErrorCount: The number of log entries that could not be replayed.
430	ErrorCount int64 `json:"errorCount,omitempty"`
431
432	// LogCount: The total number of log entries replayed.
433	LogCount int64 `json:"logCount,omitempty"`
434
435	// NewestDate: The date of the newest log entry replayed.
436	NewestDate *GoogleTypeDate `json:"newestDate,omitempty"`
437
438	// OldestDate: The date of the oldest log entry replayed.
439	OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"`
440
441	// UnchangedCount: The number of replayed log entries with no difference
442	// between baseline and simulated policies.
443	UnchangedCount int64 `json:"unchangedCount,omitempty"`
444
445	// ForceSendFields is a list of field names (e.g. "DifferenceCount") to
446	// unconditionally include in API requests. By default, fields with
447	// empty or default values are omitted from API requests. However, any
448	// non-pointer, non-interface field appearing in ForceSendFields will be
449	// sent to the server regardless of whether the field is empty or not.
450	// This may be used to include empty fields in Patch requests.
451	ForceSendFields []string `json:"-"`
452
453	// NullFields is a list of field names (e.g. "DifferenceCount") to
454	// include in API requests with the JSON null value. By default, fields
455	// with empty values are omitted from API requests. However, any field
456	// with an empty value appearing in NullFields will be sent to the
457	// server as null. It is an error if a field in this list has a
458	// non-empty value. This may be used to include null fields in Patch
459	// requests.
460	NullFields []string `json:"-"`
461}
462
463func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) {
464	type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary
465	raw := NoMethod(*s)
466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
467}
468
469// GoogleCloudPolicysimulatorV1beta1AccessStateDiff: A summary and
470// comparison of the member's access under the current (baseline)
471// policies and the proposed (simulated) policies for a single access
472// tuple.
473type GoogleCloudPolicysimulatorV1beta1AccessStateDiff struct {
474	// AccessChange: How the member's access, specified in the AccessState
475	// field, changed between the current (baseline) policies and proposed
476	// (simulated) policies.
477	//
478	// Possible values:
479	//   "ACCESS_CHANGE_TYPE_UNSPECIFIED" - The access change is
480	// unspecified.
481	//   "NO_CHANGE" - The member's access did not change. This includes the
482	// case where both baseline and simulated are UNKNOWN, but the unknown
483	// information is equivalent.
484	//   "UNKNOWN_CHANGE" - The member's access under both the current
485	// policies and the proposed policies is `UNKNOWN`, but the unknown
486	// information differs between them.
487	//   "ACCESS_REVOKED" - The member had access under the current policies
488	// (`GRANTED`), but will no longer have access after the proposed
489	// changes (`NOT_GRANTED`).
490	//   "ACCESS_GAINED" - The member did not have access under the current
491	// policies (`NOT_GRANTED`), but will have access after the proposed
492	// changes (`GRANTED`).
493	//   "ACCESS_MAYBE_REVOKED" - This result can occur for the following
494	// reasons: * The member had access under the current policies
495	// (`GRANTED`), but their access after the proposed changes is
496	// `UNKNOWN`. * The member's access under the current policies is
497	// `UNKNOWN`, but they will not have access after the proposed changes
498	// (`NOT_GRANTED`).
499	//   "ACCESS_MAYBE_GAINED" - This result can occur for the following
500	// reasons: * The member did not have access under the current policies
501	// (`NOT_GRANTED`), but their access after the proposed changes is
502	// `UNKNOWN`. * The member's access under the current policies is
503	// `UNKNOWN`, but they will have access after the proposed changes
504	// (`GRANTED`).
505	AccessChange string `json:"accessChange,omitempty"`
506
507	// Baseline: The results of evaluating the access tuple under the
508	// current (baseline) policies. If the AccessState couldn't be fully
509	// evaluated, this field explains why.
510	Baseline *GoogleCloudPolicysimulatorV1beta1ExplainedAccess `json:"baseline,omitempty"`
511
512	// Simulated: The results of evaluating the access tuple under the
513	// proposed (simulated) policies. If the AccessState couldn't be fully
514	// evaluated, this field explains why.
515	Simulated *GoogleCloudPolicysimulatorV1beta1ExplainedAccess `json:"simulated,omitempty"`
516
517	// ForceSendFields is a list of field names (e.g. "AccessChange") to
518	// unconditionally include in API requests. By default, fields with
519	// empty or default values are omitted from API requests. However, any
520	// non-pointer, non-interface field appearing in ForceSendFields will be
521	// sent to the server regardless of whether the field is empty or not.
522	// This may be used to include empty fields in Patch requests.
523	ForceSendFields []string `json:"-"`
524
525	// NullFields is a list of field names (e.g. "AccessChange") to include
526	// in API requests with the JSON null value. By default, fields with
527	// empty values are omitted from API requests. However, any field with
528	// an empty value appearing in NullFields will be sent to the server as
529	// null. It is an error if a field in this list has a non-empty value.
530	// This may be used to include null fields in Patch requests.
531	NullFields []string `json:"-"`
532}
533
534func (s *GoogleCloudPolicysimulatorV1beta1AccessStateDiff) MarshalJSON() ([]byte, error) {
535	type NoMethod GoogleCloudPolicysimulatorV1beta1AccessStateDiff
536	raw := NoMethod(*s)
537	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
538}
539
540// GoogleCloudPolicysimulatorV1beta1AccessTuple: Information about the
541// principal, resource, and permission to check.
542type GoogleCloudPolicysimulatorV1beta1AccessTuple struct {
543	// FullResourceName: Required. The full resource name that identifies
544	// the resource. For example,
545	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst
546	// ances/my-instance`. For examples of full resource names for Google
547	// Cloud services, see
548	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
549	FullResourceName string `json:"fullResourceName,omitempty"`
550
551	// Permission: Required. The IAM permission to check for the specified
552	// principal and resource. For a complete list of IAM permissions, see
553	// https://cloud.google.com/iam/help/permissions/reference. For a
554	// complete list of predefined IAM roles and the permissions in each
555	// role, see https://cloud.google.com/iam/help/roles/reference.
556	Permission string `json:"permission,omitempty"`
557
558	// Principal: Required. The principal whose access you want to check, in
559	// the form of the email address that represents that principal. For
560	// example, `alice@example.com` or
561	// `my-service-account@my-project.iam.gserviceaccount.com`. The
562	// principal must be a Google Account or a service account. Other types
563	// of principals are not supported.
564	Principal string `json:"principal,omitempty"`
565
566	// ForceSendFields is a list of field names (e.g. "FullResourceName") to
567	// unconditionally include in API requests. By default, fields with
568	// empty or default values are omitted from API requests. However, any
569	// non-pointer, non-interface field appearing in ForceSendFields will be
570	// sent to the server regardless of whether the field is empty or not.
571	// This may be used to include empty fields in Patch requests.
572	ForceSendFields []string `json:"-"`
573
574	// NullFields is a list of field names (e.g. "FullResourceName") to
575	// include in API requests with the JSON null value. By default, fields
576	// with empty values are omitted from API requests. However, any field
577	// with an empty value appearing in NullFields will be sent to the
578	// server as null. It is an error if a field in this list has a
579	// non-empty value. This may be used to include null fields in Patch
580	// requests.
581	NullFields []string `json:"-"`
582}
583
584func (s *GoogleCloudPolicysimulatorV1beta1AccessTuple) MarshalJSON() ([]byte, error) {
585	type NoMethod GoogleCloudPolicysimulatorV1beta1AccessTuple
586	raw := NoMethod(*s)
587	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
588}
589
590// GoogleCloudPolicysimulatorV1beta1BindingExplanation: Details about
591// how a binding in a policy affects a principal's ability to use a
592// permission.
593type GoogleCloudPolicysimulatorV1beta1BindingExplanation struct {
594	// Access: Required. Indicates whether _this binding_ provides the
595	// specified permission to the specified principal for the specified
596	// resource. This field does _not_ indicate whether the principal
597	// actually has the permission for the resource. There might be another
598	// binding that overrides this binding. To determine whether the
599	// principal actually has the permission, use the `access` field in the
600	// TroubleshootIamPolicyResponse.
601	//
602	// Possible values:
603	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
604	//   "GRANTED" - The principal has the permission.
605	//   "NOT_GRANTED" - The principal does not have the permission.
606	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
607	// condition expression evaluates to `true`.
608	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not
609	// have access to all of the policies that Policy Simulator needs to
610	// evaluate.
611	Access string `json:"access,omitempty"`
612
613	// Condition: A condition expression that prevents this binding from
614	// granting access unless the expression evaluates to `true`. To learn
615	// about IAM Conditions, see
616	// https://cloud.google.com/iam/docs/conditions-overview.
617	Condition *GoogleTypeExpr `json:"condition,omitempty"`
618
619	// Memberships: Indicates whether each principal in the binding includes
620	// the principal specified in the request, either directly or
621	// indirectly. Each key identifies a principal in the binding, and each
622	// value indicates whether the principal in the binding includes the
623	// principal in the request. For example, suppose that a binding
624	// includes the following principals: * `user:alice@example.com` *
625	// `group:product-eng@example.com` The principal in the replayed access
626	// tuple is `user:bob@example.com`. This user is a principal of the
627	// group `group:product-eng@example.com`. For the first principal in the
628	// binding, the key is `user:alice@example.com`, and the `membership`
629	// field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the
630	// second principal in the binding, the key is
631	// `group:product-eng@example.com`, and the `membership` field in the
632	// value is set to `MEMBERSHIP_INCLUDED`.
633	Memberships map[string]GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership `json:"memberships,omitempty"`
634
635	// Relevance: The relevance of this binding to the overall determination
636	// for the entire policy.
637	//
638	// Possible values:
639	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is
640	// unused.
641	//   "NORMAL" - The data point has a limited effect on the result.
642	// Changing the data point is unlikely to affect the overall
643	// determination.
644	//   "HIGH" - The data point has a strong effect on the result. Changing
645	// the data point is likely to affect the overall determination.
646	Relevance string `json:"relevance,omitempty"`
647
648	// Role: The role that this binding grants. For example,
649	// `roles/compute.serviceAgent`. For a complete list of predefined IAM
650	// roles, as well as the permissions in each role, see
651	// https://cloud.google.com/iam/help/roles/reference.
652	Role string `json:"role,omitempty"`
653
654	// RolePermission: Indicates whether the role granted by this binding
655	// contains the specified permission.
656	//
657	// Possible values:
658	//   "ROLE_PERMISSION_UNSPECIFIED" - Default value. This value is
659	// unused.
660	//   "ROLE_PERMISSION_INCLUDED" - The permission is included in the
661	// role.
662	//   "ROLE_PERMISSION_NOT_INCLUDED" - The permission is not included in
663	// the role.
664	//   "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" - The user who created the
665	// Replay is not allowed to access the binding.
666	RolePermission string `json:"rolePermission,omitempty"`
667
668	// RolePermissionRelevance: The relevance of the permission's existence,
669	// or nonexistence, in the role to the overall determination for the
670	// entire policy.
671	//
672	// Possible values:
673	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is
674	// unused.
675	//   "NORMAL" - The data point has a limited effect on the result.
676	// Changing the data point is unlikely to affect the overall
677	// determination.
678	//   "HIGH" - The data point has a strong effect on the result. Changing
679	// the data point is likely to affect the overall determination.
680	RolePermissionRelevance string `json:"rolePermissionRelevance,omitempty"`
681
682	// ForceSendFields is a list of field names (e.g. "Access") to
683	// unconditionally include in API requests. By default, fields with
684	// empty or default values are omitted from API requests. However, any
685	// non-pointer, non-interface field appearing in ForceSendFields will be
686	// sent to the server regardless of whether the field is empty or not.
687	// This may be used to include empty fields in Patch requests.
688	ForceSendFields []string `json:"-"`
689
690	// NullFields is a list of field names (e.g. "Access") to include in API
691	// requests with the JSON null value. By default, fields with empty
692	// values are omitted from API requests. However, any field with an
693	// empty value appearing in NullFields will be sent to the server as
694	// null. It is an error if a field in this list has a non-empty value.
695	// This may be used to include null fields in Patch requests.
696	NullFields []string `json:"-"`
697}
698
699func (s *GoogleCloudPolicysimulatorV1beta1BindingExplanation) MarshalJSON() ([]byte, error) {
700	type NoMethod GoogleCloudPolicysimulatorV1beta1BindingExplanation
701	raw := NoMethod(*s)
702	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
703}
704
705// GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership
706// : Details about whether the binding includes the principal.
707type GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership struct {
708	// Membership: Indicates whether the binding includes the principal.
709	//
710	// Possible values:
711	//   "MEMBERSHIP_UNSPECIFIED" - Default value. This value is unused.
712	//   "MEMBERSHIP_INCLUDED" - The binding includes the principal. The
713	// principal can be included directly or indirectly. For example: * A
714	// principal is included directly if that principal is listed in the
715	// binding. * A principal is included indirectly if that principal is in
716	// a Google group or Google Workspace domain that is listed in the
717	// binding.
718	//   "MEMBERSHIP_NOT_INCLUDED" - The binding does not include the
719	// principal.
720	//   "MEMBERSHIP_UNKNOWN_INFO_DENIED" - The user who created the Replay
721	// is not allowed to access the binding.
722	//   "MEMBERSHIP_UNKNOWN_UNSUPPORTED" - The principal is an unsupported
723	// type. Only Google Accounts and service accounts are supported.
724	Membership string `json:"membership,omitempty"`
725
726	// Relevance: The relevance of the principal's status to the overall
727	// determination for the binding.
728	//
729	// Possible values:
730	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is
731	// unused.
732	//   "NORMAL" - The data point has a limited effect on the result.
733	// Changing the data point is unlikely to affect the overall
734	// determination.
735	//   "HIGH" - The data point has a strong effect on the result. Changing
736	// the data point is likely to affect the overall determination.
737	Relevance string `json:"relevance,omitempty"`
738
739	// ForceSendFields is a list of field names (e.g. "Membership") to
740	// unconditionally include in API requests. By default, fields with
741	// empty or default values are omitted from API requests. However, any
742	// non-pointer, non-interface field appearing in ForceSendFields will be
743	// sent to the server regardless of whether the field is empty or not.
744	// This may be used to include empty fields in Patch requests.
745	ForceSendFields []string `json:"-"`
746
747	// NullFields is a list of field names (e.g. "Membership") to include in
748	// API requests with the JSON null value. By default, fields with empty
749	// values are omitted from API requests. However, any field with an
750	// empty value appearing in NullFields will be sent to the server as
751	// null. It is an error if a field in this list has a non-empty value.
752	// This may be used to include null fields in Patch requests.
753	NullFields []string `json:"-"`
754}
755
756func (s *GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership) MarshalJSON() ([]byte, error) {
757	type NoMethod GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership
758	raw := NoMethod(*s)
759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
760}
761
762// GoogleCloudPolicysimulatorV1beta1ExplainedAccess: Details about how a
763// set of policies, listed in ExplainedPolicy, resulted in a certain
764// AccessState when replaying an access tuple.
765type GoogleCloudPolicysimulatorV1beta1ExplainedAccess struct {
766	// AccessState: Whether the member in the access tuple has permission to
767	// access the resource in the access tuple under the given policies.
768	//
769	// Possible values:
770	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
771	//   "GRANTED" - The principal has the permission.
772	//   "NOT_GRANTED" - The principal does not have the permission.
773	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
774	// condition expression evaluates to `true`.
775	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not
776	// have access to all of the policies that Policy Simulator needs to
777	// evaluate.
778	AccessState string `json:"accessState,omitempty"`
779
780	// Errors: If the AccessState is `UNKNOWN`, this field contains a list
781	// of errors explaining why the result is `UNKNOWN`. If the
782	// `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.
783	Errors []*GoogleRpcStatus `json:"errors,omitempty"`
784
785	// Policies: If the AccessState is `UNKNOWN`, this field contains the
786	// policies that led to that result. If the `AccessState` is `GRANTED`
787	// or `NOT_GRANTED`, this field is omitted.
788	Policies []*GoogleCloudPolicysimulatorV1beta1ExplainedPolicy `json:"policies,omitempty"`
789
790	// ForceSendFields is a list of field names (e.g. "AccessState") to
791	// unconditionally include in API requests. By default, fields with
792	// empty or default values are omitted from API requests. However, any
793	// non-pointer, non-interface field appearing in ForceSendFields will be
794	// sent to the server regardless of whether the field is empty or not.
795	// This may be used to include empty fields in Patch requests.
796	ForceSendFields []string `json:"-"`
797
798	// NullFields is a list of field names (e.g. "AccessState") to include
799	// in API requests with the JSON null value. By default, fields with
800	// empty values are omitted from API requests. However, any field with
801	// an empty value appearing in NullFields will be sent to the server as
802	// null. It is an error if a field in this list has a non-empty value.
803	// This may be used to include null fields in Patch requests.
804	NullFields []string `json:"-"`
805}
806
807func (s *GoogleCloudPolicysimulatorV1beta1ExplainedAccess) MarshalJSON() ([]byte, error) {
808	type NoMethod GoogleCloudPolicysimulatorV1beta1ExplainedAccess
809	raw := NoMethod(*s)
810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
811}
812
813// GoogleCloudPolicysimulatorV1beta1ExplainedPolicy: Details about how a
814// specific IAM Policy contributed to the access check.
815type GoogleCloudPolicysimulatorV1beta1ExplainedPolicy struct {
816	// Access: Indicates whether _this policy_ provides the specified
817	// permission to the specified principal for the specified resource.
818	// This field does _not_ indicate whether the principal actually has the
819	// permission for the resource. There might be another policy that
820	// overrides this policy. To determine whether the principal actually
821	// has the permission, use the `access` field in the
822	// TroubleshootIamPolicyResponse.
823	//
824	// Possible values:
825	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
826	//   "GRANTED" - The principal has the permission.
827	//   "NOT_GRANTED" - The principal does not have the permission.
828	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
829	// condition expression evaluates to `true`.
830	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not
831	// have access to all of the policies that Policy Simulator needs to
832	// evaluate.
833	Access string `json:"access,omitempty"`
834
835	// BindingExplanations: Details about how each binding in the policy
836	// affects the principal's ability, or inability, to use the permission
837	// for the resource. If the user who created the Replay does not have
838	// access to the policy, this field is omitted.
839	BindingExplanations []*GoogleCloudPolicysimulatorV1beta1BindingExplanation `json:"bindingExplanations,omitempty"`
840
841	// FullResourceName: The full resource name that identifies the
842	// resource. For example,
843	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst
844	// ances/my-instance`. If the user who created the Replay does not have
845	// access to the policy, this field is omitted. For examples of full
846	// resource names for Google Cloud services, see
847	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
848	FullResourceName string `json:"fullResourceName,omitempty"`
849
850	// Policy: The IAM policy attached to the resource. If the user who
851	// created the Replay does not have access to the policy, this field is
852	// empty.
853	Policy *GoogleIamV1Policy `json:"policy,omitempty"`
854
855	// Relevance: The relevance of this policy to the overall determination
856	// in the TroubleshootIamPolicyResponse. If the user who created the
857	// Replay does not have access to the policy, this field is omitted.
858	//
859	// Possible values:
860	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is
861	// unused.
862	//   "NORMAL" - The data point has a limited effect on the result.
863	// Changing the data point is unlikely to affect the overall
864	// determination.
865	//   "HIGH" - The data point has a strong effect on the result. Changing
866	// the data point is likely to affect the overall determination.
867	Relevance string `json:"relevance,omitempty"`
868
869	// ForceSendFields is a list of field names (e.g. "Access") to
870	// unconditionally include in API requests. By default, fields with
871	// empty or default values are omitted from API requests. However, any
872	// non-pointer, non-interface field appearing in ForceSendFields will be
873	// sent to the server regardless of whether the field is empty or not.
874	// This may be used to include empty fields in Patch requests.
875	ForceSendFields []string `json:"-"`
876
877	// NullFields is a list of field names (e.g. "Access") to include in API
878	// requests with the JSON null value. By default, fields with empty
879	// values are omitted from API requests. However, any field with an
880	// empty value appearing in NullFields will be sent to the server as
881	// null. It is an error if a field in this list has a non-empty value.
882	// This may be used to include null fields in Patch requests.
883	NullFields []string `json:"-"`
884}
885
886func (s *GoogleCloudPolicysimulatorV1beta1ExplainedPolicy) MarshalJSON() ([]byte, error) {
887	type NoMethod GoogleCloudPolicysimulatorV1beta1ExplainedPolicy
888	raw := NoMethod(*s)
889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
890}
891
892// GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse: Response
893// message for Simulator.ListReplayResults.
894type GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse struct {
895	// NextPageToken: A token that you can use to retrieve the next page of
896	// ReplayResult objects. If this field is omitted, there are no
897	// subsequent pages.
898	NextPageToken string `json:"nextPageToken,omitempty"`
899
900	// ReplayResults: The results of running a Replay.
901	ReplayResults []*GoogleCloudPolicysimulatorV1beta1ReplayResult `json:"replayResults,omitempty"`
902
903	// ServerResponse contains the HTTP response code and headers from the
904	// server.
905	googleapi.ServerResponse `json:"-"`
906
907	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
908	// unconditionally include in API requests. By default, fields with
909	// empty or default values are omitted from API requests. However, any
910	// non-pointer, non-interface field appearing in ForceSendFields will be
911	// sent to the server regardless of whether the field is empty or not.
912	// This may be used to include empty fields in Patch requests.
913	ForceSendFields []string `json:"-"`
914
915	// NullFields is a list of field names (e.g. "NextPageToken") to include
916	// in API requests with the JSON null value. By default, fields with
917	// empty values are omitted from API requests. However, any field with
918	// an empty value appearing in NullFields will be sent to the server as
919	// null. It is an error if a field in this list has a non-empty value.
920	// This may be used to include null fields in Patch requests.
921	NullFields []string `json:"-"`
922}
923
924func (s *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) MarshalJSON() ([]byte, error) {
925	type NoMethod GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse
926	raw := NoMethod(*s)
927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
928}
929
930// GoogleCloudPolicysimulatorV1beta1Replay: A resource describing a
931// `Replay`, or simulation.
932type GoogleCloudPolicysimulatorV1beta1Replay struct {
933	// Config: Required. The configuration used for the `Replay`.
934	Config *GoogleCloudPolicysimulatorV1beta1ReplayConfig `json:"config,omitempty"`
935
936	// Name: Output only. The resource name of the `Replay`, which has the
937	// following format:
938	// `{projects|folders|organizations}/{resource-id}/locations/global/repla
939	// ys/{replay-id}`, where `{resource-id}` is the ID of the project,
940	// folder, or organization that owns the Replay. Example:
941	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d
942	// 7d-8e03-479ce1833c36`
943	Name string `json:"name,omitempty"`
944
945	// ResultsSummary: Output only. Summary statistics about the replayed
946	// log entries.
947	ResultsSummary *GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary `json:"resultsSummary,omitempty"`
948
949	// State: Output only. The current state of the `Replay`.
950	//
951	// Possible values:
952	//   "STATE_UNSPECIFIED" - The state is unspecified.
953	//   "PENDING" - The `Replay` has not started yet.
954	//   "RUNNING" - The `Replay` is currently running.
955	//   "SUCCEEDED" - The `Replay` has successfully completed.
956	//   "FAILED" - The `Replay` has finished with an error.
957	State string `json:"state,omitempty"`
958
959	// ServerResponse contains the HTTP response code and headers from the
960	// server.
961	googleapi.ServerResponse `json:"-"`
962
963	// ForceSendFields is a list of field names (e.g. "Config") to
964	// unconditionally include in API requests. By default, fields with
965	// empty or default values are omitted from API requests. However, any
966	// non-pointer, non-interface field appearing in ForceSendFields will be
967	// sent to the server regardless of whether the field is empty or not.
968	// This may be used to include empty fields in Patch requests.
969	ForceSendFields []string `json:"-"`
970
971	// NullFields is a list of field names (e.g. "Config") to include in API
972	// requests with the JSON null value. By default, fields with empty
973	// values are omitted from API requests. However, any field with an
974	// empty value appearing in NullFields will be sent to the server as
975	// null. It is an error if a field in this list has a non-empty value.
976	// This may be used to include null fields in Patch requests.
977	NullFields []string `json:"-"`
978}
979
980func (s *GoogleCloudPolicysimulatorV1beta1Replay) MarshalJSON() ([]byte, error) {
981	type NoMethod GoogleCloudPolicysimulatorV1beta1Replay
982	raw := NoMethod(*s)
983	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
984}
985
986// GoogleCloudPolicysimulatorV1beta1ReplayConfig: The configuration used
987// for a Replay.
988type GoogleCloudPolicysimulatorV1beta1ReplayConfig struct {
989	// LogSource: The logs to use as input for the Replay.
990	//
991	// Possible values:
992	//   "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log
993	// source is unspecified, the Replay defaults to using
994	// `RECENT_ACCESSES`.
995	//   "RECENT_ACCESSES" - All access logs from the last 90 days. These
996	// logs may not include logs from the most recent 7 days.
997	LogSource string `json:"logSource,omitempty"`
998
999	// PolicyOverlay: A mapping of the resources that you want to simulate
1000	// policies for and the policies that you want to simulate. Keys are the
1001	// full resource names for the resources. For example,
1002	// `//cloudresourcemanager.googleapis.com/projects/my-project`. For
1003	// examples of full resource names for Google Cloud services, see
1004	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
1005	// Values are Policy objects representing the policies that you want to
1006	// simulate. Replays automatically take into account any IAM policies
1007	// inherited through the resource hierarchy, and any policies set on
1008	// descendant resources. You do not need to include these policies in
1009	// the policy overlay.
1010	PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"`
1011
1012	// ForceSendFields is a list of field names (e.g. "LogSource") to
1013	// unconditionally include in API requests. By default, fields with
1014	// empty or default values are omitted from API requests. However, any
1015	// non-pointer, non-interface field appearing in ForceSendFields will be
1016	// sent to the server regardless of whether the field is empty or not.
1017	// This may be used to include empty fields in Patch requests.
1018	ForceSendFields []string `json:"-"`
1019
1020	// NullFields is a list of field names (e.g. "LogSource") to include in
1021	// API requests with the JSON null value. By default, fields with empty
1022	// values are omitted from API requests. However, any field with an
1023	// empty value appearing in NullFields will be sent to the server as
1024	// null. It is an error if a field in this list has a non-empty value.
1025	// This may be used to include null fields in Patch requests.
1026	NullFields []string `json:"-"`
1027}
1028
1029func (s *GoogleCloudPolicysimulatorV1beta1ReplayConfig) MarshalJSON() ([]byte, error) {
1030	type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayConfig
1031	raw := NoMethod(*s)
1032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1033}
1034
1035// GoogleCloudPolicysimulatorV1beta1ReplayDiff: The difference between
1036// the results of evaluating an access tuple under the current
1037// (baseline) policies and under the proposed (simulated) policies. This
1038// difference explains how a member's access could change if the
1039// proposed policies were applied.
1040type GoogleCloudPolicysimulatorV1beta1ReplayDiff struct {
1041	// AccessDiff: A summary and comparison of the member's access under the
1042	// current (baseline) policies and the proposed (simulated) policies for
1043	// a single access tuple. The evaluation of the member's access is
1044	// reported in the AccessState field.
1045	AccessDiff *GoogleCloudPolicysimulatorV1beta1AccessStateDiff `json:"accessDiff,omitempty"`
1046
1047	// ForceSendFields is a list of field names (e.g. "AccessDiff") to
1048	// unconditionally include in API requests. By default, fields with
1049	// empty or default values are omitted from API requests. However, any
1050	// non-pointer, non-interface field appearing in ForceSendFields will be
1051	// sent to the server regardless of whether the field is empty or not.
1052	// This may be used to include empty fields in Patch requests.
1053	ForceSendFields []string `json:"-"`
1054
1055	// NullFields is a list of field names (e.g. "AccessDiff") to include in
1056	// API requests with the JSON null value. By default, fields with empty
1057	// values are omitted from API requests. However, any field with an
1058	// empty value appearing in NullFields will be sent to the server as
1059	// null. It is an error if a field in this list has a non-empty value.
1060	// This may be used to include null fields in Patch requests.
1061	NullFields []string `json:"-"`
1062}
1063
1064func (s *GoogleCloudPolicysimulatorV1beta1ReplayDiff) MarshalJSON() ([]byte, error) {
1065	type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayDiff
1066	raw := NoMethod(*s)
1067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1068}
1069
1070// GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata: Metadata
1071// about a Replay operation.
1072type GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata struct {
1073	// StartTime: Time when the request was received.
1074	StartTime string `json:"startTime,omitempty"`
1075
1076	// ForceSendFields is a list of field names (e.g. "StartTime") to
1077	// unconditionally include in API requests. By default, fields with
1078	// empty or default values are omitted from API requests. However, any
1079	// non-pointer, non-interface field appearing in ForceSendFields will be
1080	// sent to the server regardless of whether the field is empty or not.
1081	// This may be used to include empty fields in Patch requests.
1082	ForceSendFields []string `json:"-"`
1083
1084	// NullFields is a list of field names (e.g. "StartTime") to include in
1085	// API requests with the JSON null value. By default, fields with empty
1086	// values are omitted from API requests. However, any field with an
1087	// empty value appearing in NullFields will be sent to the server as
1088	// null. It is an error if a field in this list has a non-empty value.
1089	// This may be used to include null fields in Patch requests.
1090	NullFields []string `json:"-"`
1091}
1092
1093func (s *GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata) MarshalJSON() ([]byte, error) {
1094	type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata
1095	raw := NoMethod(*s)
1096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1097}
1098
1099// GoogleCloudPolicysimulatorV1beta1ReplayResult: The result of
1100// replaying a single access tuple against a simulated state.
1101type GoogleCloudPolicysimulatorV1beta1ReplayResult struct {
1102	// AccessTuple: The access tuple that was replayed. This field includes
1103	// information about the member, resource, and permission that were
1104	// involved in the access attempt.
1105	AccessTuple *GoogleCloudPolicysimulatorV1beta1AccessTuple `json:"accessTuple,omitempty"`
1106
1107	// Diff: The difference between the member's access under the current
1108	// (baseline) policies and the member's access under the proposed
1109	// (simulated) policies. This field is only included for access tuples
1110	// that were successfully replayed and had different results under the
1111	// current policies and the proposed policies.
1112	Diff *GoogleCloudPolicysimulatorV1beta1ReplayDiff `json:"diff,omitempty"`
1113
1114	// Error: The error that caused the access tuple replay to fail. This
1115	// field is only included for access tuples that were not replayed
1116	// successfully.
1117	Error *GoogleRpcStatus `json:"error,omitempty"`
1118
1119	// LastSeenDate: The latest date this access tuple was seen in the logs.
1120	LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"`
1121
1122	// Name: The resource name of the `ReplayResult`, in the following
1123	// format:
1124	// `{projects|folders|organizations}/{resource-id}/locations/global/repla
1125	// ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is
1126	// the ID of the project, folder, or organization that owns the Replay.
1127	// Example:
1128	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d
1129	// 7d-8e03-479ce1833c36/results/1234`
1130	Name string `json:"name,omitempty"`
1131
1132	// Parent: The Replay that the access tuple was included in.
1133	Parent string `json:"parent,omitempty"`
1134
1135	// ForceSendFields is a list of field names (e.g. "AccessTuple") to
1136	// unconditionally include in API requests. By default, fields with
1137	// empty or default values are omitted from API requests. However, any
1138	// non-pointer, non-interface field appearing in ForceSendFields will be
1139	// sent to the server regardless of whether the field is empty or not.
1140	// This may be used to include empty fields in Patch requests.
1141	ForceSendFields []string `json:"-"`
1142
1143	// NullFields is a list of field names (e.g. "AccessTuple") to include
1144	// in API requests with the JSON null value. By default, fields with
1145	// empty values are omitted from API requests. However, any field with
1146	// an empty value appearing in NullFields will be sent to the server as
1147	// null. It is an error if a field in this list has a non-empty value.
1148	// This may be used to include null fields in Patch requests.
1149	NullFields []string `json:"-"`
1150}
1151
1152func (s *GoogleCloudPolicysimulatorV1beta1ReplayResult) MarshalJSON() ([]byte, error) {
1153	type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayResult
1154	raw := NoMethod(*s)
1155	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1156}
1157
1158// GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary: Summary
1159// statistics about the replayed log entries.
1160type GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary struct {
1161	// DifferenceCount: The number of replayed log entries with a difference
1162	// between baseline and simulated policies.
1163	DifferenceCount int64 `json:"differenceCount,omitempty"`
1164
1165	// ErrorCount: The number of log entries that could not be replayed.
1166	ErrorCount int64 `json:"errorCount,omitempty"`
1167
1168	// LogCount: The total number of log entries replayed.
1169	LogCount int64 `json:"logCount,omitempty"`
1170
1171	// NewestDate: The date of the newest log entry replayed.
1172	NewestDate *GoogleTypeDate `json:"newestDate,omitempty"`
1173
1174	// OldestDate: The date of the oldest log entry replayed.
1175	OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"`
1176
1177	// UnchangedCount: The number of replayed log entries with no difference
1178	// between baseline and simulated policies.
1179	UnchangedCount int64 `json:"unchangedCount,omitempty"`
1180
1181	// ForceSendFields is a list of field names (e.g. "DifferenceCount") to
1182	// unconditionally include in API requests. By default, fields with
1183	// empty or default values are omitted from API requests. However, any
1184	// non-pointer, non-interface field appearing in ForceSendFields will be
1185	// sent to the server regardless of whether the field is empty or not.
1186	// This may be used to include empty fields in Patch requests.
1187	ForceSendFields []string `json:"-"`
1188
1189	// NullFields is a list of field names (e.g. "DifferenceCount") to
1190	// include in API requests with the JSON null value. By default, fields
1191	// with empty values are omitted from API requests. However, any field
1192	// with an empty value appearing in NullFields will be sent to the
1193	// server as null. It is an error if a field in this list has a
1194	// non-empty value. This may be used to include null fields in Patch
1195	// requests.
1196	NullFields []string `json:"-"`
1197}
1198
1199func (s *GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary) MarshalJSON() ([]byte, error) {
1200	type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary
1201	raw := NoMethod(*s)
1202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1203}
1204
1205// GoogleIamV1AuditConfig: Specifies the audit configuration for a
1206// service. The configuration determines which permission types are
1207// logged, and what identities, if any, are exempted from logging. An
1208// AuditConfig must have one or more AuditLogConfigs. If there are
1209// AuditConfigs for both `allServices` and a specific service, the union
1210// of the two AuditConfigs is used for that service: the log_types
1211// specified in each AuditConfig are enabled, and the exempted_members
1212// in each AuditLogConfig are exempted. Example Policy with multiple
1213// AuditConfigs: { "audit_configs": [ { "service": "allServices",
1214// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members":
1215// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, {
1216// "log_type": "ADMIN_READ" } ] }, { "service":
1217// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type":
1218// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [
1219// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy
1220// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts
1221// jose@example.com from DATA_READ logging, and aliya@example.com from
1222// DATA_WRITE logging.
1223type GoogleIamV1AuditConfig struct {
1224	// AuditLogConfigs: The configuration for logging of each type of
1225	// permission.
1226	AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"`
1227
1228	// Service: Specifies a service that will be enabled for audit logging.
1229	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1230	// `allServices` is a special value that covers all services.
1231	Service string `json:"service,omitempty"`
1232
1233	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
1234	// unconditionally include in API requests. By default, fields with
1235	// empty or default values are omitted from API requests. However, any
1236	// non-pointer, non-interface field appearing in ForceSendFields will be
1237	// sent to the server regardless of whether the field is empty or not.
1238	// This may be used to include empty fields in Patch requests.
1239	ForceSendFields []string `json:"-"`
1240
1241	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
1242	// include in API requests with the JSON null value. By default, fields
1243	// with empty values are omitted from API requests. However, any field
1244	// with an empty value appearing in NullFields will be sent to the
1245	// server as null. It is an error if a field in this list has a
1246	// non-empty value. This may be used to include null fields in Patch
1247	// requests.
1248	NullFields []string `json:"-"`
1249}
1250
1251func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) {
1252	type NoMethod GoogleIamV1AuditConfig
1253	raw := NoMethod(*s)
1254	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1255}
1256
1257// GoogleIamV1AuditLogConfig: Provides the configuration for logging a
1258// type of permissions. Example: { "audit_log_configs": [ { "log_type":
1259// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, {
1260// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and
1261// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ
1262// logging.
1263type GoogleIamV1AuditLogConfig struct {
1264	// ExemptedMembers: Specifies the identities that do not cause logging
1265	// for this type of permission. Follows the same format of
1266	// Binding.members.
1267	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
1268
1269	// LogType: The log type that this config enables.
1270	//
1271	// Possible values:
1272	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
1273	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
1274	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
1275	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
1276	LogType string `json:"logType,omitempty"`
1277
1278	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
1279	// unconditionally include in API requests. By default, fields with
1280	// empty or default values are omitted from API requests. However, any
1281	// non-pointer, non-interface field appearing in ForceSendFields will be
1282	// sent to the server regardless of whether the field is empty or not.
1283	// This may be used to include empty fields in Patch requests.
1284	ForceSendFields []string `json:"-"`
1285
1286	// NullFields is a list of field names (e.g. "ExemptedMembers") to
1287	// include in API requests with the JSON null value. By default, fields
1288	// with empty values are omitted from API requests. However, any field
1289	// with an empty value appearing in NullFields will be sent to the
1290	// server as null. It is an error if a field in this list has a
1291	// non-empty value. This may be used to include null fields in Patch
1292	// requests.
1293	NullFields []string `json:"-"`
1294}
1295
1296func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) {
1297	type NoMethod GoogleIamV1AuditLogConfig
1298	raw := NoMethod(*s)
1299	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1300}
1301
1302// GoogleIamV1Binding: Associates `members`, or principals, with a
1303// `role`.
1304type GoogleIamV1Binding struct {
1305	// Condition: The condition that is associated with this binding. If the
1306	// condition evaluates to `true`, then this binding applies to the
1307	// current request. If the condition evaluates to `false`, then this
1308	// binding does not apply to the current request. However, a different
1309	// role binding might grant the same role to one or more of the
1310	// principals in this binding. To learn which resources support
1311	// conditions in their IAM policies, see the IAM documentation
1312	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1313	Condition *GoogleTypeExpr `json:"condition,omitempty"`
1314
1315	// Members: Specifies the principals requesting access for a Cloud
1316	// Platform resource. `members` can have the following values: *
1317	// `allUsers`: A special identifier that represents anyone who is on the
1318	// internet; with or without a Google account. *
1319	// `allAuthenticatedUsers`: A special identifier that represents anyone
1320	// who is authenticated with a Google account or a service account. *
1321	// `user:{emailid}`: An email address that represents a specific Google
1322	// account. For example, `alice@example.com` . *
1323	// `serviceAccount:{emailid}`: An email address that represents a
1324	// service account. For example,
1325	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
1326	// email address that represents a Google group. For example,
1327	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
1328	// email address (plus unique identifier) representing a user that has
1329	// been recently deleted. For example,
1330	// `alice@example.com?uid=123456789012345678901`. If the user is
1331	// recovered, this value reverts to `user:{emailid}` and the recovered
1332	// user retains the role in the binding. *
1333	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
1334	// (plus unique identifier) representing a service account that has been
1335	// recently deleted. For example,
1336	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1337	// If the service account is undeleted, this value reverts to
1338	// `serviceAccount:{emailid}` and the undeleted service account retains
1339	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
1340	// An email address (plus unique identifier) representing a Google group
1341	// that has been recently deleted. For example,
1342	// `admins@example.com?uid=123456789012345678901`. If the group is
1343	// recovered, this value reverts to `group:{emailid}` and the recovered
1344	// group retains the role in the binding. * `domain:{domain}`: The G
1345	// Suite domain (primary) that represents all the users of that domain.
1346	// For example, `google.com` or `example.com`.
1347	Members []string `json:"members,omitempty"`
1348
1349	// Role: Role that is assigned to the list of `members`, or principals.
1350	// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1351	Role string `json:"role,omitempty"`
1352
1353	// ForceSendFields is a list of field names (e.g. "Condition") to
1354	// unconditionally include in API requests. By default, fields with
1355	// empty or default values are omitted from API requests. However, any
1356	// non-pointer, non-interface field appearing in ForceSendFields will be
1357	// sent to the server regardless of whether the field is empty or not.
1358	// This may be used to include empty fields in Patch requests.
1359	ForceSendFields []string `json:"-"`
1360
1361	// NullFields is a list of field names (e.g. "Condition") to include in
1362	// API requests with the JSON null value. By default, fields with empty
1363	// values are omitted from API requests. However, any field with an
1364	// empty value appearing in NullFields will be sent to the server as
1365	// null. It is an error if a field in this list has a non-empty value.
1366	// This may be used to include null fields in Patch requests.
1367	NullFields []string `json:"-"`
1368}
1369
1370func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) {
1371	type NoMethod GoogleIamV1Binding
1372	raw := NoMethod(*s)
1373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1374}
1375
1376// GoogleIamV1Policy: An Identity and Access Management (IAM) policy,
1377// which specifies access controls for Google Cloud resources. A
1378// `Policy` is a collection of `bindings`. A `binding` binds one or more
1379// `members`, or principals, to a single `role`. Principals can be user
1380// accounts, service accounts, Google groups, and domains (such as G
1381// Suite). A `role` is a named list of permissions; each `role` can be
1382// an IAM predefined role or a user-created custom role. For some types
1383// of Google Cloud resources, a `binding` can also specify a
1384// `condition`, which is a logical expression that allows access to a
1385// resource only if the expression evaluates to `true`. A condition can
1386// add constraints based on attributes of the request, the resource, or
1387// both. To learn which resources support conditions in their IAM
1388// policies, see the IAM documentation
1389// (https://cloud.google.com/iam/help/conditions/resource-policies).
1390// **JSON example:** { "bindings": [ { "role":
1391// "roles/resourcemanager.organizationAdmin", "members": [
1392// "user:mike@example.com", "group:admins@example.com",
1393// "domain:google.com",
1394// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
1395// "role": "roles/resourcemanager.organizationViewer", "members": [
1396// "user:eve@example.com" ], "condition": { "title": "expirable access",
1397// "description": "Does not grant access after Sep 2020", "expression":
1398// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
1399// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
1400// members: - user:mike@example.com - group:admins@example.com -
1401// domain:google.com -
1402// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
1403// roles/resourcemanager.organizationAdmin - members: -
1404// user:eve@example.com role: roles/resourcemanager.organizationViewer
1405// condition: title: expirable access description: Does not grant access
1406// after Sep 2020 expression: request.time <
1407// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3
1408// For a description of IAM and its features, see the IAM documentation
1409// (https://cloud.google.com/iam/docs/).
1410type GoogleIamV1Policy struct {
1411	// AuditConfigs: Specifies cloud audit logging configuration for this
1412	// policy.
1413	AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"`
1414
1415	// Bindings: Associates a list of `members`, or principals, with a
1416	// `role`. Optionally, may specify a `condition` that determines how and
1417	// when the `bindings` are applied. Each of the `bindings` must contain
1418	// at least one principal. The `bindings` in a `Policy` can refer to up
1419	// to 1,500 principals; up to 250 of these principals can be Google
1420	// groups. Each occurrence of a principal counts towards these limits.
1421	// For example, if the `bindings` grant 50 different roles to
1422	// `user:alice@example.com`, and not to any other principal, then you
1423	// can add another 1,450 principals to the `bindings` in the `Policy`.
1424	Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"`
1425
1426	// Etag: `etag` is used for optimistic concurrency control as a way to
1427	// help prevent simultaneous updates of a policy from overwriting each
1428	// other. It is strongly suggested that systems make use of the `etag`
1429	// in the read-modify-write cycle to perform policy updates in order to
1430	// avoid race conditions: An `etag` is returned in the response to
1431	// `getIamPolicy`, and systems are expected to put that etag in the
1432	// request to `setIamPolicy` to ensure that their change will be applied
1433	// to the same version of the policy. **Important:** If you use IAM
1434	// Conditions, you must include the `etag` field whenever you call
1435	// `setIamPolicy`. If you omit this field, then IAM allows you to
1436	// overwrite a version `3` policy with a version `1` policy, and all of
1437	// the conditions in the version `3` policy are lost.
1438	Etag string `json:"etag,omitempty"`
1439
1440	// Version: Specifies the format of the policy. Valid values are `0`,
1441	// `1`, and `3`. Requests that specify an invalid value are rejected.
1442	// Any operation that affects conditional role bindings must specify
1443	// version `3`. This requirement applies to the following operations: *
1444	// Getting a policy that includes a conditional role binding * Adding a
1445	// conditional role binding to a policy * Changing a conditional role
1446	// binding in a policy * Removing any role binding, with or without a
1447	// condition, from a policy that includes conditions **Important:** If
1448	// you use IAM Conditions, you must include the `etag` field whenever
1449	// you call `setIamPolicy`. If you omit this field, then IAM allows you
1450	// to overwrite a version `3` policy with a version `1` policy, and all
1451	// of the conditions in the version `3` policy are lost. If a policy
1452	// does not include any conditions, operations on that policy may
1453	// specify any valid version or leave the field unset. To learn which
1454	// resources support conditions in their IAM policies, see the IAM
1455	// documentation
1456	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1457	Version int64 `json:"version,omitempty"`
1458
1459	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
1460	// unconditionally include in API requests. By default, fields with
1461	// empty or default values are omitted from API requests. However, any
1462	// non-pointer, non-interface field appearing in ForceSendFields will be
1463	// sent to the server regardless of whether the field is empty or not.
1464	// This may be used to include empty fields in Patch requests.
1465	ForceSendFields []string `json:"-"`
1466
1467	// NullFields is a list of field names (e.g. "AuditConfigs") to include
1468	// in API requests with the JSON null value. By default, fields with
1469	// empty values are omitted from API requests. However, any field with
1470	// an empty value appearing in NullFields will be sent to the server as
1471	// null. It is an error if a field in this list has a non-empty value.
1472	// This may be used to include null fields in Patch requests.
1473	NullFields []string `json:"-"`
1474}
1475
1476func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) {
1477	type NoMethod GoogleIamV1Policy
1478	raw := NoMethod(*s)
1479	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1480}
1481
1482// GoogleLongrunningListOperationsResponse: The response message for
1483// Operations.ListOperations.
1484type GoogleLongrunningListOperationsResponse struct {
1485	// NextPageToken: The standard List next-page token.
1486	NextPageToken string `json:"nextPageToken,omitempty"`
1487
1488	// Operations: A list of operations that matches the specified filter in
1489	// the request.
1490	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
1491
1492	// ServerResponse contains the HTTP response code and headers from the
1493	// server.
1494	googleapi.ServerResponse `json:"-"`
1495
1496	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1497	// unconditionally include in API requests. By default, fields with
1498	// empty or default values are omitted from API requests. However, any
1499	// non-pointer, non-interface field appearing in ForceSendFields will be
1500	// sent to the server regardless of whether the field is empty or not.
1501	// This may be used to include empty fields in Patch requests.
1502	ForceSendFields []string `json:"-"`
1503
1504	// NullFields is a list of field names (e.g. "NextPageToken") to include
1505	// in API requests with the JSON null value. By default, fields with
1506	// empty values are omitted from API requests. However, any field with
1507	// an empty value appearing in NullFields will be sent to the server as
1508	// null. It is an error if a field in this list has a non-empty value.
1509	// This may be used to include null fields in Patch requests.
1510	NullFields []string `json:"-"`
1511}
1512
1513func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
1514	type NoMethod GoogleLongrunningListOperationsResponse
1515	raw := NoMethod(*s)
1516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1517}
1518
1519// GoogleLongrunningOperation: This resource represents a long-running
1520// operation that is the result of a network API call.
1521type GoogleLongrunningOperation struct {
1522	// Done: If the value is `false`, it means the operation is still in
1523	// progress. If `true`, the operation is completed, and either `error`
1524	// or `response` is available.
1525	Done bool `json:"done,omitempty"`
1526
1527	// Error: The error result of the operation in case of failure or
1528	// cancellation.
1529	Error *GoogleRpcStatus `json:"error,omitempty"`
1530
1531	// Metadata: Service-specific metadata associated with the operation. It
1532	// typically contains progress information and common metadata such as
1533	// create time. Some services might not provide such metadata. Any
1534	// method that returns a long-running operation should document the
1535	// metadata type, if any.
1536	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1537
1538	// Name: The server-assigned name, which is only unique within the same
1539	// service that originally returns it. If you use the default HTTP
1540	// mapping, the `name` should be a resource name ending with
1541	// `operations/{unique_id}`.
1542	Name string `json:"name,omitempty"`
1543
1544	// Response: The normal response of the operation in case of success. If
1545	// the original method returns no data on success, such as `Delete`, the
1546	// response is `google.protobuf.Empty`. If the original method is
1547	// standard `Get`/`Create`/`Update`, the response should be the
1548	// resource. For other methods, the response should have the type
1549	// `XxxResponse`, where `Xxx` is the original method name. For example,
1550	// if the original method name is `TakeSnapshot()`, the inferred
1551	// response type is `TakeSnapshotResponse`.
1552	Response googleapi.RawMessage `json:"response,omitempty"`
1553
1554	// ServerResponse contains the HTTP response code and headers from the
1555	// server.
1556	googleapi.ServerResponse `json:"-"`
1557
1558	// ForceSendFields is a list of field names (e.g. "Done") to
1559	// unconditionally include in API requests. By default, fields with
1560	// empty or default values are omitted from API requests. However, any
1561	// non-pointer, non-interface field appearing in ForceSendFields will be
1562	// sent to the server regardless of whether the field is empty or not.
1563	// This may be used to include empty fields in Patch requests.
1564	ForceSendFields []string `json:"-"`
1565
1566	// NullFields is a list of field names (e.g. "Done") to include in API
1567	// requests with the JSON null value. By default, fields with empty
1568	// values are omitted from API requests. However, any field with an
1569	// empty value appearing in NullFields will be sent to the server as
1570	// null. It is an error if a field in this list has a non-empty value.
1571	// This may be used to include null fields in Patch requests.
1572	NullFields []string `json:"-"`
1573}
1574
1575func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
1576	type NoMethod GoogleLongrunningOperation
1577	raw := NoMethod(*s)
1578	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1579}
1580
1581// GoogleRpcStatus: The `Status` type defines a logical error model that
1582// is suitable for different programming environments, including REST
1583// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1584// `Status` message contains three pieces of data: error code, error
1585// message, and error details. You can find out more about this error
1586// model and how to work with it in the API Design Guide
1587// (https://cloud.google.com/apis/design/errors).
1588type GoogleRpcStatus struct {
1589	// Code: The status code, which should be an enum value of
1590	// google.rpc.Code.
1591	Code int64 `json:"code,omitempty"`
1592
1593	// Details: A list of messages that carry the error details. There is a
1594	// common set of message types for APIs to use.
1595	Details []googleapi.RawMessage `json:"details,omitempty"`
1596
1597	// Message: A developer-facing error message, which should be in
1598	// English. Any user-facing error message should be localized and sent
1599	// in the google.rpc.Status.details field, or localized by the client.
1600	Message string `json:"message,omitempty"`
1601
1602	// ForceSendFields is a list of field names (e.g. "Code") to
1603	// unconditionally include in API requests. By default, fields with
1604	// empty or default values are omitted from API requests. However, any
1605	// non-pointer, non-interface field appearing in ForceSendFields will be
1606	// sent to the server regardless of whether the field is empty or not.
1607	// This may be used to include empty fields in Patch requests.
1608	ForceSendFields []string `json:"-"`
1609
1610	// NullFields is a list of field names (e.g. "Code") to include in API
1611	// requests with the JSON null value. By default, fields with empty
1612	// values are omitted from API requests. However, any field with an
1613	// empty value appearing in NullFields will be sent to the server as
1614	// null. It is an error if a field in this list has a non-empty value.
1615	// This may be used to include null fields in Patch requests.
1616	NullFields []string `json:"-"`
1617}
1618
1619func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
1620	type NoMethod GoogleRpcStatus
1621	raw := NoMethod(*s)
1622	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1623}
1624
1625// GoogleTypeDate: Represents a whole or partial calendar date, such as
1626// a birthday. The time of day and time zone are either specified
1627// elsewhere or are insignificant. The date is relative to the Gregorian
1628// Calendar. This can represent one of the following: * A full date,
1629// with non-zero year, month, and day values * A month and day value,
1630// with a zero year, such as an anniversary * A year on its own, with
1631// zero month and day values * A year and month value, with a zero day,
1632// such as a credit card expiration date Related types are
1633// google.type.TimeOfDay and `google.protobuf.Timestamp`.
1634type GoogleTypeDate struct {
1635	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
1636	// month, or 0 to specify a year by itself or a year and month where the
1637	// day isn't significant.
1638	Day int64 `json:"day,omitempty"`
1639
1640	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
1641	// without a month and day.
1642	Month int64 `json:"month,omitempty"`
1643
1644	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
1645	// date without a year.
1646	Year int64 `json:"year,omitempty"`
1647
1648	// ForceSendFields is a list of field names (e.g. "Day") to
1649	// unconditionally include in API requests. By default, fields with
1650	// empty or default values are omitted from API requests. However, any
1651	// non-pointer, non-interface field appearing in ForceSendFields will be
1652	// sent to the server regardless of whether the field is empty or not.
1653	// This may be used to include empty fields in Patch requests.
1654	ForceSendFields []string `json:"-"`
1655
1656	// NullFields is a list of field names (e.g. "Day") to include in API
1657	// requests with the JSON null value. By default, fields with empty
1658	// values are omitted from API requests. However, any field with an
1659	// empty value appearing in NullFields will be sent to the server as
1660	// null. It is an error if a field in this list has a non-empty value.
1661	// This may be used to include null fields in Patch requests.
1662	NullFields []string `json:"-"`
1663}
1664
1665func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
1666	type NoMethod GoogleTypeDate
1667	raw := NoMethod(*s)
1668	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1669}
1670
1671// GoogleTypeExpr: Represents a textual expression in the Common
1672// Expression Language (CEL) syntax. CEL is a C-like expression
1673// language. The syntax and semantics of CEL are documented at
1674// https://github.com/google/cel-spec. Example (Comparison): title:
1675// "Summary size limit" description: "Determines if a summary is less
1676// than 100 chars" expression: "document.summary.size() < 100" Example
1677// (Equality): title: "Requestor is owner" description: "Determines if
1678// requestor is the document owner" expression: "document.owner ==
1679// request.auth.claims.email" Example (Logic): title: "Public documents"
1680// description: "Determine whether the document should be publicly
1681// visible" expression: "document.type != 'private' && document.type !=
1682// 'internal'" Example (Data Manipulation): title: "Notification string"
1683// description: "Create a notification string with a timestamp."
1684// expression: "'New message received at ' +
1685// string(document.create_time)" The exact variables and functions that
1686// may be referenced within an expression are determined by the service
1687// that evaluates it. See the service documentation for additional
1688// information.
1689type GoogleTypeExpr struct {
1690	// Description: Optional. Description of the expression. This is a
1691	// longer text which describes the expression, e.g. when hovered over it
1692	// in a UI.
1693	Description string `json:"description,omitempty"`
1694
1695	// Expression: Textual representation of an expression in Common
1696	// Expression Language syntax.
1697	Expression string `json:"expression,omitempty"`
1698
1699	// Location: Optional. String indicating the location of the expression
1700	// for error reporting, e.g. a file name and a position in the file.
1701	Location string `json:"location,omitempty"`
1702
1703	// Title: Optional. Title for the expression, i.e. a short string
1704	// describing its purpose. This can be used e.g. in UIs which allow to
1705	// enter the expression.
1706	Title string `json:"title,omitempty"`
1707
1708	// ForceSendFields is a list of field names (e.g. "Description") to
1709	// unconditionally include in API requests. By default, fields with
1710	// empty or default values are omitted from API requests. However, any
1711	// non-pointer, non-interface field appearing in ForceSendFields will be
1712	// sent to the server regardless of whether the field is empty or not.
1713	// This may be used to include empty fields in Patch requests.
1714	ForceSendFields []string `json:"-"`
1715
1716	// NullFields is a list of field names (e.g. "Description") to include
1717	// in API requests with the JSON null value. By default, fields with
1718	// empty values are omitted from API requests. However, any field with
1719	// an empty value appearing in NullFields will be sent to the server as
1720	// null. It is an error if a field in this list has a non-empty value.
1721	// This may be used to include null fields in Patch requests.
1722	NullFields []string `json:"-"`
1723}
1724
1725func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) {
1726	type NoMethod GoogleTypeExpr
1727	raw := NoMethod(*s)
1728	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1729}
1730
1731// method id "policysimulator.folders.locations.replays.create":
1732
1733type FoldersLocationsReplaysCreateCall struct {
1734	s                                       *Service
1735	parent                                  string
1736	googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay
1737	urlParams_                              gensupport.URLParams
1738	ctx_                                    context.Context
1739	header_                                 http.Header
1740}
1741
1742// Create: Creates and starts a Replay using the given ReplayConfig.
1743//
1744// - parent: The parent resource where this Replay will be created. This
1745//   resource must be a project, folder, or organization with a
1746//   location. Example: `projects/my-example-project/locations/global`.
1747func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *FoldersLocationsReplaysCreateCall {
1748	c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1749	c.parent = parent
1750	c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay
1751	return c
1752}
1753
1754// Fields allows partial responses to be retrieved. See
1755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1756// for more information.
1757func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall {
1758	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1759	return c
1760}
1761
1762// Context sets the context to be used in this call's Do method. Any
1763// pending HTTP request will be aborted if the provided context is
1764// canceled.
1765func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall {
1766	c.ctx_ = ctx
1767	return c
1768}
1769
1770// Header returns an http.Header that can be modified by the caller to
1771// add HTTP headers to the request.
1772func (c *FoldersLocationsReplaysCreateCall) Header() http.Header {
1773	if c.header_ == nil {
1774		c.header_ = make(http.Header)
1775	}
1776	return c.header_
1777}
1778
1779func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
1780	reqHeaders := make(http.Header)
1781	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
1782	for k, v := range c.header_ {
1783		reqHeaders[k] = v
1784	}
1785	reqHeaders.Set("User-Agent", c.s.userAgent())
1786	var body io.Reader = nil
1787	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1beta1replay)
1788	if err != nil {
1789		return nil, err
1790	}
1791	reqHeaders.Set("Content-Type", "application/json")
1792	c.urlParams_.Set("alt", alt)
1793	c.urlParams_.Set("prettyPrint", "false")
1794	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays")
1795	urls += "?" + c.urlParams_.Encode()
1796	req, err := http.NewRequest("POST", urls, body)
1797	if err != nil {
1798		return nil, err
1799	}
1800	req.Header = reqHeaders
1801	googleapi.Expand(req.URL, map[string]string{
1802		"parent": c.parent,
1803	})
1804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1805}
1806
1807// Do executes the "policysimulator.folders.locations.replays.create" call.
1808// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
1809// Any non-2xx status code is an error. Response headers are in either
1810// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
1811// was returned at all) in error.(*googleapi.Error).Header. Use
1812// googleapi.IsNotModified to check whether the returned error was
1813// because http.StatusNotModified was returned.
1814func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
1815	gensupport.SetOptions(c.urlParams_, opts...)
1816	res, err := c.doRequest("json")
1817	if res != nil && res.StatusCode == http.StatusNotModified {
1818		if res.Body != nil {
1819			res.Body.Close()
1820		}
1821		return nil, &googleapi.Error{
1822			Code:   res.StatusCode,
1823			Header: res.Header,
1824		}
1825	}
1826	if err != nil {
1827		return nil, err
1828	}
1829	defer googleapi.CloseBody(res)
1830	if err := googleapi.CheckResponse(res); err != nil {
1831		return nil, err
1832	}
1833	ret := &GoogleLongrunningOperation{
1834		ServerResponse: googleapi.ServerResponse{
1835			Header:         res.Header,
1836			HTTPStatusCode: res.StatusCode,
1837		},
1838	}
1839	target := &ret
1840	if err := gensupport.DecodeResponse(target, res); err != nil {
1841		return nil, err
1842	}
1843	return ret, nil
1844	// {
1845	//   "description": "Creates and starts a Replay using the given ReplayConfig.",
1846	//   "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays",
1847	//   "httpMethod": "POST",
1848	//   "id": "policysimulator.folders.locations.replays.create",
1849	//   "parameterOrder": [
1850	//     "parent"
1851	//   ],
1852	//   "parameters": {
1853	//     "parent": {
1854	//       "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`",
1855	//       "location": "path",
1856	//       "pattern": "^folders/[^/]+/locations/[^/]+$",
1857	//       "required": true,
1858	//       "type": "string"
1859	//     }
1860	//   },
1861	//   "path": "v1beta1/{+parent}/replays",
1862	//   "request": {
1863	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
1864	//   },
1865	//   "response": {
1866	//     "$ref": "GoogleLongrunningOperation"
1867	//   },
1868	//   "scopes": [
1869	//     "https://www.googleapis.com/auth/cloud-platform"
1870	//   ]
1871	// }
1872
1873}
1874
1875// method id "policysimulator.folders.locations.replays.get":
1876
1877type FoldersLocationsReplaysGetCall struct {
1878	s            *Service
1879	name         string
1880	urlParams_   gensupport.URLParams
1881	ifNoneMatch_ string
1882	ctx_         context.Context
1883	header_      http.Header
1884}
1885
1886// Get: Gets the specified Replay. Each `Replay` is available for at
1887// least 7 days.
1888//
1889// - name: The name of the Replay to retrieve, in the following format:
1890//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
1891//   lays/{replay-id}`, where `{resource-id}` is the ID of the project,
1892//   folder, or organization that owns the `Replay`. Example:
1893//   `projects/my-example-project/locations/global/replays/506a5f7f-38ce-
1894//   4d7d-8e03-479ce1833c36`.
1895func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall {
1896	c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1897	c.name = name
1898	return c
1899}
1900
1901// Fields allows partial responses to be retrieved. See
1902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1903// for more information.
1904func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall {
1905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1906	return c
1907}
1908
1909// IfNoneMatch sets the optional parameter which makes the operation
1910// fail if the object's ETag matches the given value. This is useful for
1911// getting updates only after the object has changed since the last
1912// request. Use googleapi.IsNotModified to check whether the response
1913// error from Do is the result of In-None-Match.
1914func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall {
1915	c.ifNoneMatch_ = entityTag
1916	return c
1917}
1918
1919// Context sets the context to be used in this call's Do method. Any
1920// pending HTTP request will be aborted if the provided context is
1921// canceled.
1922func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall {
1923	c.ctx_ = ctx
1924	return c
1925}
1926
1927// Header returns an http.Header that can be modified by the caller to
1928// add HTTP headers to the request.
1929func (c *FoldersLocationsReplaysGetCall) Header() http.Header {
1930	if c.header_ == nil {
1931		c.header_ = make(http.Header)
1932	}
1933	return c.header_
1934}
1935
1936func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
1937	reqHeaders := make(http.Header)
1938	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
1939	for k, v := range c.header_ {
1940		reqHeaders[k] = v
1941	}
1942	reqHeaders.Set("User-Agent", c.s.userAgent())
1943	if c.ifNoneMatch_ != "" {
1944		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1945	}
1946	var body io.Reader = nil
1947	c.urlParams_.Set("alt", alt)
1948	c.urlParams_.Set("prettyPrint", "false")
1949	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1950	urls += "?" + c.urlParams_.Encode()
1951	req, err := http.NewRequest("GET", urls, body)
1952	if err != nil {
1953		return nil, err
1954	}
1955	req.Header = reqHeaders
1956	googleapi.Expand(req.URL, map[string]string{
1957		"name": c.name,
1958	})
1959	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1960}
1961
1962// Do executes the "policysimulator.folders.locations.replays.get" call.
1963// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will
1964// be non-nil. Any non-2xx status code is an error. Response headers are
1965// in either
1966// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if
1967// a response was returned at all) in error.(*googleapi.Error).Header.
1968// Use googleapi.IsNotModified to check whether the returned error was
1969// because http.StatusNotModified was returned.
1970func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) {
1971	gensupport.SetOptions(c.urlParams_, opts...)
1972	res, err := c.doRequest("json")
1973	if res != nil && res.StatusCode == http.StatusNotModified {
1974		if res.Body != nil {
1975			res.Body.Close()
1976		}
1977		return nil, &googleapi.Error{
1978			Code:   res.StatusCode,
1979			Header: res.Header,
1980		}
1981	}
1982	if err != nil {
1983		return nil, err
1984	}
1985	defer googleapi.CloseBody(res)
1986	if err := googleapi.CheckResponse(res); err != nil {
1987		return nil, err
1988	}
1989	ret := &GoogleCloudPolicysimulatorV1beta1Replay{
1990		ServerResponse: googleapi.ServerResponse{
1991			Header:         res.Header,
1992			HTTPStatusCode: res.StatusCode,
1993		},
1994	}
1995	target := &ret
1996	if err := gensupport.DecodeResponse(target, res); err != nil {
1997		return nil, err
1998	}
1999	return ret, nil
2000	// {
2001	//   "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.",
2002	//   "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}",
2003	//   "httpMethod": "GET",
2004	//   "id": "policysimulator.folders.locations.replays.get",
2005	//   "parameterOrder": [
2006	//     "name"
2007	//   ],
2008	//   "parameters": {
2009	//     "name": {
2010	//       "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
2011	//       "location": "path",
2012	//       "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$",
2013	//       "required": true,
2014	//       "type": "string"
2015	//     }
2016	//   },
2017	//   "path": "v1beta1/{+name}",
2018	//   "response": {
2019	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
2020	//   },
2021	//   "scopes": [
2022	//     "https://www.googleapis.com/auth/cloud-platform"
2023	//   ]
2024	// }
2025
2026}
2027
2028// method id "policysimulator.folders.locations.replays.results.list":
2029
2030type FoldersLocationsReplaysResultsListCall struct {
2031	s            *Service
2032	parent       string
2033	urlParams_   gensupport.URLParams
2034	ifNoneMatch_ string
2035	ctx_         context.Context
2036	header_      http.Header
2037}
2038
2039// List: Lists the results of running a Replay.
2040//
2041// - parent: The Replay whose results are listed, in the following
2042//   format:
2043//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
2044//   lays/{replay-id}` Example:
2045//   `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0
2046//   3-479ce1833c36`.
2047func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall {
2048	c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2049	c.parent = parent
2050	return c
2051}
2052
2053// PageSize sets the optional parameter "pageSize": The maximum number
2054// of ReplayResult objects to return. Defaults to 5000. The maximum
2055// value is 5000; values above 5000 are rounded down to 5000.
2056func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall {
2057	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2058	return c
2059}
2060
2061// PageToken sets the optional parameter "pageToken": A page token,
2062// received from a previous Simulator.ListReplayResults call. Provide
2063// this token to retrieve the next page of results. When paginating, all
2064// other parameters provided to [Simulator.ListReplayResults[] must
2065// match the call that provided the page token.
2066func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall {
2067	c.urlParams_.Set("pageToken", pageToken)
2068	return c
2069}
2070
2071// Fields allows partial responses to be retrieved. See
2072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2073// for more information.
2074func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall {
2075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2076	return c
2077}
2078
2079// IfNoneMatch sets the optional parameter which makes the operation
2080// fail if the object's ETag matches the given value. This is useful for
2081// getting updates only after the object has changed since the last
2082// request. Use googleapi.IsNotModified to check whether the response
2083// error from Do is the result of In-None-Match.
2084func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall {
2085	c.ifNoneMatch_ = entityTag
2086	return c
2087}
2088
2089// Context sets the context to be used in this call's Do method. Any
2090// pending HTTP request will be aborted if the provided context is
2091// canceled.
2092func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall {
2093	c.ctx_ = ctx
2094	return c
2095}
2096
2097// Header returns an http.Header that can be modified by the caller to
2098// add HTTP headers to the request.
2099func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header {
2100	if c.header_ == nil {
2101		c.header_ = make(http.Header)
2102	}
2103	return c.header_
2104}
2105
2106func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
2107	reqHeaders := make(http.Header)
2108	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2109	for k, v := range c.header_ {
2110		reqHeaders[k] = v
2111	}
2112	reqHeaders.Set("User-Agent", c.s.userAgent())
2113	if c.ifNoneMatch_ != "" {
2114		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2115	}
2116	var body io.Reader = nil
2117	c.urlParams_.Set("alt", alt)
2118	c.urlParams_.Set("prettyPrint", "false")
2119	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results")
2120	urls += "?" + c.urlParams_.Encode()
2121	req, err := http.NewRequest("GET", urls, body)
2122	if err != nil {
2123		return nil, err
2124	}
2125	req.Header = reqHeaders
2126	googleapi.Expand(req.URL, map[string]string{
2127		"parent": c.parent,
2128	})
2129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2130}
2131
2132// Do executes the "policysimulator.folders.locations.replays.results.list" call.
2133// Exactly one of
2134// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error
2135// will be non-nil. Any non-2xx status code is an error. Response
2136// headers are in either
2137// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp
2138// onse.Header or (if a response was returned at all) in
2139// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2140// whether the returned error was because http.StatusNotModified was
2141// returned.
2142func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) {
2143	gensupport.SetOptions(c.urlParams_, opts...)
2144	res, err := c.doRequest("json")
2145	if res != nil && res.StatusCode == http.StatusNotModified {
2146		if res.Body != nil {
2147			res.Body.Close()
2148		}
2149		return nil, &googleapi.Error{
2150			Code:   res.StatusCode,
2151			Header: res.Header,
2152		}
2153	}
2154	if err != nil {
2155		return nil, err
2156	}
2157	defer googleapi.CloseBody(res)
2158	if err := googleapi.CheckResponse(res); err != nil {
2159		return nil, err
2160	}
2161	ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{
2162		ServerResponse: googleapi.ServerResponse{
2163			Header:         res.Header,
2164			HTTPStatusCode: res.StatusCode,
2165		},
2166	}
2167	target := &ret
2168	if err := gensupport.DecodeResponse(target, res); err != nil {
2169		return nil, err
2170	}
2171	return ret, nil
2172	// {
2173	//   "description": "Lists the results of running a Replay.",
2174	//   "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results",
2175	//   "httpMethod": "GET",
2176	//   "id": "policysimulator.folders.locations.replays.results.list",
2177	//   "parameterOrder": [
2178	//     "parent"
2179	//   ],
2180	//   "parameters": {
2181	//     "pageSize": {
2182	//       "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.",
2183	//       "format": "int32",
2184	//       "location": "query",
2185	//       "type": "integer"
2186	//     },
2187	//     "pageToken": {
2188	//       "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.",
2189	//       "location": "query",
2190	//       "type": "string"
2191	//     },
2192	//     "parent": {
2193	//       "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
2194	//       "location": "path",
2195	//       "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$",
2196	//       "required": true,
2197	//       "type": "string"
2198	//     }
2199	//   },
2200	//   "path": "v1beta1/{+parent}/results",
2201	//   "response": {
2202	//     "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse"
2203	//   },
2204	//   "scopes": [
2205	//     "https://www.googleapis.com/auth/cloud-platform"
2206	//   ]
2207	// }
2208
2209}
2210
2211// Pages invokes f for each page of results.
2212// A non-nil error returned from f will halt the iteration.
2213// The provided context supersedes any context provided to the Context method.
2214func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error {
2215	c.ctx_ = ctx
2216	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2217	for {
2218		x, err := c.Do()
2219		if err != nil {
2220			return err
2221		}
2222		if err := f(x); err != nil {
2223			return err
2224		}
2225		if x.NextPageToken == "" {
2226			return nil
2227		}
2228		c.PageToken(x.NextPageToken)
2229	}
2230}
2231
2232// method id "policysimulator.operations.get":
2233
2234type OperationsGetCall struct {
2235	s            *Service
2236	name         string
2237	urlParams_   gensupport.URLParams
2238	ifNoneMatch_ string
2239	ctx_         context.Context
2240	header_      http.Header
2241}
2242
2243// Get: Gets the latest state of a long-running operation. Clients can
2244// use this method to poll the operation result at intervals as
2245// recommended by the API service.
2246//
2247// - name: The name of the operation resource.
2248func (r *OperationsService) Get(name string) *OperationsGetCall {
2249	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2250	c.name = name
2251	return c
2252}
2253
2254// Fields allows partial responses to be retrieved. See
2255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2256// for more information.
2257func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
2258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2259	return c
2260}
2261
2262// IfNoneMatch sets the optional parameter which makes the operation
2263// fail if the object's ETag matches the given value. This is useful for
2264// getting updates only after the object has changed since the last
2265// request. Use googleapi.IsNotModified to check whether the response
2266// error from Do is the result of In-None-Match.
2267func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
2268	c.ifNoneMatch_ = entityTag
2269	return c
2270}
2271
2272// Context sets the context to be used in this call's Do method. Any
2273// pending HTTP request will be aborted if the provided context is
2274// canceled.
2275func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
2276	c.ctx_ = ctx
2277	return c
2278}
2279
2280// Header returns an http.Header that can be modified by the caller to
2281// add HTTP headers to the request.
2282func (c *OperationsGetCall) Header() http.Header {
2283	if c.header_ == nil {
2284		c.header_ = make(http.Header)
2285	}
2286	return c.header_
2287}
2288
2289func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
2290	reqHeaders := make(http.Header)
2291	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2292	for k, v := range c.header_ {
2293		reqHeaders[k] = v
2294	}
2295	reqHeaders.Set("User-Agent", c.s.userAgent())
2296	if c.ifNoneMatch_ != "" {
2297		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2298	}
2299	var body io.Reader = nil
2300	c.urlParams_.Set("alt", alt)
2301	c.urlParams_.Set("prettyPrint", "false")
2302	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2303	urls += "?" + c.urlParams_.Encode()
2304	req, err := http.NewRequest("GET", urls, body)
2305	if err != nil {
2306		return nil, err
2307	}
2308	req.Header = reqHeaders
2309	googleapi.Expand(req.URL, map[string]string{
2310		"name": c.name,
2311	})
2312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2313}
2314
2315// Do executes the "policysimulator.operations.get" call.
2316// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
2317// Any non-2xx status code is an error. Response headers are in either
2318// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
2319// was returned at all) in error.(*googleapi.Error).Header. Use
2320// googleapi.IsNotModified to check whether the returned error was
2321// because http.StatusNotModified was returned.
2322func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2323	gensupport.SetOptions(c.urlParams_, opts...)
2324	res, err := c.doRequest("json")
2325	if res != nil && res.StatusCode == http.StatusNotModified {
2326		if res.Body != nil {
2327			res.Body.Close()
2328		}
2329		return nil, &googleapi.Error{
2330			Code:   res.StatusCode,
2331			Header: res.Header,
2332		}
2333	}
2334	if err != nil {
2335		return nil, err
2336	}
2337	defer googleapi.CloseBody(res)
2338	if err := googleapi.CheckResponse(res); err != nil {
2339		return nil, err
2340	}
2341	ret := &GoogleLongrunningOperation{
2342		ServerResponse: googleapi.ServerResponse{
2343			Header:         res.Header,
2344			HTTPStatusCode: res.StatusCode,
2345		},
2346	}
2347	target := &ret
2348	if err := gensupport.DecodeResponse(target, res); err != nil {
2349		return nil, err
2350	}
2351	return ret, nil
2352	// {
2353	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
2354	//   "flatPath": "v1beta1/operations/{operationsId}",
2355	//   "httpMethod": "GET",
2356	//   "id": "policysimulator.operations.get",
2357	//   "parameterOrder": [
2358	//     "name"
2359	//   ],
2360	//   "parameters": {
2361	//     "name": {
2362	//       "description": "The name of the operation resource.",
2363	//       "location": "path",
2364	//       "pattern": "^operations/[^/]+$",
2365	//       "required": true,
2366	//       "type": "string"
2367	//     }
2368	//   },
2369	//   "path": "v1beta1/{+name}",
2370	//   "response": {
2371	//     "$ref": "GoogleLongrunningOperation"
2372	//   },
2373	//   "scopes": [
2374	//     "https://www.googleapis.com/auth/cloud-platform"
2375	//   ]
2376	// }
2377
2378}
2379
2380// method id "policysimulator.operations.list":
2381
2382type OperationsListCall struct {
2383	s            *Service
2384	urlParams_   gensupport.URLParams
2385	ifNoneMatch_ string
2386	ctx_         context.Context
2387	header_      http.Header
2388}
2389
2390// List: Lists operations that match the specified filter in the
2391// request. If the server doesn't support this method, it returns
2392// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
2393// override the binding to use different resource name schemes, such as
2394// `users/*/operations`. To override the binding, API services can add a
2395// binding such as "/v1/{name=users/*}/operations" to their service
2396// configuration. For backwards compatibility, the default name includes
2397// the operations collection id, however overriding users must ensure
2398// the name binding is the parent resource, without the operations
2399// collection id.
2400func (r *OperationsService) List() *OperationsListCall {
2401	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2402	return c
2403}
2404
2405// Filter sets the optional parameter "filter": The standard list
2406// filter.
2407func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
2408	c.urlParams_.Set("filter", filter)
2409	return c
2410}
2411
2412// Name sets the optional parameter "name": The name of the operation's
2413// parent resource.
2414func (c *OperationsListCall) Name(name string) *OperationsListCall {
2415	c.urlParams_.Set("name", name)
2416	return c
2417}
2418
2419// PageSize sets the optional parameter "pageSize": The standard list
2420// page size.
2421func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
2422	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2423	return c
2424}
2425
2426// PageToken sets the optional parameter "pageToken": The standard list
2427// page token.
2428func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
2429	c.urlParams_.Set("pageToken", pageToken)
2430	return c
2431}
2432
2433// Fields allows partial responses to be retrieved. See
2434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2435// for more information.
2436func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
2437	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2438	return c
2439}
2440
2441// IfNoneMatch sets the optional parameter which makes the operation
2442// fail if the object's ETag matches the given value. This is useful for
2443// getting updates only after the object has changed since the last
2444// request. Use googleapi.IsNotModified to check whether the response
2445// error from Do is the result of In-None-Match.
2446func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
2447	c.ifNoneMatch_ = entityTag
2448	return c
2449}
2450
2451// Context sets the context to be used in this call's Do method. Any
2452// pending HTTP request will be aborted if the provided context is
2453// canceled.
2454func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
2455	c.ctx_ = ctx
2456	return c
2457}
2458
2459// Header returns an http.Header that can be modified by the caller to
2460// add HTTP headers to the request.
2461func (c *OperationsListCall) Header() http.Header {
2462	if c.header_ == nil {
2463		c.header_ = make(http.Header)
2464	}
2465	return c.header_
2466}
2467
2468func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
2469	reqHeaders := make(http.Header)
2470	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2471	for k, v := range c.header_ {
2472		reqHeaders[k] = v
2473	}
2474	reqHeaders.Set("User-Agent", c.s.userAgent())
2475	if c.ifNoneMatch_ != "" {
2476		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2477	}
2478	var body io.Reader = nil
2479	c.urlParams_.Set("alt", alt)
2480	c.urlParams_.Set("prettyPrint", "false")
2481	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/operations")
2482	urls += "?" + c.urlParams_.Encode()
2483	req, err := http.NewRequest("GET", urls, body)
2484	if err != nil {
2485		return nil, err
2486	}
2487	req.Header = reqHeaders
2488	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2489}
2490
2491// Do executes the "policysimulator.operations.list" call.
2492// Exactly one of *GoogleLongrunningListOperationsResponse or error will
2493// be non-nil. Any non-2xx status code is an error. Response headers are
2494// in either
2495// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
2496// a response was returned at all) in error.(*googleapi.Error).Header.
2497// Use googleapi.IsNotModified to check whether the returned error was
2498// because http.StatusNotModified was returned.
2499func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
2500	gensupport.SetOptions(c.urlParams_, opts...)
2501	res, err := c.doRequest("json")
2502	if res != nil && res.StatusCode == http.StatusNotModified {
2503		if res.Body != nil {
2504			res.Body.Close()
2505		}
2506		return nil, &googleapi.Error{
2507			Code:   res.StatusCode,
2508			Header: res.Header,
2509		}
2510	}
2511	if err != nil {
2512		return nil, err
2513	}
2514	defer googleapi.CloseBody(res)
2515	if err := googleapi.CheckResponse(res); err != nil {
2516		return nil, err
2517	}
2518	ret := &GoogleLongrunningListOperationsResponse{
2519		ServerResponse: googleapi.ServerResponse{
2520			Header:         res.Header,
2521			HTTPStatusCode: res.StatusCode,
2522		},
2523	}
2524	target := &ret
2525	if err := gensupport.DecodeResponse(target, res); err != nil {
2526		return nil, err
2527	}
2528	return ret, nil
2529	// {
2530	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
2531	//   "flatPath": "v1beta1/operations",
2532	//   "httpMethod": "GET",
2533	//   "id": "policysimulator.operations.list",
2534	//   "parameterOrder": [],
2535	//   "parameters": {
2536	//     "filter": {
2537	//       "description": "The standard list filter.",
2538	//       "location": "query",
2539	//       "type": "string"
2540	//     },
2541	//     "name": {
2542	//       "description": "The name of the operation's parent resource.",
2543	//       "location": "query",
2544	//       "type": "string"
2545	//     },
2546	//     "pageSize": {
2547	//       "description": "The standard list page size.",
2548	//       "format": "int32",
2549	//       "location": "query",
2550	//       "type": "integer"
2551	//     },
2552	//     "pageToken": {
2553	//       "description": "The standard list page token.",
2554	//       "location": "query",
2555	//       "type": "string"
2556	//     }
2557	//   },
2558	//   "path": "v1beta1/operations",
2559	//   "response": {
2560	//     "$ref": "GoogleLongrunningListOperationsResponse"
2561	//   },
2562	//   "scopes": [
2563	//     "https://www.googleapis.com/auth/cloud-platform"
2564	//   ]
2565	// }
2566
2567}
2568
2569// Pages invokes f for each page of results.
2570// A non-nil error returned from f will halt the iteration.
2571// The provided context supersedes any context provided to the Context method.
2572func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
2573	c.ctx_ = ctx
2574	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2575	for {
2576		x, err := c.Do()
2577		if err != nil {
2578			return err
2579		}
2580		if err := f(x); err != nil {
2581			return err
2582		}
2583		if x.NextPageToken == "" {
2584			return nil
2585		}
2586		c.PageToken(x.NextPageToken)
2587	}
2588}
2589
2590// method id "policysimulator.organizations.locations.replays.create":
2591
2592type OrganizationsLocationsReplaysCreateCall struct {
2593	s                                       *Service
2594	parent                                  string
2595	googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay
2596	urlParams_                              gensupport.URLParams
2597	ctx_                                    context.Context
2598	header_                                 http.Header
2599}
2600
2601// Create: Creates and starts a Replay using the given ReplayConfig.
2602//
2603// - parent: The parent resource where this Replay will be created. This
2604//   resource must be a project, folder, or organization with a
2605//   location. Example: `projects/my-example-project/locations/global`.
2606func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *OrganizationsLocationsReplaysCreateCall {
2607	c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2608	c.parent = parent
2609	c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay
2610	return c
2611}
2612
2613// Fields allows partial responses to be retrieved. See
2614// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2615// for more information.
2616func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall {
2617	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2618	return c
2619}
2620
2621// Context sets the context to be used in this call's Do method. Any
2622// pending HTTP request will be aborted if the provided context is
2623// canceled.
2624func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall {
2625	c.ctx_ = ctx
2626	return c
2627}
2628
2629// Header returns an http.Header that can be modified by the caller to
2630// add HTTP headers to the request.
2631func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header {
2632	if c.header_ == nil {
2633		c.header_ = make(http.Header)
2634	}
2635	return c.header_
2636}
2637
2638func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
2639	reqHeaders := make(http.Header)
2640	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2641	for k, v := range c.header_ {
2642		reqHeaders[k] = v
2643	}
2644	reqHeaders.Set("User-Agent", c.s.userAgent())
2645	var body io.Reader = nil
2646	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1beta1replay)
2647	if err != nil {
2648		return nil, err
2649	}
2650	reqHeaders.Set("Content-Type", "application/json")
2651	c.urlParams_.Set("alt", alt)
2652	c.urlParams_.Set("prettyPrint", "false")
2653	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays")
2654	urls += "?" + c.urlParams_.Encode()
2655	req, err := http.NewRequest("POST", urls, body)
2656	if err != nil {
2657		return nil, err
2658	}
2659	req.Header = reqHeaders
2660	googleapi.Expand(req.URL, map[string]string{
2661		"parent": c.parent,
2662	})
2663	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2664}
2665
2666// Do executes the "policysimulator.organizations.locations.replays.create" call.
2667// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
2668// Any non-2xx status code is an error. Response headers are in either
2669// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
2670// was returned at all) in error.(*googleapi.Error).Header. Use
2671// googleapi.IsNotModified to check whether the returned error was
2672// because http.StatusNotModified was returned.
2673func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2674	gensupport.SetOptions(c.urlParams_, opts...)
2675	res, err := c.doRequest("json")
2676	if res != nil && res.StatusCode == http.StatusNotModified {
2677		if res.Body != nil {
2678			res.Body.Close()
2679		}
2680		return nil, &googleapi.Error{
2681			Code:   res.StatusCode,
2682			Header: res.Header,
2683		}
2684	}
2685	if err != nil {
2686		return nil, err
2687	}
2688	defer googleapi.CloseBody(res)
2689	if err := googleapi.CheckResponse(res); err != nil {
2690		return nil, err
2691	}
2692	ret := &GoogleLongrunningOperation{
2693		ServerResponse: googleapi.ServerResponse{
2694			Header:         res.Header,
2695			HTTPStatusCode: res.StatusCode,
2696		},
2697	}
2698	target := &ret
2699	if err := gensupport.DecodeResponse(target, res); err != nil {
2700		return nil, err
2701	}
2702	return ret, nil
2703	// {
2704	//   "description": "Creates and starts a Replay using the given ReplayConfig.",
2705	//   "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays",
2706	//   "httpMethod": "POST",
2707	//   "id": "policysimulator.organizations.locations.replays.create",
2708	//   "parameterOrder": [
2709	//     "parent"
2710	//   ],
2711	//   "parameters": {
2712	//     "parent": {
2713	//       "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`",
2714	//       "location": "path",
2715	//       "pattern": "^organizations/[^/]+/locations/[^/]+$",
2716	//       "required": true,
2717	//       "type": "string"
2718	//     }
2719	//   },
2720	//   "path": "v1beta1/{+parent}/replays",
2721	//   "request": {
2722	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
2723	//   },
2724	//   "response": {
2725	//     "$ref": "GoogleLongrunningOperation"
2726	//   },
2727	//   "scopes": [
2728	//     "https://www.googleapis.com/auth/cloud-platform"
2729	//   ]
2730	// }
2731
2732}
2733
2734// method id "policysimulator.organizations.locations.replays.get":
2735
2736type OrganizationsLocationsReplaysGetCall struct {
2737	s            *Service
2738	name         string
2739	urlParams_   gensupport.URLParams
2740	ifNoneMatch_ string
2741	ctx_         context.Context
2742	header_      http.Header
2743}
2744
2745// Get: Gets the specified Replay. Each `Replay` is available for at
2746// least 7 days.
2747//
2748// - name: The name of the Replay to retrieve, in the following format:
2749//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
2750//   lays/{replay-id}`, where `{resource-id}` is the ID of the project,
2751//   folder, or organization that owns the `Replay`. Example:
2752//   `projects/my-example-project/locations/global/replays/506a5f7f-38ce-
2753//   4d7d-8e03-479ce1833c36`.
2754func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall {
2755	c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2756	c.name = name
2757	return c
2758}
2759
2760// Fields allows partial responses to be retrieved. See
2761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2762// for more information.
2763func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall {
2764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2765	return c
2766}
2767
2768// IfNoneMatch sets the optional parameter which makes the operation
2769// fail if the object's ETag matches the given value. This is useful for
2770// getting updates only after the object has changed since the last
2771// request. Use googleapi.IsNotModified to check whether the response
2772// error from Do is the result of In-None-Match.
2773func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall {
2774	c.ifNoneMatch_ = entityTag
2775	return c
2776}
2777
2778// Context sets the context to be used in this call's Do method. Any
2779// pending HTTP request will be aborted if the provided context is
2780// canceled.
2781func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall {
2782	c.ctx_ = ctx
2783	return c
2784}
2785
2786// Header returns an http.Header that can be modified by the caller to
2787// add HTTP headers to the request.
2788func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header {
2789	if c.header_ == nil {
2790		c.header_ = make(http.Header)
2791	}
2792	return c.header_
2793}
2794
2795func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
2796	reqHeaders := make(http.Header)
2797	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2798	for k, v := range c.header_ {
2799		reqHeaders[k] = v
2800	}
2801	reqHeaders.Set("User-Agent", c.s.userAgent())
2802	if c.ifNoneMatch_ != "" {
2803		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2804	}
2805	var body io.Reader = nil
2806	c.urlParams_.Set("alt", alt)
2807	c.urlParams_.Set("prettyPrint", "false")
2808	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2809	urls += "?" + c.urlParams_.Encode()
2810	req, err := http.NewRequest("GET", urls, body)
2811	if err != nil {
2812		return nil, err
2813	}
2814	req.Header = reqHeaders
2815	googleapi.Expand(req.URL, map[string]string{
2816		"name": c.name,
2817	})
2818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2819}
2820
2821// Do executes the "policysimulator.organizations.locations.replays.get" call.
2822// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will
2823// be non-nil. Any non-2xx status code is an error. Response headers are
2824// in either
2825// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if
2826// a response was returned at all) in error.(*googleapi.Error).Header.
2827// Use googleapi.IsNotModified to check whether the returned error was
2828// because http.StatusNotModified was returned.
2829func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) {
2830	gensupport.SetOptions(c.urlParams_, opts...)
2831	res, err := c.doRequest("json")
2832	if res != nil && res.StatusCode == http.StatusNotModified {
2833		if res.Body != nil {
2834			res.Body.Close()
2835		}
2836		return nil, &googleapi.Error{
2837			Code:   res.StatusCode,
2838			Header: res.Header,
2839		}
2840	}
2841	if err != nil {
2842		return nil, err
2843	}
2844	defer googleapi.CloseBody(res)
2845	if err := googleapi.CheckResponse(res); err != nil {
2846		return nil, err
2847	}
2848	ret := &GoogleCloudPolicysimulatorV1beta1Replay{
2849		ServerResponse: googleapi.ServerResponse{
2850			Header:         res.Header,
2851			HTTPStatusCode: res.StatusCode,
2852		},
2853	}
2854	target := &ret
2855	if err := gensupport.DecodeResponse(target, res); err != nil {
2856		return nil, err
2857	}
2858	return ret, nil
2859	// {
2860	//   "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.",
2861	//   "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}",
2862	//   "httpMethod": "GET",
2863	//   "id": "policysimulator.organizations.locations.replays.get",
2864	//   "parameterOrder": [
2865	//     "name"
2866	//   ],
2867	//   "parameters": {
2868	//     "name": {
2869	//       "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
2870	//       "location": "path",
2871	//       "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$",
2872	//       "required": true,
2873	//       "type": "string"
2874	//     }
2875	//   },
2876	//   "path": "v1beta1/{+name}",
2877	//   "response": {
2878	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
2879	//   },
2880	//   "scopes": [
2881	//     "https://www.googleapis.com/auth/cloud-platform"
2882	//   ]
2883	// }
2884
2885}
2886
2887// method id "policysimulator.organizations.locations.replays.results.list":
2888
2889type OrganizationsLocationsReplaysResultsListCall struct {
2890	s            *Service
2891	parent       string
2892	urlParams_   gensupport.URLParams
2893	ifNoneMatch_ string
2894	ctx_         context.Context
2895	header_      http.Header
2896}
2897
2898// List: Lists the results of running a Replay.
2899//
2900// - parent: The Replay whose results are listed, in the following
2901//   format:
2902//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
2903//   lays/{replay-id}` Example:
2904//   `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0
2905//   3-479ce1833c36`.
2906func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall {
2907	c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2908	c.parent = parent
2909	return c
2910}
2911
2912// PageSize sets the optional parameter "pageSize": The maximum number
2913// of ReplayResult objects to return. Defaults to 5000. The maximum
2914// value is 5000; values above 5000 are rounded down to 5000.
2915func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall {
2916	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2917	return c
2918}
2919
2920// PageToken sets the optional parameter "pageToken": A page token,
2921// received from a previous Simulator.ListReplayResults call. Provide
2922// this token to retrieve the next page of results. When paginating, all
2923// other parameters provided to [Simulator.ListReplayResults[] must
2924// match the call that provided the page token.
2925func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall {
2926	c.urlParams_.Set("pageToken", pageToken)
2927	return c
2928}
2929
2930// Fields allows partial responses to be retrieved. See
2931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2932// for more information.
2933func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall {
2934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2935	return c
2936}
2937
2938// IfNoneMatch sets the optional parameter which makes the operation
2939// fail if the object's ETag matches the given value. This is useful for
2940// getting updates only after the object has changed since the last
2941// request. Use googleapi.IsNotModified to check whether the response
2942// error from Do is the result of In-None-Match.
2943func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall {
2944	c.ifNoneMatch_ = entityTag
2945	return c
2946}
2947
2948// Context sets the context to be used in this call's Do method. Any
2949// pending HTTP request will be aborted if the provided context is
2950// canceled.
2951func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall {
2952	c.ctx_ = ctx
2953	return c
2954}
2955
2956// Header returns an http.Header that can be modified by the caller to
2957// add HTTP headers to the request.
2958func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header {
2959	if c.header_ == nil {
2960		c.header_ = make(http.Header)
2961	}
2962	return c.header_
2963}
2964
2965func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
2966	reqHeaders := make(http.Header)
2967	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
2968	for k, v := range c.header_ {
2969		reqHeaders[k] = v
2970	}
2971	reqHeaders.Set("User-Agent", c.s.userAgent())
2972	if c.ifNoneMatch_ != "" {
2973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2974	}
2975	var body io.Reader = nil
2976	c.urlParams_.Set("alt", alt)
2977	c.urlParams_.Set("prettyPrint", "false")
2978	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results")
2979	urls += "?" + c.urlParams_.Encode()
2980	req, err := http.NewRequest("GET", urls, body)
2981	if err != nil {
2982		return nil, err
2983	}
2984	req.Header = reqHeaders
2985	googleapi.Expand(req.URL, map[string]string{
2986		"parent": c.parent,
2987	})
2988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2989}
2990
2991// Do executes the "policysimulator.organizations.locations.replays.results.list" call.
2992// Exactly one of
2993// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error
2994// will be non-nil. Any non-2xx status code is an error. Response
2995// headers are in either
2996// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp
2997// onse.Header or (if a response was returned at all) in
2998// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2999// whether the returned error was because http.StatusNotModified was
3000// returned.
3001func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) {
3002	gensupport.SetOptions(c.urlParams_, opts...)
3003	res, err := c.doRequest("json")
3004	if res != nil && res.StatusCode == http.StatusNotModified {
3005		if res.Body != nil {
3006			res.Body.Close()
3007		}
3008		return nil, &googleapi.Error{
3009			Code:   res.StatusCode,
3010			Header: res.Header,
3011		}
3012	}
3013	if err != nil {
3014		return nil, err
3015	}
3016	defer googleapi.CloseBody(res)
3017	if err := googleapi.CheckResponse(res); err != nil {
3018		return nil, err
3019	}
3020	ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{
3021		ServerResponse: googleapi.ServerResponse{
3022			Header:         res.Header,
3023			HTTPStatusCode: res.StatusCode,
3024		},
3025	}
3026	target := &ret
3027	if err := gensupport.DecodeResponse(target, res); err != nil {
3028		return nil, err
3029	}
3030	return ret, nil
3031	// {
3032	//   "description": "Lists the results of running a Replay.",
3033	//   "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results",
3034	//   "httpMethod": "GET",
3035	//   "id": "policysimulator.organizations.locations.replays.results.list",
3036	//   "parameterOrder": [
3037	//     "parent"
3038	//   ],
3039	//   "parameters": {
3040	//     "pageSize": {
3041	//       "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.",
3042	//       "format": "int32",
3043	//       "location": "query",
3044	//       "type": "integer"
3045	//     },
3046	//     "pageToken": {
3047	//       "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.",
3048	//       "location": "query",
3049	//       "type": "string"
3050	//     },
3051	//     "parent": {
3052	//       "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
3053	//       "location": "path",
3054	//       "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$",
3055	//       "required": true,
3056	//       "type": "string"
3057	//     }
3058	//   },
3059	//   "path": "v1beta1/{+parent}/results",
3060	//   "response": {
3061	//     "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse"
3062	//   },
3063	//   "scopes": [
3064	//     "https://www.googleapis.com/auth/cloud-platform"
3065	//   ]
3066	// }
3067
3068}
3069
3070// Pages invokes f for each page of results.
3071// A non-nil error returned from f will halt the iteration.
3072// The provided context supersedes any context provided to the Context method.
3073func (c *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error {
3074	c.ctx_ = ctx
3075	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3076	for {
3077		x, err := c.Do()
3078		if err != nil {
3079			return err
3080		}
3081		if err := f(x); err != nil {
3082			return err
3083		}
3084		if x.NextPageToken == "" {
3085			return nil
3086		}
3087		c.PageToken(x.NextPageToken)
3088	}
3089}
3090
3091// method id "policysimulator.projects.locations.replays.create":
3092
3093type ProjectsLocationsReplaysCreateCall struct {
3094	s                                       *Service
3095	parent                                  string
3096	googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay
3097	urlParams_                              gensupport.URLParams
3098	ctx_                                    context.Context
3099	header_                                 http.Header
3100}
3101
3102// Create: Creates and starts a Replay using the given ReplayConfig.
3103//
3104// - parent: The parent resource where this Replay will be created. This
3105//   resource must be a project, folder, or organization with a
3106//   location. Example: `projects/my-example-project/locations/global`.
3107func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *ProjectsLocationsReplaysCreateCall {
3108	c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3109	c.parent = parent
3110	c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay
3111	return c
3112}
3113
3114// Fields allows partial responses to be retrieved. See
3115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3116// for more information.
3117func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall {
3118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3119	return c
3120}
3121
3122// Context sets the context to be used in this call's Do method. Any
3123// pending HTTP request will be aborted if the provided context is
3124// canceled.
3125func (c *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall {
3126	c.ctx_ = ctx
3127	return c
3128}
3129
3130// Header returns an http.Header that can be modified by the caller to
3131// add HTTP headers to the request.
3132func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header {
3133	if c.header_ == nil {
3134		c.header_ = make(http.Header)
3135	}
3136	return c.header_
3137}
3138
3139func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
3140	reqHeaders := make(http.Header)
3141	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
3142	for k, v := range c.header_ {
3143		reqHeaders[k] = v
3144	}
3145	reqHeaders.Set("User-Agent", c.s.userAgent())
3146	var body io.Reader = nil
3147	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1beta1replay)
3148	if err != nil {
3149		return nil, err
3150	}
3151	reqHeaders.Set("Content-Type", "application/json")
3152	c.urlParams_.Set("alt", alt)
3153	c.urlParams_.Set("prettyPrint", "false")
3154	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays")
3155	urls += "?" + c.urlParams_.Encode()
3156	req, err := http.NewRequest("POST", urls, body)
3157	if err != nil {
3158		return nil, err
3159	}
3160	req.Header = reqHeaders
3161	googleapi.Expand(req.URL, map[string]string{
3162		"parent": c.parent,
3163	})
3164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3165}
3166
3167// Do executes the "policysimulator.projects.locations.replays.create" call.
3168// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
3169// Any non-2xx status code is an error. Response headers are in either
3170// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
3171// was returned at all) in error.(*googleapi.Error).Header. Use
3172// googleapi.IsNotModified to check whether the returned error was
3173// because http.StatusNotModified was returned.
3174func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3175	gensupport.SetOptions(c.urlParams_, opts...)
3176	res, err := c.doRequest("json")
3177	if res != nil && res.StatusCode == http.StatusNotModified {
3178		if res.Body != nil {
3179			res.Body.Close()
3180		}
3181		return nil, &googleapi.Error{
3182			Code:   res.StatusCode,
3183			Header: res.Header,
3184		}
3185	}
3186	if err != nil {
3187		return nil, err
3188	}
3189	defer googleapi.CloseBody(res)
3190	if err := googleapi.CheckResponse(res); err != nil {
3191		return nil, err
3192	}
3193	ret := &GoogleLongrunningOperation{
3194		ServerResponse: googleapi.ServerResponse{
3195			Header:         res.Header,
3196			HTTPStatusCode: res.StatusCode,
3197		},
3198	}
3199	target := &ret
3200	if err := gensupport.DecodeResponse(target, res); err != nil {
3201		return nil, err
3202	}
3203	return ret, nil
3204	// {
3205	//   "description": "Creates and starts a Replay using the given ReplayConfig.",
3206	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays",
3207	//   "httpMethod": "POST",
3208	//   "id": "policysimulator.projects.locations.replays.create",
3209	//   "parameterOrder": [
3210	//     "parent"
3211	//   ],
3212	//   "parameters": {
3213	//     "parent": {
3214	//       "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`",
3215	//       "location": "path",
3216	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3217	//       "required": true,
3218	//       "type": "string"
3219	//     }
3220	//   },
3221	//   "path": "v1beta1/{+parent}/replays",
3222	//   "request": {
3223	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
3224	//   },
3225	//   "response": {
3226	//     "$ref": "GoogleLongrunningOperation"
3227	//   },
3228	//   "scopes": [
3229	//     "https://www.googleapis.com/auth/cloud-platform"
3230	//   ]
3231	// }
3232
3233}
3234
3235// method id "policysimulator.projects.locations.replays.get":
3236
3237type ProjectsLocationsReplaysGetCall struct {
3238	s            *Service
3239	name         string
3240	urlParams_   gensupport.URLParams
3241	ifNoneMatch_ string
3242	ctx_         context.Context
3243	header_      http.Header
3244}
3245
3246// Get: Gets the specified Replay. Each `Replay` is available for at
3247// least 7 days.
3248//
3249// - name: The name of the Replay to retrieve, in the following format:
3250//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
3251//   lays/{replay-id}`, where `{resource-id}` is the ID of the project,
3252//   folder, or organization that owns the `Replay`. Example:
3253//   `projects/my-example-project/locations/global/replays/506a5f7f-38ce-
3254//   4d7d-8e03-479ce1833c36`.
3255func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall {
3256	c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3257	c.name = name
3258	return c
3259}
3260
3261// Fields allows partial responses to be retrieved. See
3262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3263// for more information.
3264func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall {
3265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3266	return c
3267}
3268
3269// IfNoneMatch sets the optional parameter which makes the operation
3270// fail if the object's ETag matches the given value. This is useful for
3271// getting updates only after the object has changed since the last
3272// request. Use googleapi.IsNotModified to check whether the response
3273// error from Do is the result of In-None-Match.
3274func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall {
3275	c.ifNoneMatch_ = entityTag
3276	return c
3277}
3278
3279// Context sets the context to be used in this call's Do method. Any
3280// pending HTTP request will be aborted if the provided context is
3281// canceled.
3282func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall {
3283	c.ctx_ = ctx
3284	return c
3285}
3286
3287// Header returns an http.Header that can be modified by the caller to
3288// add HTTP headers to the request.
3289func (c *ProjectsLocationsReplaysGetCall) Header() http.Header {
3290	if c.header_ == nil {
3291		c.header_ = make(http.Header)
3292	}
3293	return c.header_
3294}
3295
3296func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
3297	reqHeaders := make(http.Header)
3298	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
3299	for k, v := range c.header_ {
3300		reqHeaders[k] = v
3301	}
3302	reqHeaders.Set("User-Agent", c.s.userAgent())
3303	if c.ifNoneMatch_ != "" {
3304		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3305	}
3306	var body io.Reader = nil
3307	c.urlParams_.Set("alt", alt)
3308	c.urlParams_.Set("prettyPrint", "false")
3309	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3310	urls += "?" + c.urlParams_.Encode()
3311	req, err := http.NewRequest("GET", urls, body)
3312	if err != nil {
3313		return nil, err
3314	}
3315	req.Header = reqHeaders
3316	googleapi.Expand(req.URL, map[string]string{
3317		"name": c.name,
3318	})
3319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3320}
3321
3322// Do executes the "policysimulator.projects.locations.replays.get" call.
3323// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will
3324// be non-nil. Any non-2xx status code is an error. Response headers are
3325// in either
3326// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if
3327// a response was returned at all) in error.(*googleapi.Error).Header.
3328// Use googleapi.IsNotModified to check whether the returned error was
3329// because http.StatusNotModified was returned.
3330func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) {
3331	gensupport.SetOptions(c.urlParams_, opts...)
3332	res, err := c.doRequest("json")
3333	if res != nil && res.StatusCode == http.StatusNotModified {
3334		if res.Body != nil {
3335			res.Body.Close()
3336		}
3337		return nil, &googleapi.Error{
3338			Code:   res.StatusCode,
3339			Header: res.Header,
3340		}
3341	}
3342	if err != nil {
3343		return nil, err
3344	}
3345	defer googleapi.CloseBody(res)
3346	if err := googleapi.CheckResponse(res); err != nil {
3347		return nil, err
3348	}
3349	ret := &GoogleCloudPolicysimulatorV1beta1Replay{
3350		ServerResponse: googleapi.ServerResponse{
3351			Header:         res.Header,
3352			HTTPStatusCode: res.StatusCode,
3353		},
3354	}
3355	target := &ret
3356	if err := gensupport.DecodeResponse(target, res); err != nil {
3357		return nil, err
3358	}
3359	return ret, nil
3360	// {
3361	//   "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.",
3362	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}",
3363	//   "httpMethod": "GET",
3364	//   "id": "policysimulator.projects.locations.replays.get",
3365	//   "parameterOrder": [
3366	//     "name"
3367	//   ],
3368	//   "parameters": {
3369	//     "name": {
3370	//       "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
3371	//       "location": "path",
3372	//       "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$",
3373	//       "required": true,
3374	//       "type": "string"
3375	//     }
3376	//   },
3377	//   "path": "v1beta1/{+name}",
3378	//   "response": {
3379	//     "$ref": "GoogleCloudPolicysimulatorV1beta1Replay"
3380	//   },
3381	//   "scopes": [
3382	//     "https://www.googleapis.com/auth/cloud-platform"
3383	//   ]
3384	// }
3385
3386}
3387
3388// method id "policysimulator.projects.locations.replays.results.list":
3389
3390type ProjectsLocationsReplaysResultsListCall struct {
3391	s            *Service
3392	parent       string
3393	urlParams_   gensupport.URLParams
3394	ifNoneMatch_ string
3395	ctx_         context.Context
3396	header_      http.Header
3397}
3398
3399// List: Lists the results of running a Replay.
3400//
3401// - parent: The Replay whose results are listed, in the following
3402//   format:
3403//   `{projects|folders|organizations}/{resource-id}/locations/global/rep
3404//   lays/{replay-id}` Example:
3405//   `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0
3406//   3-479ce1833c36`.
3407func (r *ProjectsLocationsReplaysResultsService) List(parent string) *ProjectsLocationsReplaysResultsListCall {
3408	c := &ProjectsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3409	c.parent = parent
3410	return c
3411}
3412
3413// PageSize sets the optional parameter "pageSize": The maximum number
3414// of ReplayResult objects to return. Defaults to 5000. The maximum
3415// value is 5000; values above 5000 are rounded down to 5000.
3416func (c *ProjectsLocationsReplaysResultsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysResultsListCall {
3417	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3418	return c
3419}
3420
3421// PageToken sets the optional parameter "pageToken": A page token,
3422// received from a previous Simulator.ListReplayResults call. Provide
3423// this token to retrieve the next page of results. When paginating, all
3424// other parameters provided to [Simulator.ListReplayResults[] must
3425// match the call that provided the page token.
3426func (c *ProjectsLocationsReplaysResultsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysResultsListCall {
3427	c.urlParams_.Set("pageToken", pageToken)
3428	return c
3429}
3430
3431// Fields allows partial responses to be retrieved. See
3432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3433// for more information.
3434func (c *ProjectsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysResultsListCall {
3435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3436	return c
3437}
3438
3439// IfNoneMatch sets the optional parameter which makes the operation
3440// fail if the object's ETag matches the given value. This is useful for
3441// getting updates only after the object has changed since the last
3442// request. Use googleapi.IsNotModified to check whether the response
3443// error from Do is the result of In-None-Match.
3444func (c *ProjectsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysResultsListCall {
3445	c.ifNoneMatch_ = entityTag
3446	return c
3447}
3448
3449// Context sets the context to be used in this call's Do method. Any
3450// pending HTTP request will be aborted if the provided context is
3451// canceled.
3452func (c *ProjectsLocationsReplaysResultsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysResultsListCall {
3453	c.ctx_ = ctx
3454	return c
3455}
3456
3457// Header returns an http.Header that can be modified by the caller to
3458// add HTTP headers to the request.
3459func (c *ProjectsLocationsReplaysResultsListCall) Header() http.Header {
3460	if c.header_ == nil {
3461		c.header_ = make(http.Header)
3462	}
3463	return c.header_
3464}
3465
3466func (c *ProjectsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
3467	reqHeaders := make(http.Header)
3468	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
3469	for k, v := range c.header_ {
3470		reqHeaders[k] = v
3471	}
3472	reqHeaders.Set("User-Agent", c.s.userAgent())
3473	if c.ifNoneMatch_ != "" {
3474		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3475	}
3476	var body io.Reader = nil
3477	c.urlParams_.Set("alt", alt)
3478	c.urlParams_.Set("prettyPrint", "false")
3479	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results")
3480	urls += "?" + c.urlParams_.Encode()
3481	req, err := http.NewRequest("GET", urls, body)
3482	if err != nil {
3483		return nil, err
3484	}
3485	req.Header = reqHeaders
3486	googleapi.Expand(req.URL, map[string]string{
3487		"parent": c.parent,
3488	})
3489	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3490}
3491
3492// Do executes the "policysimulator.projects.locations.replays.results.list" call.
3493// Exactly one of
3494// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error
3495// will be non-nil. Any non-2xx status code is an error. Response
3496// headers are in either
3497// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp
3498// onse.Header or (if a response was returned at all) in
3499// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3500// whether the returned error was because http.StatusNotModified was
3501// returned.
3502func (c *ProjectsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) {
3503	gensupport.SetOptions(c.urlParams_, opts...)
3504	res, err := c.doRequest("json")
3505	if res != nil && res.StatusCode == http.StatusNotModified {
3506		if res.Body != nil {
3507			res.Body.Close()
3508		}
3509		return nil, &googleapi.Error{
3510			Code:   res.StatusCode,
3511			Header: res.Header,
3512		}
3513	}
3514	if err != nil {
3515		return nil, err
3516	}
3517	defer googleapi.CloseBody(res)
3518	if err := googleapi.CheckResponse(res); err != nil {
3519		return nil, err
3520	}
3521	ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{
3522		ServerResponse: googleapi.ServerResponse{
3523			Header:         res.Header,
3524			HTTPStatusCode: res.StatusCode,
3525		},
3526	}
3527	target := &ret
3528	if err := gensupport.DecodeResponse(target, res); err != nil {
3529		return nil, err
3530	}
3531	return ret, nil
3532	// {
3533	//   "description": "Lists the results of running a Replay.",
3534	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results",
3535	//   "httpMethod": "GET",
3536	//   "id": "policysimulator.projects.locations.replays.results.list",
3537	//   "parameterOrder": [
3538	//     "parent"
3539	//   ],
3540	//   "parameters": {
3541	//     "pageSize": {
3542	//       "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.",
3543	//       "format": "int32",
3544	//       "location": "query",
3545	//       "type": "integer"
3546	//     },
3547	//     "pageToken": {
3548	//       "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.",
3549	//       "location": "query",
3550	//       "type": "string"
3551	//     },
3552	//     "parent": {
3553	//       "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`",
3554	//       "location": "path",
3555	//       "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$",
3556	//       "required": true,
3557	//       "type": "string"
3558	//     }
3559	//   },
3560	//   "path": "v1beta1/{+parent}/results",
3561	//   "response": {
3562	//     "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse"
3563	//   },
3564	//   "scopes": [
3565	//     "https://www.googleapis.com/auth/cloud-platform"
3566	//   ]
3567	// }
3568
3569}
3570
3571// Pages invokes f for each page of results.
3572// A non-nil error returned from f will halt the iteration.
3573// The provided context supersedes any context provided to the Context method.
3574func (c *ProjectsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error {
3575	c.ctx_ = ctx
3576	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3577	for {
3578		x, err := c.Do()
3579		if err != nil {
3580			return err
3581		}
3582		if err := f(x); err != nil {
3583			return err
3584		}
3585		if x.NextPageToken == "" {
3586			return nil
3587		}
3588		c.PageToken(x.NextPageToken)
3589	}
3590}
3591