...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package policysimulator provides access to the Policy Simulator API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/iam/docs/simulating-access
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/policysimulator/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	policysimulatorService, err := policysimulator.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package policysimulator // import "google.golang.org/api/policysimulator/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "policysimulator:v1"
    90  const apiName = "policysimulator"
    91  const apiVersion = "v1"
    92  const basePath = "https://policysimulator.googleapis.com/"
    93  const basePathTemplate = "https://policysimulator.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://policysimulator.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Folders = NewFoldersService(s)
   139  	s.Operations = NewOperationsService(s)
   140  	s.Organizations = NewOrganizationsService(s)
   141  	s.Projects = NewProjectsService(s)
   142  	return s, nil
   143  }
   144  
   145  type Service struct {
   146  	client    *http.Client
   147  	BasePath  string // API endpoint base URL
   148  	UserAgent string // optional additional User-Agent fragment
   149  
   150  	Folders *FoldersService
   151  
   152  	Operations *OperationsService
   153  
   154  	Organizations *OrganizationsService
   155  
   156  	Projects *ProjectsService
   157  }
   158  
   159  func (s *Service) userAgent() string {
   160  	if s.UserAgent == "" {
   161  		return googleapi.UserAgent
   162  	}
   163  	return googleapi.UserAgent + " " + s.UserAgent
   164  }
   165  
   166  func NewFoldersService(s *Service) *FoldersService {
   167  	rs := &FoldersService{s: s}
   168  	rs.Locations = NewFoldersLocationsService(s)
   169  	return rs
   170  }
   171  
   172  type FoldersService struct {
   173  	s *Service
   174  
   175  	Locations *FoldersLocationsService
   176  }
   177  
   178  func NewFoldersLocationsService(s *Service) *FoldersLocationsService {
   179  	rs := &FoldersLocationsService{s: s}
   180  	rs.OrgPolicyViolationsPreviews = NewFoldersLocationsOrgPolicyViolationsPreviewsService(s)
   181  	rs.Replays = NewFoldersLocationsReplaysService(s)
   182  	return rs
   183  }
   184  
   185  type FoldersLocationsService struct {
   186  	s *Service
   187  
   188  	OrgPolicyViolationsPreviews *FoldersLocationsOrgPolicyViolationsPreviewsService
   189  
   190  	Replays *FoldersLocationsReplaysService
   191  }
   192  
   193  func NewFoldersLocationsOrgPolicyViolationsPreviewsService(s *Service) *FoldersLocationsOrgPolicyViolationsPreviewsService {
   194  	rs := &FoldersLocationsOrgPolicyViolationsPreviewsService{s: s}
   195  	rs.Operations = NewFoldersLocationsOrgPolicyViolationsPreviewsOperationsService(s)
   196  	return rs
   197  }
   198  
   199  type FoldersLocationsOrgPolicyViolationsPreviewsService struct {
   200  	s *Service
   201  
   202  	Operations *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService
   203  }
   204  
   205  func NewFoldersLocationsOrgPolicyViolationsPreviewsOperationsService(s *Service) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService {
   206  	rs := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsService{s: s}
   207  	return rs
   208  }
   209  
   210  type FoldersLocationsOrgPolicyViolationsPreviewsOperationsService struct {
   211  	s *Service
   212  }
   213  
   214  func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService {
   215  	rs := &FoldersLocationsReplaysService{s: s}
   216  	rs.Operations = NewFoldersLocationsReplaysOperationsService(s)
   217  	rs.Results = NewFoldersLocationsReplaysResultsService(s)
   218  	return rs
   219  }
   220  
   221  type FoldersLocationsReplaysService struct {
   222  	s *Service
   223  
   224  	Operations *FoldersLocationsReplaysOperationsService
   225  
   226  	Results *FoldersLocationsReplaysResultsService
   227  }
   228  
   229  func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService {
   230  	rs := &FoldersLocationsReplaysOperationsService{s: s}
   231  	return rs
   232  }
   233  
   234  type FoldersLocationsReplaysOperationsService struct {
   235  	s *Service
   236  }
   237  
   238  func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService {
   239  	rs := &FoldersLocationsReplaysResultsService{s: s}
   240  	return rs
   241  }
   242  
   243  type FoldersLocationsReplaysResultsService struct {
   244  	s *Service
   245  }
   246  
   247  func NewOperationsService(s *Service) *OperationsService {
   248  	rs := &OperationsService{s: s}
   249  	return rs
   250  }
   251  
   252  type OperationsService struct {
   253  	s *Service
   254  }
   255  
   256  func NewOrganizationsService(s *Service) *OrganizationsService {
   257  	rs := &OrganizationsService{s: s}
   258  	rs.Locations = NewOrganizationsLocationsService(s)
   259  	return rs
   260  }
   261  
   262  type OrganizationsService struct {
   263  	s *Service
   264  
   265  	Locations *OrganizationsLocationsService
   266  }
   267  
   268  func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
   269  	rs := &OrganizationsLocationsService{s: s}
   270  	rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s)
   271  	rs.Replays = NewOrganizationsLocationsReplaysService(s)
   272  	return rs
   273  }
   274  
   275  type OrganizationsLocationsService struct {
   276  	s *Service
   277  
   278  	OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService
   279  
   280  	Replays *OrganizationsLocationsReplaysService
   281  }
   282  
   283  func NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsService {
   284  	rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsService{s: s}
   285  	rs.Operations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s)
   286  	rs.OrgPolicyViolations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s)
   287  	return rs
   288  }
   289  
   290  type OrganizationsLocationsOrgPolicyViolationsPreviewsService struct {
   291  	s *Service
   292  
   293  	Operations *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService
   294  
   295  	OrgPolicyViolations *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService
   296  }
   297  
   298  func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService {
   299  	rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService{s: s}
   300  	return rs
   301  }
   302  
   303  type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService struct {
   304  	s *Service
   305  }
   306  
   307  func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService {
   308  	rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService{s: s}
   309  	return rs
   310  }
   311  
   312  type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService struct {
   313  	s *Service
   314  }
   315  
   316  func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService {
   317  	rs := &OrganizationsLocationsReplaysService{s: s}
   318  	rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s)
   319  	rs.Results = NewOrganizationsLocationsReplaysResultsService(s)
   320  	return rs
   321  }
   322  
   323  type OrganizationsLocationsReplaysService struct {
   324  	s *Service
   325  
   326  	Operations *OrganizationsLocationsReplaysOperationsService
   327  
   328  	Results *OrganizationsLocationsReplaysResultsService
   329  }
   330  
   331  func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService {
   332  	rs := &OrganizationsLocationsReplaysOperationsService{s: s}
   333  	return rs
   334  }
   335  
   336  type OrganizationsLocationsReplaysOperationsService struct {
   337  	s *Service
   338  }
   339  
   340  func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService {
   341  	rs := &OrganizationsLocationsReplaysResultsService{s: s}
   342  	return rs
   343  }
   344  
   345  type OrganizationsLocationsReplaysResultsService struct {
   346  	s *Service
   347  }
   348  
   349  func NewProjectsService(s *Service) *ProjectsService {
   350  	rs := &ProjectsService{s: s}
   351  	rs.Locations = NewProjectsLocationsService(s)
   352  	return rs
   353  }
   354  
   355  type ProjectsService struct {
   356  	s *Service
   357  
   358  	Locations *ProjectsLocationsService
   359  }
   360  
   361  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   362  	rs := &ProjectsLocationsService{s: s}
   363  	rs.OrgPolicyViolationsPreviews = NewProjectsLocationsOrgPolicyViolationsPreviewsService(s)
   364  	rs.Replays = NewProjectsLocationsReplaysService(s)
   365  	return rs
   366  }
   367  
   368  type ProjectsLocationsService struct {
   369  	s *Service
   370  
   371  	OrgPolicyViolationsPreviews *ProjectsLocationsOrgPolicyViolationsPreviewsService
   372  
   373  	Replays *ProjectsLocationsReplaysService
   374  }
   375  
   376  func NewProjectsLocationsOrgPolicyViolationsPreviewsService(s *Service) *ProjectsLocationsOrgPolicyViolationsPreviewsService {
   377  	rs := &ProjectsLocationsOrgPolicyViolationsPreviewsService{s: s}
   378  	rs.Operations = NewProjectsLocationsOrgPolicyViolationsPreviewsOperationsService(s)
   379  	return rs
   380  }
   381  
   382  type ProjectsLocationsOrgPolicyViolationsPreviewsService struct {
   383  	s *Service
   384  
   385  	Operations *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService
   386  }
   387  
   388  func NewProjectsLocationsOrgPolicyViolationsPreviewsOperationsService(s *Service) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService {
   389  	rs := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService{s: s}
   390  	return rs
   391  }
   392  
   393  type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService struct {
   394  	s *Service
   395  }
   396  
   397  func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService {
   398  	rs := &ProjectsLocationsReplaysService{s: s}
   399  	rs.Operations = NewProjectsLocationsReplaysOperationsService(s)
   400  	rs.Results = NewProjectsLocationsReplaysResultsService(s)
   401  	return rs
   402  }
   403  
   404  type ProjectsLocationsReplaysService struct {
   405  	s *Service
   406  
   407  	Operations *ProjectsLocationsReplaysOperationsService
   408  
   409  	Results *ProjectsLocationsReplaysResultsService
   410  }
   411  
   412  func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService {
   413  	rs := &ProjectsLocationsReplaysOperationsService{s: s}
   414  	return rs
   415  }
   416  
   417  type ProjectsLocationsReplaysOperationsService struct {
   418  	s *Service
   419  }
   420  
   421  func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService {
   422  	rs := &ProjectsLocationsReplaysResultsService{s: s}
   423  	return rs
   424  }
   425  
   426  type ProjectsLocationsReplaysResultsService struct {
   427  	s *Service
   428  }
   429  
   430  // GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but with an
   431  // extra 'launch' field for launch reference. The PolicySpec here is specific
   432  // for dry-run/darklaunch.
   433  type GoogleCloudOrgpolicyV2AlternatePolicySpec struct {
   434  	// Launch: Reference to the launch that will be used while audit logging and to
   435  	// control the launch. Should be set only in the alternate policy.
   436  	Launch string `json:"launch,omitempty"`
   437  	// Spec: Specify constraint for configurations of Google Cloud resources.
   438  	Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"`
   439  	// ForceSendFields is a list of field names (e.g. "Launch") to unconditionally
   440  	// include in API requests. By default, fields with empty or default values are
   441  	// omitted from API requests. See
   442  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   443  	// details.
   444  	ForceSendFields []string `json:"-"`
   445  	// NullFields is a list of field names (e.g. "Launch") to include in API
   446  	// requests with the JSON null value. By default, fields with empty values are
   447  	// omitted from API requests. See
   448  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   449  	NullFields []string `json:"-"`
   450  }
   451  
   452  func (s *GoogleCloudOrgpolicyV2AlternatePolicySpec) MarshalJSON() ([]byte, error) {
   453  	type NoMethod GoogleCloudOrgpolicyV2AlternatePolicySpec
   454  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   455  }
   456  
   457  // GoogleCloudOrgpolicyV2CustomConstraint: A custom constraint defined by
   458  // customers which can *only* be applied to the given resource types and
   459  // organization. By creating a custom constraint, customers can apply policies
   460  // of this custom constraint. *Creating a custom constraint itself does NOT
   461  // apply any policy enforcement*.
   462  type GoogleCloudOrgpolicyV2CustomConstraint struct {
   463  	// ActionType: Allow or deny type.
   464  	//
   465  	// Possible values:
   466  	//   "ACTION_TYPE_UNSPECIFIED" - Unspecified. Results in an error.
   467  	//   "ALLOW" - Allowed action type.
   468  	//   "DENY" - Deny action type.
   469  	ActionType string `json:"actionType,omitempty"`
   470  	// Condition: Org policy condition/expression. For example:
   471  	// `resource.instanceName.matches("[production|test]_.*_(\d)+")` or,
   472  	// `resource.management.auto_upgrade == true` The max length of the condition
   473  	// is 1000 characters.
   474  	Condition string `json:"condition,omitempty"`
   475  	// Description: Detailed information about this custom policy constraint. The
   476  	// max length of the description is 2000 characters.
   477  	Description string `json:"description,omitempty"`
   478  	// DisplayName: One line display name for the UI. The max length of the
   479  	// display_name is 200 characters.
   480  	DisplayName string `json:"displayName,omitempty"`
   481  	// MethodTypes: All the operations being applied for this constraint.
   482  	//
   483  	// Possible values:
   484  	//   "METHOD_TYPE_UNSPECIFIED" - Unspecified. Results in an error.
   485  	//   "CREATE" - Constraint applied when creating the resource.
   486  	//   "UPDATE" - Constraint applied when updating the resource.
   487  	//   "DELETE" - Constraint applied when deleting the resource. Not supported
   488  	// yet.
   489  	//   "REMOVE_GRANT" - Constraint applied when removing an IAM grant.
   490  	//   "GOVERN_TAGS" - Constraint applied when enforcing forced tagging.
   491  	MethodTypes []string `json:"methodTypes,omitempty"`
   492  	// Name: Immutable. Name of the constraint. This is unique within the
   493  	// organization. Format of the name should be *
   494  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
   495  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
   496  	// The max length is 70 characters and the minimum length is 1. Note that the
   497  	// prefix `organizations/{organization_id}/customConstraints/` is not counted.
   498  	Name string `json:"name,omitempty"`
   499  	// ResourceTypes: Immutable. The resource instance type on which this policy
   500  	// applies. Format will be of the form : `/` Example: *
   501  	// `compute.googleapis.com/Instance`.
   502  	ResourceTypes []string `json:"resourceTypes,omitempty"`
   503  	// UpdateTime: Output only. The last time this custom constraint was updated.
   504  	// This represents the last time that the `CreateCustomConstraint` or
   505  	// `UpdateCustomConstraint` RPC was called
   506  	UpdateTime string `json:"updateTime,omitempty"`
   507  	// ForceSendFields is a list of field names (e.g. "ActionType") to
   508  	// unconditionally include in API requests. By default, fields with empty or
   509  	// default values are omitted from API requests. See
   510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   511  	// details.
   512  	ForceSendFields []string `json:"-"`
   513  	// NullFields is a list of field names (e.g. "ActionType") to include in API
   514  	// requests with the JSON null value. By default, fields with empty values are
   515  	// omitted from API requests. See
   516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   517  	NullFields []string `json:"-"`
   518  }
   519  
   520  func (s *GoogleCloudOrgpolicyV2CustomConstraint) MarshalJSON() ([]byte, error) {
   521  	type NoMethod GoogleCloudOrgpolicyV2CustomConstraint
   522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   523  }
   524  
   525  // GoogleCloudOrgpolicyV2Policy: Defines an organization policy which is used
   526  // to specify constraints for configurations of Google Cloud resources.
   527  type GoogleCloudOrgpolicyV2Policy struct {
   528  	// Alternate: Deprecated.
   529  	Alternate *GoogleCloudOrgpolicyV2AlternatePolicySpec `json:"alternate,omitempty"`
   530  	// DryRunSpec: Dry-run policy. Audit-only policy, can be used to monitor how
   531  	// the policy would have impacted the existing and future resources if it's
   532  	// enforced.
   533  	DryRunSpec *GoogleCloudOrgpolicyV2PolicySpec `json:"dryRunSpec,omitempty"`
   534  	// Etag: Optional. An opaque tag indicating the current state of the policy,
   535  	// used for concurrency control. This 'etag' is computed by the server based on
   536  	// the value of other fields, and may be sent on update and delete requests to
   537  	// ensure the client has an up-to-date value before proceeding.
   538  	Etag string `json:"etag,omitempty"`
   539  	// Name: Immutable. The resource name of the policy. Must be one of the
   540  	// following forms, where `constraint_name` is the name of the constraint which
   541  	// this policy configures: *
   542  	// `projects/{project_number}/policies/{constraint_name}` *
   543  	// `folders/{folder_id}/policies/{constraint_name}` *
   544  	// `organizations/{organization_id}/policies/{constraint_name}` For example,
   545  	// `projects/123/policies/compute.disableSerialPortAccess`. Note:
   546  	// `projects/{project_id}/policies/{constraint_name}` is also an acceptable
   547  	// name for API requests, but responses will return the name using the
   548  	// equivalent project number.
   549  	Name string `json:"name,omitempty"`
   550  	// Spec: Basic information about the Organization Policy.
   551  	Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"`
   552  	// ForceSendFields is a list of field names (e.g. "Alternate") to
   553  	// unconditionally include in API requests. By default, fields with empty or
   554  	// default values are omitted from API requests. See
   555  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   556  	// details.
   557  	ForceSendFields []string `json:"-"`
   558  	// NullFields is a list of field names (e.g. "Alternate") to include in API
   559  	// requests with the JSON null value. By default, fields with empty values are
   560  	// omitted from API requests. See
   561  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   562  	NullFields []string `json:"-"`
   563  }
   564  
   565  func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) {
   566  	type NoMethod GoogleCloudOrgpolicyV2Policy
   567  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   568  }
   569  
   570  // GoogleCloudOrgpolicyV2PolicySpec: Defines a Google Cloud policy
   571  // specification which is used to specify constraints for configurations of
   572  // Google Cloud resources.
   573  type GoogleCloudOrgpolicyV2PolicySpec struct {
   574  	// Etag: An opaque tag indicating the current version of the policySpec, used
   575  	// for concurrency control. This field is ignored if used in a `CreatePolicy`
   576  	// request. When the policy is returned from either a `GetPolicy` or a
   577  	// `ListPolicies` request, this `etag` indicates the version of the current
   578  	// policySpec to use when executing a read-modify-write loop. When the policy
   579  	// is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
   580  	Etag string `json:"etag,omitempty"`
   581  	// InheritFromParent: Determines the inheritance behavior for this policy. If
   582  	// `inherit_from_parent` is true, policy rules set higher up in the hierarchy
   583  	// (up to the closest root) are inherited and present in the effective policy.
   584  	// If it is false, then no rules are inherited, and this policy becomes the new
   585  	// root for evaluation. This field can be set only for policies which configure
   586  	// list constraints.
   587  	InheritFromParent bool `json:"inheritFromParent,omitempty"`
   588  	// Reset: Ignores policies set above this resource and restores the
   589  	// `constraint_default` enforcement behavior of the specific constraint at this
   590  	// resource. This field can be set in policies for either list or boolean
   591  	// constraints. If set, `rules` must be empty and `inherit_from_parent` must be
   592  	// set to false.
   593  	Reset bool `json:"reset,omitempty"`
   594  	// Rules: In policies for boolean constraints, the following requirements
   595  	// apply: - There must be one and only one policy rule where condition is
   596  	// unset. - Boolean policy rules with conditions must set `enforced` to the
   597  	// opposite of the policy rule without a condition. - During policy evaluation,
   598  	// policy rules with conditions that are true for a target resource take
   599  	// precedence.
   600  	Rules []*GoogleCloudOrgpolicyV2PolicySpecPolicyRule `json:"rules,omitempty"`
   601  	// UpdateTime: Output only. The time stamp this was previously updated. This
   602  	// represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made
   603  	// for that policy.
   604  	UpdateTime string `json:"updateTime,omitempty"`
   605  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   606  	// include in API requests. By default, fields with empty or default values are
   607  	// omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   609  	// details.
   610  	ForceSendFields []string `json:"-"`
   611  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   612  	// with the JSON null value. By default, fields with empty values are omitted
   613  	// from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   615  	NullFields []string `json:"-"`
   616  }
   617  
   618  func (s *GoogleCloudOrgpolicyV2PolicySpec) MarshalJSON() ([]byte, error) {
   619  	type NoMethod GoogleCloudOrgpolicyV2PolicySpec
   620  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   621  }
   622  
   623  // GoogleCloudOrgpolicyV2PolicySpecPolicyRule: A rule used to express this
   624  // policy.
   625  type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct {
   626  	// AllowAll: Setting this to true means that all values are allowed. This field
   627  	// can be set only in policies for list constraints.
   628  	AllowAll bool `json:"allowAll,omitempty"`
   629  	// Condition: A condition which determines whether this rule is used in the
   630  	// evaluation of the policy. When set, the `expression` field in the `Expr'
   631  	// must include from 1 to 10 subexpressions, joined by the "||" or "&&"
   632  	// operators. Each subexpression must be of the form
   633  	// "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or
   634  	// "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where
   635  	// key_name and value_name are the resource names for Label Keys and Values.
   636  	// These names are available from the Tag Manager Service. An example
   637  	// expression is: "resource.matchTag('123456789/environment, 'prod')". or
   638  	// "resource.matchTagId('tagKeys/123', 'tagValues/456')".
   639  	Condition *GoogleTypeExpr `json:"condition,omitempty"`
   640  	// DenyAll: Setting this to true means that all values are denied. This field
   641  	// can be set only in policies for list constraints.
   642  	DenyAll bool `json:"denyAll,omitempty"`
   643  	// Enforce: If `true`, then the policy is enforced. If `false`, then any
   644  	// configuration is acceptable. This field can be set only in policies for
   645  	// boolean constraints.
   646  	Enforce bool `json:"enforce,omitempty"`
   647  	// Values: List of values to be used for this policy rule. This field can be
   648  	// set only in policies for list constraints.
   649  	Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"`
   650  	// ForceSendFields is a list of field names (e.g. "AllowAll") to
   651  	// unconditionally include in API requests. By default, fields with empty or
   652  	// default values are omitted from API requests. See
   653  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   654  	// details.
   655  	ForceSendFields []string `json:"-"`
   656  	// NullFields is a list of field names (e.g. "AllowAll") to include in API
   657  	// requests with the JSON null value. By default, fields with empty values are
   658  	// omitted from API requests. See
   659  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   660  	NullFields []string `json:"-"`
   661  }
   662  
   663  func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRule) MarshalJSON() ([]byte, error) {
   664  	type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRule
   665  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   666  }
   667  
   668  // GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues: A message that holds
   669  // specific allowed and denied values. This message can define specific values
   670  // and subtrees of the Resource Manager resource hierarchy (`Organizations`,
   671  // `Folders`, `Projects`) that are allowed or denied. This is achieved by using
   672  // the `under:` and optional `is:` prefixes. The `under:` prefix is used to
   673  // denote resource subtree values. The `is:` prefix is used to denote specific
   674  // values, and is required only if the value contains a ":". Values prefixed
   675  // with "is:" are treated the same as values with no prefix. Ancestry subtrees
   676  // must be in one of the following formats: - `projects/` (for example,
   677  // `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) -
   678  // `organizations/` (for example, `organizations/1234`) The `supports_under`
   679  // field of the associated `Constraint` defines whether ancestry prefixes can
   680  // be used.
   681  type GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues struct {
   682  	// AllowedValues: List of values allowed at this resource.
   683  	AllowedValues []string `json:"allowedValues,omitempty"`
   684  	// DeniedValues: List of values denied at this resource.
   685  	DeniedValues []string `json:"deniedValues,omitempty"`
   686  	// ForceSendFields is a list of field names (e.g. "AllowedValues") to
   687  	// unconditionally include in API requests. By default, fields with empty or
   688  	// default values are omitted from API requests. See
   689  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   690  	// details.
   691  	ForceSendFields []string `json:"-"`
   692  	// NullFields is a list of field names (e.g. "AllowedValues") to include in API
   693  	// requests with the JSON null value. By default, fields with empty values are
   694  	// omitted from API requests. See
   695  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   696  	NullFields []string `json:"-"`
   697  }
   698  
   699  func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues) MarshalJSON() ([]byte, error) {
   700  	type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
   701  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   702  }
   703  
   704  // GoogleCloudPolicysimulatorV1AccessStateDiff: A summary and comparison of the
   705  // principal's access under the current (baseline) policies and the proposed
   706  // (simulated) policies for a single access tuple.
   707  type GoogleCloudPolicysimulatorV1AccessStateDiff struct {
   708  	// AccessChange: How the principal's access, specified in the AccessState
   709  	// field, changed between the current (baseline) policies and proposed
   710  	// (simulated) policies.
   711  	//
   712  	// Possible values:
   713  	//   "ACCESS_CHANGE_TYPE_UNSPECIFIED" - Default value. This value is unused.
   714  	//   "NO_CHANGE" - The principal's access did not change. This includes the
   715  	// case where both baseline and simulated are UNKNOWN, but the unknown
   716  	// information is equivalent.
   717  	//   "UNKNOWN_CHANGE" - The principal's access under both the current policies
   718  	// and the proposed policies is `UNKNOWN`, but the unknown information differs
   719  	// between them.
   720  	//   "ACCESS_REVOKED" - The principal had access under the current policies
   721  	// (`GRANTED`), but will no longer have access after the proposed changes
   722  	// (`NOT_GRANTED`).
   723  	//   "ACCESS_GAINED" - The principal did not have access under the current
   724  	// policies (`NOT_GRANTED`), but will have access after the proposed changes
   725  	// (`GRANTED`).
   726  	//   "ACCESS_MAYBE_REVOKED" - This result can occur for the following reasons:
   727  	// * The principal had access under the current policies (`GRANTED`), but their
   728  	// access after the proposed changes is `UNKNOWN`. * The principal's access
   729  	// under the current policies is `UNKNOWN`, but they will not have access after
   730  	// the proposed changes (`NOT_GRANTED`).
   731  	//   "ACCESS_MAYBE_GAINED" - This result can occur for the following reasons: *
   732  	// The principal did not have access under the current policies
   733  	// (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. *
   734  	// The principal's access under the current policies is `UNKNOWN`, but they
   735  	// will have access after the proposed changes (`GRANTED`).
   736  	AccessChange string `json:"accessChange,omitempty"`
   737  	// Baseline: The results of evaluating the access tuple under the current
   738  	// (baseline) policies. If the AccessState couldn't be fully evaluated, this
   739  	// field explains why.
   740  	Baseline *GoogleCloudPolicysimulatorV1ExplainedAccess `json:"baseline,omitempty"`
   741  	// Simulated: The results of evaluating the access tuple under the proposed
   742  	// (simulated) policies. If the AccessState couldn't be fully evaluated, this
   743  	// field explains why.
   744  	Simulated *GoogleCloudPolicysimulatorV1ExplainedAccess `json:"simulated,omitempty"`
   745  	// ForceSendFields is a list of field names (e.g. "AccessChange") to
   746  	// unconditionally include in API requests. By default, fields with empty or
   747  	// default values are omitted from API requests. See
   748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   749  	// details.
   750  	ForceSendFields []string `json:"-"`
   751  	// NullFields is a list of field names (e.g. "AccessChange") to include in API
   752  	// requests with the JSON null value. By default, fields with empty values are
   753  	// omitted from API requests. See
   754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   755  	NullFields []string `json:"-"`
   756  }
   757  
   758  func (s *GoogleCloudPolicysimulatorV1AccessStateDiff) MarshalJSON() ([]byte, error) {
   759  	type NoMethod GoogleCloudPolicysimulatorV1AccessStateDiff
   760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   761  }
   762  
   763  // GoogleCloudPolicysimulatorV1AccessTuple: Information about the principal,
   764  // resource, and permission to check.
   765  type GoogleCloudPolicysimulatorV1AccessTuple struct {
   766  	// FullResourceName: Required. The full resource name that identifies the
   767  	// resource. For example,
   768  	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/m
   769  	// y-instance`. For examples of full resource names for Google Cloud services,
   770  	// see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
   771  	FullResourceName string `json:"fullResourceName,omitempty"`
   772  	// Permission: Required. The IAM permission to check for the specified
   773  	// principal and resource. For a complete list of IAM permissions, see
   774  	// https://cloud.google.com/iam/help/permissions/reference. For a complete list
   775  	// of predefined IAM roles and the permissions in each role, see
   776  	// https://cloud.google.com/iam/help/roles/reference.
   777  	Permission string `json:"permission,omitempty"`
   778  	// Principal: Required. The principal whose access you want to check, in the
   779  	// form of the email address that represents that principal. For example,
   780  	// `alice@example.com` or
   781  	// `my-service-account@my-project.iam.gserviceaccount.com`. The principal must
   782  	// be a Google Account or a service account. Other types of principals are not
   783  	// supported.
   784  	Principal string `json:"principal,omitempty"`
   785  	// ForceSendFields is a list of field names (e.g. "FullResourceName") to
   786  	// unconditionally include in API requests. By default, fields with empty or
   787  	// default values are omitted from API requests. See
   788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   789  	// details.
   790  	ForceSendFields []string `json:"-"`
   791  	// NullFields is a list of field names (e.g. "FullResourceName") to include in
   792  	// API requests with the JSON null value. By default, fields with empty values
   793  	// are omitted from API requests. See
   794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   795  	NullFields []string `json:"-"`
   796  }
   797  
   798  func (s *GoogleCloudPolicysimulatorV1AccessTuple) MarshalJSON() ([]byte, error) {
   799  	type NoMethod GoogleCloudPolicysimulatorV1AccessTuple
   800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   801  }
   802  
   803  // GoogleCloudPolicysimulatorV1BindingExplanation: Details about how a binding
   804  // in a policy affects a principal's ability to use a permission.
   805  type GoogleCloudPolicysimulatorV1BindingExplanation struct {
   806  	// Access: Required. Indicates whether _this binding_ provides the specified
   807  	// permission to the specified principal for the specified resource. This field
   808  	// does _not_ indicate whether the principal actually has the permission for
   809  	// the resource. There might be another binding that overrides this binding. To
   810  	// determine whether the principal actually has the permission, use the
   811  	// `access` field in the TroubleshootIamPolicyResponse.
   812  	//
   813  	// Possible values:
   814  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
   815  	//   "GRANTED" - The principal has the permission.
   816  	//   "NOT_GRANTED" - The principal does not have the permission.
   817  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
   818  	// condition expression evaluates to `true`.
   819  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
   820  	// access to all of the policies that Policy Simulator needs to evaluate.
   821  	Access string `json:"access,omitempty"`
   822  	// Condition: A condition expression that prevents this binding from granting
   823  	// access unless the expression evaluates to `true`. To learn about IAM
   824  	// Conditions, see https://cloud.google.com/iam/docs/conditions-overview.
   825  	Condition *GoogleTypeExpr `json:"condition,omitempty"`
   826  	// Memberships: Indicates whether each principal in the binding includes the
   827  	// principal specified in the request, either directly or indirectly. Each key
   828  	// identifies a principal in the binding, and each value indicates whether the
   829  	// principal in the binding includes the principal in the request. For example,
   830  	// suppose that a binding includes the following principals: *
   831  	// `user:alice@example.com` * `group:product-eng@example.com` The principal in
   832  	// the replayed access tuple is `user:bob@example.com`. This user is a
   833  	// principal of the group `group:product-eng@example.com`. For the first
   834  	// principal in the binding, the key is `user:alice@example.com`, and the
   835  	// `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the
   836  	// second principal in the binding, the key is `group:product-eng@example.com`,
   837  	// and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.
   838  	Memberships map[string]GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership `json:"memberships,omitempty"`
   839  	// Relevance: The relevance of this binding to the overall determination for
   840  	// the entire policy.
   841  	//
   842  	// Possible values:
   843  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
   844  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
   845  	// data point is unlikely to affect the overall determination.
   846  	//   "HIGH" - The data point has a strong effect on the result. Changing the
   847  	// data point is likely to affect the overall determination.
   848  	Relevance string `json:"relevance,omitempty"`
   849  	// Role: The role that this binding grants. For example,
   850  	// `roles/compute.serviceAgent`. For a complete list of predefined IAM roles,
   851  	// as well as the permissions in each role, see
   852  	// https://cloud.google.com/iam/help/roles/reference.
   853  	Role string `json:"role,omitempty"`
   854  	// RolePermission: Indicates whether the role granted by this binding contains
   855  	// the specified permission.
   856  	//
   857  	// Possible values:
   858  	//   "ROLE_PERMISSION_UNSPECIFIED" - Default value. This value is unused.
   859  	//   "ROLE_PERMISSION_INCLUDED" - The permission is included in the role.
   860  	//   "ROLE_PERMISSION_NOT_INCLUDED" - The permission is not included in the
   861  	// role.
   862  	//   "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" - The user who created the Replay is
   863  	// not allowed to access the binding.
   864  	RolePermission string `json:"rolePermission,omitempty"`
   865  	// RolePermissionRelevance: The relevance of the permission's existence, or
   866  	// nonexistence, in the role to the overall determination for the entire
   867  	// policy.
   868  	//
   869  	// Possible values:
   870  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
   871  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
   872  	// data point is unlikely to affect the overall determination.
   873  	//   "HIGH" - The data point has a strong effect on the result. Changing the
   874  	// data point is likely to affect the overall determination.
   875  	RolePermissionRelevance string `json:"rolePermissionRelevance,omitempty"`
   876  	// ForceSendFields is a list of field names (e.g. "Access") to unconditionally
   877  	// include in API requests. By default, fields with empty or default values are
   878  	// omitted from API requests. See
   879  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   880  	// details.
   881  	ForceSendFields []string `json:"-"`
   882  	// NullFields is a list of field names (e.g. "Access") to include in API
   883  	// requests with the JSON null value. By default, fields with empty values are
   884  	// omitted from API requests. See
   885  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   886  	NullFields []string `json:"-"`
   887  }
   888  
   889  func (s *GoogleCloudPolicysimulatorV1BindingExplanation) MarshalJSON() ([]byte, error) {
   890  	type NoMethod GoogleCloudPolicysimulatorV1BindingExplanation
   891  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   892  }
   893  
   894  // GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership: Details
   895  // about whether the binding includes the principal.
   896  type GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership struct {
   897  	// Membership: Indicates whether the binding includes the principal.
   898  	//
   899  	// Possible values:
   900  	//   "MEMBERSHIP_UNSPECIFIED" - Default value. This value is unused.
   901  	//   "MEMBERSHIP_INCLUDED" - The binding includes the principal. The principal
   902  	// can be included directly or indirectly. For example: * A principal is
   903  	// included directly if that principal is listed in the binding. * A principal
   904  	// is included indirectly if that principal is in a Google group or Google
   905  	// Workspace domain that is listed in the binding.
   906  	//   "MEMBERSHIP_NOT_INCLUDED" - The binding does not include the principal.
   907  	//   "MEMBERSHIP_UNKNOWN_INFO_DENIED" - The user who created the Replay is not
   908  	// allowed to access the binding.
   909  	//   "MEMBERSHIP_UNKNOWN_UNSUPPORTED" - The principal is an unsupported type.
   910  	// Only Google Accounts and service accounts are supported.
   911  	Membership string `json:"membership,omitempty"`
   912  	// Relevance: The relevance of the principal's status to the overall
   913  	// determination for the binding.
   914  	//
   915  	// Possible values:
   916  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
   917  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
   918  	// data point is unlikely to affect the overall determination.
   919  	//   "HIGH" - The data point has a strong effect on the result. Changing the
   920  	// data point is likely to affect the overall determination.
   921  	Relevance string `json:"relevance,omitempty"`
   922  	// ForceSendFields is a list of field names (e.g. "Membership") to
   923  	// unconditionally include in API requests. By default, fields with empty or
   924  	// default values are omitted from API requests. See
   925  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   926  	// details.
   927  	ForceSendFields []string `json:"-"`
   928  	// NullFields is a list of field names (e.g. "Membership") to include in API
   929  	// requests with the JSON null value. By default, fields with empty values are
   930  	// omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   932  	NullFields []string `json:"-"`
   933  }
   934  
   935  func (s *GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership) MarshalJSON() ([]byte, error) {
   936  	type NoMethod GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership
   937  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   938  }
   939  
   940  // GoogleCloudPolicysimulatorV1ExplainedAccess: Details about how a set of
   941  // policies, listed in ExplainedPolicy, resulted in a certain AccessState when
   942  // replaying an access tuple.
   943  type GoogleCloudPolicysimulatorV1ExplainedAccess struct {
   944  	// AccessState: Whether the principal in the access tuple has permission to
   945  	// access the resource in the access tuple under the given policies.
   946  	//
   947  	// Possible values:
   948  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
   949  	//   "GRANTED" - The principal has the permission.
   950  	//   "NOT_GRANTED" - The principal does not have the permission.
   951  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
   952  	// condition expression evaluates to `true`.
   953  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
   954  	// access to all of the policies that Policy Simulator needs to evaluate.
   955  	AccessState string `json:"accessState,omitempty"`
   956  	// Errors: If the AccessState is `UNKNOWN`, this field contains a list of
   957  	// errors explaining why the result is `UNKNOWN`. If the `AccessState` is
   958  	// `GRANTED` or `NOT_GRANTED`, this field is omitted.
   959  	Errors []*GoogleRpcStatus `json:"errors,omitempty"`
   960  	// Policies: If the AccessState is `UNKNOWN`, this field contains the policies
   961  	// that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`,
   962  	// this field is omitted.
   963  	Policies []*GoogleCloudPolicysimulatorV1ExplainedPolicy `json:"policies,omitempty"`
   964  	// ForceSendFields is a list of field names (e.g. "AccessState") to
   965  	// unconditionally include in API requests. By default, fields with empty or
   966  	// default values are omitted from API requests. See
   967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   968  	// details.
   969  	ForceSendFields []string `json:"-"`
   970  	// NullFields is a list of field names (e.g. "AccessState") to include in API
   971  	// requests with the JSON null value. By default, fields with empty values are
   972  	// omitted from API requests. See
   973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   974  	NullFields []string `json:"-"`
   975  }
   976  
   977  func (s *GoogleCloudPolicysimulatorV1ExplainedAccess) MarshalJSON() ([]byte, error) {
   978  	type NoMethod GoogleCloudPolicysimulatorV1ExplainedAccess
   979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   980  }
   981  
   982  // GoogleCloudPolicysimulatorV1ExplainedPolicy: Details about how a specific
   983  // IAM Policy contributed to the access check.
   984  type GoogleCloudPolicysimulatorV1ExplainedPolicy struct {
   985  	// Access: Indicates whether _this policy_ provides the specified permission to
   986  	// the specified principal for the specified resource. This field does _not_
   987  	// indicate whether the principal actually has the permission for the resource.
   988  	// There might be another policy that overrides this policy. To determine
   989  	// whether the principal actually has the permission, use the `access` field in
   990  	// the TroubleshootIamPolicyResponse.
   991  	//
   992  	// Possible values:
   993  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
   994  	//   "GRANTED" - The principal has the permission.
   995  	//   "NOT_GRANTED" - The principal does not have the permission.
   996  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
   997  	// condition expression evaluates to `true`.
   998  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
   999  	// access to all of the policies that Policy Simulator needs to evaluate.
  1000  	Access string `json:"access,omitempty"`
  1001  	// BindingExplanations: Details about how each binding in the policy affects
  1002  	// the principal's ability, or inability, to use the permission for the
  1003  	// resource. If the user who created the Replay does not have access to the
  1004  	// policy, this field is omitted.
  1005  	BindingExplanations []*GoogleCloudPolicysimulatorV1BindingExplanation `json:"bindingExplanations,omitempty"`
  1006  	// FullResourceName: The full resource name that identifies the resource. For
  1007  	// example,
  1008  	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/m
  1009  	// y-instance`. If the user who created the Replay does not have access to the
  1010  	// policy, this field is omitted. For examples of full resource names for
  1011  	// Google Cloud services, see
  1012  	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
  1013  	FullResourceName string `json:"fullResourceName,omitempty"`
  1014  	// Policy: The IAM policy attached to the resource. If the user who created the
  1015  	// Replay does not have access to the policy, this field is empty.
  1016  	Policy *GoogleIamV1Policy `json:"policy,omitempty"`
  1017  	// Relevance: The relevance of this policy to the overall determination in the
  1018  	// TroubleshootIamPolicyResponse. If the user who created the Replay does not
  1019  	// have access to the policy, this field is omitted.
  1020  	//
  1021  	// Possible values:
  1022  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
  1023  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
  1024  	// data point is unlikely to affect the overall determination.
  1025  	//   "HIGH" - The data point has a strong effect on the result. Changing the
  1026  	// data point is likely to affect the overall determination.
  1027  	Relevance string `json:"relevance,omitempty"`
  1028  	// ForceSendFields is a list of field names (e.g. "Access") to unconditionally
  1029  	// include in API requests. By default, fields with empty or default values are
  1030  	// omitted from API requests. See
  1031  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1032  	// details.
  1033  	ForceSendFields []string `json:"-"`
  1034  	// NullFields is a list of field names (e.g. "Access") to include in API
  1035  	// requests with the JSON null value. By default, fields with empty values are
  1036  	// omitted from API requests. See
  1037  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1038  	NullFields []string `json:"-"`
  1039  }
  1040  
  1041  func (s *GoogleCloudPolicysimulatorV1ExplainedPolicy) MarshalJSON() ([]byte, error) {
  1042  	type NoMethod GoogleCloudPolicysimulatorV1ExplainedPolicy
  1043  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1044  }
  1045  
  1046  // GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse:
  1047  // ListOrgPolicyViolationsPreviewsResponse is the response message for
  1048  // OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
  1049  type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse struct {
  1050  	// NextPageToken: A token that you can use to retrieve the next page of
  1051  	// results. If this field is omitted, there are no subsequent pages.
  1052  	NextPageToken string `json:"nextPageToken,omitempty"`
  1053  	// OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview
  1054  	OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,omitempty"`
  1055  
  1056  	// ServerResponse contains the HTTP response code and headers from the server.
  1057  	googleapi.ServerResponse `json:"-"`
  1058  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1059  	// unconditionally include in API requests. By default, fields with empty or
  1060  	// default values are omitted from API requests. See
  1061  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1062  	// details.
  1063  	ForceSendFields []string `json:"-"`
  1064  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1065  	// requests with the JSON null value. By default, fields with empty values are
  1066  	// omitted from API requests. See
  1067  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1068  	NullFields []string `json:"-"`
  1069  }
  1070  
  1071  func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) {
  1072  	type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
  1073  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1074  }
  1075  
  1076  // GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse:
  1077  // ListOrgPolicyViolationsResponse is the response message for
  1078  // OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
  1079  type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse struct {
  1080  	// NextPageToken: A token that you can use to retrieve the next page of
  1081  	// results. If this field is omitted, there are no subsequent pages.
  1082  	NextPageToken string `json:"nextPageToken,omitempty"`
  1083  	// OrgPolicyViolations: The list of OrgPolicyViolations
  1084  	OrgPolicyViolations []*GoogleCloudPolicysimulatorV1OrgPolicyViolation `json:"orgPolicyViolations,omitempty"`
  1085  
  1086  	// ServerResponse contains the HTTP response code and headers from the server.
  1087  	googleapi.ServerResponse `json:"-"`
  1088  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1089  	// unconditionally include in API requests. By default, fields with empty or
  1090  	// default values are omitted from API requests. See
  1091  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1092  	// details.
  1093  	ForceSendFields []string `json:"-"`
  1094  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1095  	// requests with the JSON null value. By default, fields with empty values are
  1096  	// omitted from API requests. See
  1097  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1098  	NullFields []string `json:"-"`
  1099  }
  1100  
  1101  func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) {
  1102  	type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
  1103  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1104  }
  1105  
  1106  // GoogleCloudPolicysimulatorV1ListReplayResultsResponse: Response message for
  1107  // Simulator.ListReplayResults.
  1108  type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct {
  1109  	// NextPageToken: A token that you can use to retrieve the next page of
  1110  	// ReplayResult objects. If this field is omitted, there are no subsequent
  1111  	// pages.
  1112  	NextPageToken string `json:"nextPageToken,omitempty"`
  1113  	// ReplayResults: The results of running a Replay.
  1114  	ReplayResults []*GoogleCloudPolicysimulatorV1ReplayResult `json:"replayResults,omitempty"`
  1115  
  1116  	// ServerResponse contains the HTTP response code and headers from the server.
  1117  	googleapi.ServerResponse `json:"-"`
  1118  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1119  	// unconditionally include in API requests. By default, fields with empty or
  1120  	// default values are omitted from API requests. See
  1121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1122  	// details.
  1123  	ForceSendFields []string `json:"-"`
  1124  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1125  	// requests with the JSON null value. By default, fields with empty values are
  1126  	// omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1128  	NullFields []string `json:"-"`
  1129  }
  1130  
  1131  func (s *GoogleCloudPolicysimulatorV1ListReplayResultsResponse) MarshalJSON() ([]byte, error) {
  1132  	type NoMethod GoogleCloudPolicysimulatorV1ListReplayResultsResponse
  1133  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1134  }
  1135  
  1136  // GoogleCloudPolicysimulatorV1OrgPolicyOverlay: The proposed changes to
  1137  // OrgPolicy.
  1138  type GoogleCloudPolicysimulatorV1OrgPolicyOverlay struct {
  1139  	// CustomConstraints: Optional. The OrgPolicy CustomConstraint changes to
  1140  	// preview violations for. Any existing CustomConstraints with the same name
  1141  	// will be overridden in the simulation. That is, violations will be determined
  1142  	// as if all custom constraints in the overlay were instantiated. Only a single
  1143  	// custom_constraint is supported in the overlay at a time. For evaluating
  1144  	// multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests
  1145  	// are made, where each request evaluates a single constraint.
  1146  	CustomConstraints []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"`
  1147  	// Policies: Optional. The OrgPolicy changes to preview violations for. Any
  1148  	// existing OrgPolicies with the same name will be overridden in the
  1149  	// simulation. That is, violations will be determined as if all policies in the
  1150  	// overlay were created or updated.
  1151  	Policies []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"`
  1152  	// ForceSendFields is a list of field names (e.g. "CustomConstraints") to
  1153  	// unconditionally include in API requests. By default, fields with empty or
  1154  	// default values are omitted from API requests. See
  1155  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1156  	// details.
  1157  	ForceSendFields []string `json:"-"`
  1158  	// NullFields is a list of field names (e.g. "CustomConstraints") to include in
  1159  	// API requests with the JSON null value. By default, fields with empty values
  1160  	// are omitted from API requests. See
  1161  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1162  	NullFields []string `json:"-"`
  1163  }
  1164  
  1165  func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlay) MarshalJSON() ([]byte, error) {
  1166  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlay
  1167  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1168  }
  1169  
  1170  // GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay: A
  1171  // change to an OrgPolicy custom constraint.
  1172  type GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay struct {
  1173  	// CustomConstraint: Optional. The new or updated custom constraint.
  1174  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  1175  	// CustomConstraintParent: Optional. Resource the constraint is attached to.
  1176  	// Example: "organization/987654"
  1177  	CustomConstraintParent string `json:"customConstraintParent,omitempty"`
  1178  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  1179  	// unconditionally include in API requests. By default, fields with empty or
  1180  	// default values are omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1182  	// details.
  1183  	ForceSendFields []string `json:"-"`
  1184  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  1185  	// API requests with the JSON null value. By default, fields with empty values
  1186  	// are omitted from API requests. See
  1187  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1188  	NullFields []string `json:"-"`
  1189  }
  1190  
  1191  func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) {
  1192  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
  1193  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1194  }
  1195  
  1196  // GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay: A change to an
  1197  // OrgPolicy.
  1198  type GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay struct {
  1199  	// Policy: Optional. The new or updated OrgPolicy.
  1200  	Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"`
  1201  	// PolicyParent: Optional. The parent of the policy we are attaching to.
  1202  	// Example: "projects/123456"
  1203  	PolicyParent string `json:"policyParent,omitempty"`
  1204  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1205  	// include in API requests. By default, fields with empty or default values are
  1206  	// omitted from API requests. See
  1207  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1208  	// details.
  1209  	ForceSendFields []string `json:"-"`
  1210  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1211  	// requests with the JSON null value. By default, fields with empty values are
  1212  	// omitted from API requests. See
  1213  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1214  	NullFields []string `json:"-"`
  1215  }
  1216  
  1217  func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) {
  1218  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
  1219  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1220  }
  1221  
  1222  // GoogleCloudPolicysimulatorV1OrgPolicyViolation: OrgPolicyViolation is a
  1223  // resource representing a single resource violating a single OrgPolicy
  1224  // constraint.
  1225  type GoogleCloudPolicysimulatorV1OrgPolicyViolation struct {
  1226  	// CustomConstraint: The custom constraint being violated.
  1227  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  1228  	// Error: Any error encountered during the evaluation.
  1229  	Error *GoogleRpcStatus `json:"error,omitempty"`
  1230  	// Name: The name of the `OrgPolicyViolation`. Example:
  1231  	// organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506
  1232  	// a5f7f/orgPolicyViolations/38ce`
  1233  	Name string `json:"name,omitempty"`
  1234  	// Resource: The resource violating the constraint.
  1235  	Resource *GoogleCloudPolicysimulatorV1ResourceContext `json:"resource,omitempty"`
  1236  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  1237  	// unconditionally include in API requests. By default, fields with empty or
  1238  	// default values are omitted from API requests. See
  1239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1240  	// details.
  1241  	ForceSendFields []string `json:"-"`
  1242  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  1243  	// API requests with the JSON null value. By default, fields with empty values
  1244  	// are omitted from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1246  	NullFields []string `json:"-"`
  1247  }
  1248  
  1249  func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolation) MarshalJSON() ([]byte, error) {
  1250  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolation
  1251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1252  }
  1253  
  1254  // GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview:
  1255  // OrgPolicyViolationsPreview is a resource providing a preview of the
  1256  // violations that will exist if an OrgPolicy change is made. The list of
  1257  // violations are modeled as child resources and retrieved via a
  1258  // ListOrgPolicyViolations API call. There are potentially more
  1259  // OrgPolicyViolations than could fit in an embedded field. Thus, the use of a
  1260  // child resource instead of a field.
  1261  type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview struct {
  1262  	// CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` was
  1263  	// created.
  1264  	CreateTime string `json:"createTime,omitempty"`
  1265  	// CustomConstraints: Output only. The names of the constraints against which
  1266  	// all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only
  1267  	// contains `PolicyOverlay` then it contains the name of the configured custom
  1268  	// constraint, applicable to the specified policies. Otherwise it contains the
  1269  	// name of the constraint specified in `CustomConstraintOverlay`. Format:
  1270  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
  1271  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
  1272  	CustomConstraints []string `json:"customConstraints,omitempty"`
  1273  	// Name: Output only. The resource name of the `OrgPolicyViolationsPreview`. It
  1274  	// has the following format:
  1275  	// `organizations/{organization}/locations/{location}/orgPolicyViolationsPreview
  1276  	// s/{orgPolicyViolationsPreview}` Example:
  1277  	// `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/50
  1278  	// 6a5f7f`
  1279  	Name string `json:"name,omitempty"`
  1280  	// Overlay: Required. The proposed changes we are previewing violations for.
  1281  	Overlay *GoogleCloudPolicysimulatorV1OrgPolicyOverlay `json:"overlay,omitempty"`
  1282  	// ResourceCounts: Output only. A summary of the state of all resources scanned
  1283  	// for compliance with the changed OrgPolicy.
  1284  	ResourceCounts *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"`
  1285  	// State: Output only. The state of the `OrgPolicyViolationsPreview`.
  1286  	//
  1287  	// Possible values:
  1288  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1289  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1290  	// yet.
  1291  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1292  	// created.
  1293  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1294  	// successfully.
  1295  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1296  	// error.
  1297  	State string `json:"state,omitempty"`
  1298  	// ViolationsCount: Output only. The number of OrgPolicyViolations in this
  1299  	// `OrgPolicyViolationsPreview`. This count may differ from
  1300  	// `resource_summary.noncompliant_count` because each OrgPolicyViolation is
  1301  	// specific to a resource **and** constraint. If there are multiple constraints
  1302  	// being evaluated (i.e. multiple policies in the overlay), a single resource
  1303  	// may violate multiple constraints.
  1304  	ViolationsCount int64 `json:"violationsCount,omitempty"`
  1305  
  1306  	// ServerResponse contains the HTTP response code and headers from the server.
  1307  	googleapi.ServerResponse `json:"-"`
  1308  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1309  	// unconditionally include in API requests. By default, fields with empty or
  1310  	// default values are omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1312  	// details.
  1313  	ForceSendFields []string `json:"-"`
  1314  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1315  	// requests with the JSON null value. By default, fields with empty values are
  1316  	// omitted from API requests. See
  1317  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1318  	NullFields []string `json:"-"`
  1319  }
  1320  
  1321  func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) {
  1322  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
  1323  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1324  }
  1325  
  1326  // GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts: A
  1327  // summary of the state of all resources scanned for compliance with the
  1328  // changed OrgPolicy.
  1329  type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts struct {
  1330  	// Compliant: Output only. Number of scanned resources with zero violations.
  1331  	Compliant int64 `json:"compliant,omitempty"`
  1332  	// Errors: Output only. Number of resources that returned an error when
  1333  	// scanned.
  1334  	Errors int64 `json:"errors,omitempty"`
  1335  	// Noncompliant: Output only. Number of scanned resources with at least one
  1336  	// violation.
  1337  	Noncompliant int64 `json:"noncompliant,omitempty"`
  1338  	// Scanned: Output only. Number of resources checked for compliance. Must
  1339  	// equal: unenforced + noncompliant + compliant + error
  1340  	Scanned int64 `json:"scanned,omitempty"`
  1341  	// Unenforced: Output only. Number of resources where the constraint was not
  1342  	// enforced, i.e. the Policy set `enforced: false` for that resource.
  1343  	Unenforced int64 `json:"unenforced,omitempty"`
  1344  	// ForceSendFields is a list of field names (e.g. "Compliant") to
  1345  	// unconditionally include in API requests. By default, fields with empty or
  1346  	// default values are omitted from API requests. See
  1347  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1348  	// details.
  1349  	ForceSendFields []string `json:"-"`
  1350  	// NullFields is a list of field names (e.g. "Compliant") to include in API
  1351  	// requests with the JSON null value. By default, fields with empty values are
  1352  	// omitted from API requests. See
  1353  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1354  	NullFields []string `json:"-"`
  1355  }
  1356  
  1357  func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) {
  1358  	type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
  1359  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1360  }
  1361  
  1362  // GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, or
  1363  // simulation.
  1364  type GoogleCloudPolicysimulatorV1Replay struct {
  1365  	// Config: Required. The configuration used for the `Replay`.
  1366  	Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"`
  1367  	// Name: Output only. The resource name of the `Replay`, which has the
  1368  	// following format:
  1369  	// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{rep
  1370  	// lay-id}`, where `{resource-id}` is the ID of the project, folder, or
  1371  	// organization that owns the Replay. Example:
  1372  	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03
  1373  	// -479ce1833c36`
  1374  	Name string `json:"name,omitempty"`
  1375  	// ResultsSummary: Output only. Summary statistics about the replayed log
  1376  	// entries.
  1377  	ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"`
  1378  	// State: Output only. The current state of the `Replay`.
  1379  	//
  1380  	// Possible values:
  1381  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
  1382  	//   "PENDING" - The `Replay` has not started yet.
  1383  	//   "RUNNING" - The `Replay` is currently running.
  1384  	//   "SUCCEEDED" - The `Replay` has successfully completed.
  1385  	//   "FAILED" - The `Replay` has finished with an error.
  1386  	State string `json:"state,omitempty"`
  1387  
  1388  	// ServerResponse contains the HTTP response code and headers from the server.
  1389  	googleapi.ServerResponse `json:"-"`
  1390  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
  1391  	// include in API requests. By default, fields with empty or default values are
  1392  	// omitted from API requests. See
  1393  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1394  	// details.
  1395  	ForceSendFields []string `json:"-"`
  1396  	// NullFields is a list of field names (e.g. "Config") to include in API
  1397  	// requests with the JSON null value. By default, fields with empty values are
  1398  	// omitted from API requests. See
  1399  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1400  	NullFields []string `json:"-"`
  1401  }
  1402  
  1403  func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) {
  1404  	type NoMethod GoogleCloudPolicysimulatorV1Replay
  1405  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1406  }
  1407  
  1408  // GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for a
  1409  // Replay.
  1410  type GoogleCloudPolicysimulatorV1ReplayConfig struct {
  1411  	// LogSource: The logs to use as input for the Replay.
  1412  	//
  1413  	// Possible values:
  1414  	//   "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log source is
  1415  	// unspecified, the Replay defaults to using `RECENT_ACCESSES`.
  1416  	//   "RECENT_ACCESSES" - All access logs from the last 90 days. These logs may
  1417  	// not include logs from the most recent 7 days.
  1418  	LogSource string `json:"logSource,omitempty"`
  1419  	// PolicyOverlay: A mapping of the resources that you want to simulate policies
  1420  	// for and the policies that you want to simulate. Keys are the full resource
  1421  	// names for the resources. For example,
  1422  	// `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of
  1423  	// full resource names for Google Cloud services, see
  1424  	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
  1425  	// are Policy objects representing the policies that you want to simulate.
  1426  	// Replays automatically take into account any IAM policies inherited through
  1427  	// the resource hierarchy, and any policies set on descendant resources. You do
  1428  	// not need to include these policies in the policy overlay.
  1429  	PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"`
  1430  	// ForceSendFields is a list of field names (e.g. "LogSource") to
  1431  	// unconditionally include in API requests. By default, fields with empty or
  1432  	// default values are omitted from API requests. See
  1433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1434  	// details.
  1435  	ForceSendFields []string `json:"-"`
  1436  	// NullFields is a list of field names (e.g. "LogSource") to include in API
  1437  	// requests with the JSON null value. By default, fields with empty values are
  1438  	// omitted from API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1440  	NullFields []string `json:"-"`
  1441  }
  1442  
  1443  func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) {
  1444  	type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig
  1445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1446  }
  1447  
  1448  // GoogleCloudPolicysimulatorV1ReplayDiff: The difference between the results
  1449  // of evaluating an access tuple under the current (baseline) policies and
  1450  // under the proposed (simulated) policies. This difference explains how a
  1451  // principal's access could change if the proposed policies were applied.
  1452  type GoogleCloudPolicysimulatorV1ReplayDiff struct {
  1453  	// AccessDiff: A summary and comparison of the principal's access under the
  1454  	// current (baseline) policies and the proposed (simulated) policies for a
  1455  	// single access tuple. The evaluation of the principal's access is reported in
  1456  	// the AccessState field.
  1457  	AccessDiff *GoogleCloudPolicysimulatorV1AccessStateDiff `json:"accessDiff,omitempty"`
  1458  	// ForceSendFields is a list of field names (e.g. "AccessDiff") to
  1459  	// unconditionally include in API requests. By default, fields with empty or
  1460  	// default values are omitted from API requests. See
  1461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1462  	// details.
  1463  	ForceSendFields []string `json:"-"`
  1464  	// NullFields is a list of field names (e.g. "AccessDiff") to include in API
  1465  	// requests with the JSON null value. By default, fields with empty values are
  1466  	// omitted from API requests. See
  1467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1468  	NullFields []string `json:"-"`
  1469  }
  1470  
  1471  func (s *GoogleCloudPolicysimulatorV1ReplayDiff) MarshalJSON() ([]byte, error) {
  1472  	type NoMethod GoogleCloudPolicysimulatorV1ReplayDiff
  1473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1474  }
  1475  
  1476  // GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a Replay
  1477  // operation.
  1478  type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct {
  1479  	// StartTime: Time when the request was received.
  1480  	StartTime string `json:"startTime,omitempty"`
  1481  	// ForceSendFields is a list of field names (e.g. "StartTime") to
  1482  	// unconditionally include in API requests. By default, fields with empty or
  1483  	// default values are omitted from API requests. See
  1484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1485  	// details.
  1486  	ForceSendFields []string `json:"-"`
  1487  	// NullFields is a list of field names (e.g. "StartTime") to include in API
  1488  	// requests with the JSON null value. By default, fields with empty values are
  1489  	// omitted from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1491  	NullFields []string `json:"-"`
  1492  }
  1493  
  1494  func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) {
  1495  	type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata
  1496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1497  }
  1498  
  1499  // GoogleCloudPolicysimulatorV1ReplayResult: The result of replaying a single
  1500  // access tuple against a simulated state.
  1501  type GoogleCloudPolicysimulatorV1ReplayResult struct {
  1502  	// AccessTuple: The access tuple that was replayed. This field includes
  1503  	// information about the principal, resource, and permission that were involved
  1504  	// in the access attempt.
  1505  	AccessTuple *GoogleCloudPolicysimulatorV1AccessTuple `json:"accessTuple,omitempty"`
  1506  	// Diff: The difference between the principal's access under the current
  1507  	// (baseline) policies and the principal's access under the proposed
  1508  	// (simulated) policies. This field is only included for access tuples that
  1509  	// were successfully replayed and had different results under the current
  1510  	// policies and the proposed policies.
  1511  	Diff *GoogleCloudPolicysimulatorV1ReplayDiff `json:"diff,omitempty"`
  1512  	// Error: The error that caused the access tuple replay to fail. This field is
  1513  	// only included for access tuples that were not replayed successfully.
  1514  	Error *GoogleRpcStatus `json:"error,omitempty"`
  1515  	// LastSeenDate: The latest date this access tuple was seen in the logs.
  1516  	LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"`
  1517  	// Name: The resource name of the `ReplayResult`, in the following format:
  1518  	// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{rep
  1519  	// lay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the
  1520  	// project, folder, or organization that owns the Replay. Example:
  1521  	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03
  1522  	// -479ce1833c36/results/1234`
  1523  	Name string `json:"name,omitempty"`
  1524  	// Parent: The Replay that the access tuple was included in.
  1525  	Parent string `json:"parent,omitempty"`
  1526  	// ForceSendFields is a list of field names (e.g. "AccessTuple") to
  1527  	// unconditionally include in API requests. By default, fields with empty or
  1528  	// default values are omitted from API requests. See
  1529  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1530  	// details.
  1531  	ForceSendFields []string `json:"-"`
  1532  	// NullFields is a list of field names (e.g. "AccessTuple") to include in API
  1533  	// requests with the JSON null value. By default, fields with empty values are
  1534  	// omitted from API requests. See
  1535  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1536  	NullFields []string `json:"-"`
  1537  }
  1538  
  1539  func (s *GoogleCloudPolicysimulatorV1ReplayResult) MarshalJSON() ([]byte, error) {
  1540  	type NoMethod GoogleCloudPolicysimulatorV1ReplayResult
  1541  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1542  }
  1543  
  1544  // GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics about
  1545  // the replayed log entries.
  1546  type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct {
  1547  	// DifferenceCount: The number of replayed log entries with a difference
  1548  	// between baseline and simulated policies.
  1549  	DifferenceCount int64 `json:"differenceCount,omitempty"`
  1550  	// ErrorCount: The number of log entries that could not be replayed.
  1551  	ErrorCount int64 `json:"errorCount,omitempty"`
  1552  	// LogCount: The total number of log entries replayed.
  1553  	LogCount int64 `json:"logCount,omitempty"`
  1554  	// NewestDate: The date of the newest log entry replayed.
  1555  	NewestDate *GoogleTypeDate `json:"newestDate,omitempty"`
  1556  	// OldestDate: The date of the oldest log entry replayed.
  1557  	OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"`
  1558  	// UnchangedCount: The number of replayed log entries with no difference
  1559  	// between baseline and simulated policies.
  1560  	UnchangedCount int64 `json:"unchangedCount,omitempty"`
  1561  	// ForceSendFields is a list of field names (e.g. "DifferenceCount") to
  1562  	// unconditionally include in API requests. By default, fields with empty or
  1563  	// default values are omitted from API requests. See
  1564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1565  	// details.
  1566  	ForceSendFields []string `json:"-"`
  1567  	// NullFields is a list of field names (e.g. "DifferenceCount") to include in
  1568  	// API requests with the JSON null value. By default, fields with empty values
  1569  	// are omitted from API requests. See
  1570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1571  	NullFields []string `json:"-"`
  1572  }
  1573  
  1574  func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) {
  1575  	type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary
  1576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1577  }
  1578  
  1579  // GoogleCloudPolicysimulatorV1ResourceContext: ResourceContext provides the
  1580  // context we know about a resource. It is similar in concept to
  1581  // google.cloud.asset.v1.Resource, but focuses on the information specifically
  1582  // used by Simulator.
  1583  type GoogleCloudPolicysimulatorV1ResourceContext struct {
  1584  	// Ancestors: The ancestry path of the resource in Google Cloud resource
  1585  	// hierarchy
  1586  	// (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
  1587  	// represented as a list of relative resource names. An ancestry path starts
  1588  	// with the closest ancestor in the hierarchy and ends at root. If the resource
  1589  	// is a project, folder, or organization, the ancestry path starts from the
  1590  	// resource itself. Example: `["projects/123456789", "folders/5432",
  1591  	// "organizations/1234"]`
  1592  	Ancestors []string `json:"ancestors,omitempty"`
  1593  	// AssetType: The asset type of the resource as defined by CAIS. Example:
  1594  	// `compute.googleapis.com/Firewall` See Supported asset types
  1595  	// (https://cloud.google.com/asset-inventory/docs/supported-asset-types) for
  1596  	// more information.
  1597  	AssetType string `json:"assetType,omitempty"`
  1598  	// Resource: The full name of the resource. Example:
  1599  	// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/insta
  1600  	// nce1` See Resource names
  1601  	// (https://cloud.google.com/apis/design/resource_names#full_resource_name) for
  1602  	// more information.
  1603  	Resource string `json:"resource,omitempty"`
  1604  	// ForceSendFields is a list of field names (e.g. "Ancestors") to
  1605  	// unconditionally include in API requests. By default, fields with empty or
  1606  	// default values are omitted from API requests. See
  1607  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1608  	// details.
  1609  	ForceSendFields []string `json:"-"`
  1610  	// NullFields is a list of field names (e.g. "Ancestors") to include in API
  1611  	// requests with the JSON null value. By default, fields with empty values are
  1612  	// omitted from API requests. See
  1613  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1614  	NullFields []string `json:"-"`
  1615  }
  1616  
  1617  func (s *GoogleCloudPolicysimulatorV1ResourceContext) MarshalJSON() ([]byte, error) {
  1618  	type NoMethod GoogleCloudPolicysimulatorV1ResourceContext
  1619  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1620  }
  1621  
  1622  // GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMet
  1623  // adata: CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about
  1624  // an OrgPolicyViolationsPreview generations operation.
  1625  type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct {
  1626  	// RequestTime: Time when the request was received.
  1627  	RequestTime string `json:"requestTime,omitempty"`
  1628  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1629  	// resource_scanned + resources_pending
  1630  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1631  	// ResourcesPending: Number of resources still to scan.
  1632  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1633  	// ResourcesScanned: Number of resources already scanned.
  1634  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1635  	// StartTime: Time when the request started processing, i.e., when the state
  1636  	// was set to RUNNING.
  1637  	StartTime string `json:"startTime,omitempty"`
  1638  	// State: Output only. The current state of the operation.
  1639  	//
  1640  	// Possible values:
  1641  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1642  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1643  	// yet.
  1644  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1645  	// created.
  1646  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1647  	// successfully.
  1648  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1649  	// error.
  1650  	State string `json:"state,omitempty"`
  1651  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1652  	// unconditionally include in API requests. By default, fields with empty or
  1653  	// default values are omitted from API requests. See
  1654  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1655  	// details.
  1656  	ForceSendFields []string `json:"-"`
  1657  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1658  	// requests with the JSON null value. By default, fields with empty values are
  1659  	// omitted from API requests. See
  1660  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1661  	NullFields []string `json:"-"`
  1662  }
  1663  
  1664  func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1665  	type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
  1666  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1667  }
  1668  
  1669  // GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationM
  1670  // etadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata
  1671  // about an OrgPolicyViolationsPreview generations operation.
  1672  type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct {
  1673  	// RequestTime: Time when the request was received.
  1674  	RequestTime string `json:"requestTime,omitempty"`
  1675  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1676  	// resource_scanned + resources_pending
  1677  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1678  	// ResourcesPending: Number of resources still to scan.
  1679  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1680  	// ResourcesScanned: Number of resources already scanned.
  1681  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1682  	// StartTime: Time when the request started processing, i.e. when the state was
  1683  	// set to RUNNING.
  1684  	StartTime string `json:"startTime,omitempty"`
  1685  	// State: The current state of the operation.
  1686  	//
  1687  	// Possible values:
  1688  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1689  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1690  	// yet.
  1691  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1692  	// created.
  1693  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1694  	// successfully.
  1695  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1696  	// error.
  1697  	State string `json:"state,omitempty"`
  1698  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1699  	// unconditionally include in API requests. By default, fields with empty or
  1700  	// default values are omitted from API requests. See
  1701  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1702  	// details.
  1703  	ForceSendFields []string `json:"-"`
  1704  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1705  	// requests with the JSON null value. By default, fields with empty values are
  1706  	// omitted from API requests. See
  1707  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1708  	NullFields []string `json:"-"`
  1709  }
  1710  
  1711  func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1712  	type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
  1713  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1714  }
  1715  
  1716  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed changes to
  1717  // OrgPolicy.
  1718  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct {
  1719  	// CustomConstraints: Optional. The OrgPolicy CustomConstraint changes to
  1720  	// preview violations for. Any existing CustomConstraints with the same name
  1721  	// will be overridden in the simulation. That is, violations will be determined
  1722  	// as if all custom constraints in the overlay were instantiated. Only a single
  1723  	// custom_constraint is supported in the overlay at a time. For evaluating
  1724  	// multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests
  1725  	// are made, where each request evaluates a single constraint.
  1726  	CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"`
  1727  	// Policies: Optional. The OrgPolicy changes to preview violations for. Any
  1728  	// existing OrgPolicies with the same name will be overridden in the
  1729  	// simulation. That is, violations will be determined as if all policies in the
  1730  	// overlay were created or updated.
  1731  	Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"`
  1732  	// ForceSendFields is a list of field names (e.g. "CustomConstraints") to
  1733  	// unconditionally include in API requests. By default, fields with empty or
  1734  	// default values are omitted from API requests. See
  1735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1736  	// details.
  1737  	ForceSendFields []string `json:"-"`
  1738  	// NullFields is a list of field names (e.g. "CustomConstraints") to include in
  1739  	// API requests with the JSON null value. By default, fields with empty values
  1740  	// are omitted from API requests. See
  1741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1742  	NullFields []string `json:"-"`
  1743  }
  1744  
  1745  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) {
  1746  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
  1747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1748  }
  1749  
  1750  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay: A
  1751  // change to an OrgPolicy custom constraint.
  1752  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct {
  1753  	// CustomConstraint: Optional. The new or updated custom constraint.
  1754  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  1755  	// CustomConstraintParent: Optional. Resource the constraint is attached to.
  1756  	// Example: "organization/987654"
  1757  	CustomConstraintParent string `json:"customConstraintParent,omitempty"`
  1758  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  1759  	// unconditionally include in API requests. By default, fields with empty or
  1760  	// default values are omitted from API requests. See
  1761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1762  	// details.
  1763  	ForceSendFields []string `json:"-"`
  1764  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  1765  	// API requests with the JSON null value. By default, fields with empty values
  1766  	// are omitted from API requests. See
  1767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1768  	NullFields []string `json:"-"`
  1769  }
  1770  
  1771  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) {
  1772  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay
  1773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1774  }
  1775  
  1776  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A change to
  1777  // an OrgPolicy.
  1778  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct {
  1779  	// Policy: Optional. The new or updated OrgPolicy.
  1780  	Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"`
  1781  	// PolicyParent: Optional. The parent of the policy we are attaching to.
  1782  	// Example: "projects/123456"
  1783  	PolicyParent string `json:"policyParent,omitempty"`
  1784  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1785  	// include in API requests. By default, fields with empty or default values are
  1786  	// omitted from API requests. See
  1787  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1788  	// details.
  1789  	ForceSendFields []string `json:"-"`
  1790  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1791  	// requests with the JSON null value. By default, fields with empty values are
  1792  	// omitted from API requests. See
  1793  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1794  	NullFields []string `json:"-"`
  1795  }
  1796  
  1797  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) {
  1798  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay
  1799  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1800  }
  1801  
  1802  // GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview:
  1803  // OrgPolicyViolationsPreview is a resource providing a preview of the
  1804  // violations that will exist if an OrgPolicy change is made. The list of
  1805  // violations are modeled as child resources and retrieved via a
  1806  // ListOrgPolicyViolations API call. There are potentially more
  1807  // OrgPolicyViolations than could fit in an embedded field. Thus, the use of a
  1808  // child resource instead of a field.
  1809  type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct {
  1810  	// CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` was
  1811  	// created.
  1812  	CreateTime string `json:"createTime,omitempty"`
  1813  	// CustomConstraints: Output only. The names of the constraints against which
  1814  	// all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only
  1815  	// contains `PolicyOverlay` then it contains the name of the configured custom
  1816  	// constraint, applicable to the specified policies. Otherwise it contains the
  1817  	// name of the constraint specified in `CustomConstraintOverlay`. Format:
  1818  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
  1819  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
  1820  	CustomConstraints []string `json:"customConstraints,omitempty"`
  1821  	// Name: Output only. The resource name of the `OrgPolicyViolationsPreview`. It
  1822  	// has the following format:
  1823  	// `organizations/{organization}/locations/{location}/orgPolicyViolationsPreview
  1824  	// s/{orgPolicyViolationsPreview}` Example:
  1825  	// `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/50
  1826  	// 6a5f7f`
  1827  	Name string `json:"name,omitempty"`
  1828  	// Overlay: Required. The proposed changes we are previewing violations for.
  1829  	Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"`
  1830  	// ResourceCounts: Output only. A summary of the state of all resources scanned
  1831  	// for compliance with the changed OrgPolicy.
  1832  	ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"`
  1833  	// State: Output only. The state of the `OrgPolicyViolationsPreview`.
  1834  	//
  1835  	// Possible values:
  1836  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1837  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1838  	// yet.
  1839  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1840  	// created.
  1841  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1842  	// successfully.
  1843  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1844  	// error.
  1845  	State string `json:"state,omitempty"`
  1846  	// ViolationsCount: Output only. The number of OrgPolicyViolations in this
  1847  	// `OrgPolicyViolationsPreview`. This count may differ from
  1848  	// `resource_summary.noncompliant_count` because each OrgPolicyViolation is
  1849  	// specific to a resource **and** constraint. If there are multiple constraints
  1850  	// being evaluated (i.e. multiple policies in the overlay), a single resource
  1851  	// may violate multiple constraints.
  1852  	ViolationsCount int64 `json:"violationsCount,omitempty"`
  1853  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1854  	// unconditionally include in API requests. By default, fields with empty or
  1855  	// default values are omitted from API requests. See
  1856  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1857  	// details.
  1858  	ForceSendFields []string `json:"-"`
  1859  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1860  	// requests with the JSON null value. By default, fields with empty values are
  1861  	// omitted from API requests. See
  1862  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1863  	NullFields []string `json:"-"`
  1864  }
  1865  
  1866  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) {
  1867  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
  1868  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1869  }
  1870  
  1871  // GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts: A
  1872  // summary of the state of all resources scanned for compliance with the
  1873  // changed OrgPolicy.
  1874  type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct {
  1875  	// Compliant: Output only. Number of scanned resources with zero violations.
  1876  	Compliant int64 `json:"compliant,omitempty"`
  1877  	// Errors: Output only. Number of resources that returned an error when
  1878  	// scanned.
  1879  	Errors int64 `json:"errors,omitempty"`
  1880  	// Noncompliant: Output only. Number of scanned resources with at least one
  1881  	// violation.
  1882  	Noncompliant int64 `json:"noncompliant,omitempty"`
  1883  	// Scanned: Output only. Number of resources checked for compliance. Must
  1884  	// equal: unenforced + noncompliant + compliant + error
  1885  	Scanned int64 `json:"scanned,omitempty"`
  1886  	// Unenforced: Output only. Number of resources where the constraint was not
  1887  	// enforced, i.e. the Policy set `enforced: false` for that resource.
  1888  	Unenforced int64 `json:"unenforced,omitempty"`
  1889  	// ForceSendFields is a list of field names (e.g. "Compliant") to
  1890  	// unconditionally include in API requests. By default, fields with empty or
  1891  	// default values are omitted from API requests. See
  1892  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1893  	// details.
  1894  	ForceSendFields []string `json:"-"`
  1895  	// NullFields is a list of field names (e.g. "Compliant") to include in API
  1896  	// requests with the JSON null value. By default, fields with empty values are
  1897  	// omitted from API requests. See
  1898  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1899  	NullFields []string `json:"-"`
  1900  }
  1901  
  1902  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) {
  1903  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
  1904  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1905  }
  1906  
  1907  // GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMeta
  1908  // data: CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
  1909  // OrgPolicyViolationsPreview generations operation.
  1910  type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct {
  1911  	// RequestTime: Time when the request was received.
  1912  	RequestTime string `json:"requestTime,omitempty"`
  1913  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1914  	// resource_scanned + resources_pending
  1915  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1916  	// ResourcesPending: Number of resources still to scan.
  1917  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1918  	// ResourcesScanned: Number of resources already scanned.
  1919  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1920  	// StartTime: Time when the request started processing, i.e., when the state
  1921  	// was set to RUNNING.
  1922  	StartTime string `json:"startTime,omitempty"`
  1923  	// State: Output only. The current state of the operation.
  1924  	//
  1925  	// Possible values:
  1926  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1927  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1928  	// yet.
  1929  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1930  	// created.
  1931  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1932  	// successfully.
  1933  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1934  	// error.
  1935  	State string `json:"state,omitempty"`
  1936  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1937  	// unconditionally include in API requests. By default, fields with empty or
  1938  	// default values are omitted from API requests. See
  1939  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1940  	// details.
  1941  	ForceSendFields []string `json:"-"`
  1942  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1943  	// requests with the JSON null value. By default, fields with empty values are
  1944  	// omitted from API requests. See
  1945  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1946  	NullFields []string `json:"-"`
  1947  }
  1948  
  1949  func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1950  	type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
  1951  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1952  }
  1953  
  1954  // GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMe
  1955  // tadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata
  1956  // about an OrgPolicyViolationsPreview generations operation.
  1957  type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct {
  1958  	// RequestTime: Time when the request was received.
  1959  	RequestTime string `json:"requestTime,omitempty"`
  1960  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1961  	// resource_scanned + resources_pending
  1962  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1963  	// ResourcesPending: Number of resources still to scan.
  1964  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1965  	// ResourcesScanned: Number of resources already scanned.
  1966  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1967  	// StartTime: Time when the request started processing, i.e. when the state was
  1968  	// set to RUNNING.
  1969  	StartTime string `json:"startTime,omitempty"`
  1970  	// State: The current state of the operation.
  1971  	//
  1972  	// Possible values:
  1973  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1974  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1975  	// yet.
  1976  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1977  	// created.
  1978  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1979  	// successfully.
  1980  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1981  	// error.
  1982  	State string `json:"state,omitempty"`
  1983  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1984  	// unconditionally include in API requests. By default, fields with empty or
  1985  	// default values are omitted from API requests. See
  1986  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1987  	// details.
  1988  	ForceSendFields []string `json:"-"`
  1989  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1990  	// requests with the JSON null value. By default, fields with empty values are
  1991  	// omitted from API requests. See
  1992  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1993  	NullFields []string `json:"-"`
  1994  }
  1995  
  1996  func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1997  	type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
  1998  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1999  }
  2000  
  2001  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed changes to
  2002  // OrgPolicy.
  2003  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct {
  2004  	// CustomConstraints: Optional. The OrgPolicy CustomConstraint changes to
  2005  	// preview violations for. Any existing CustomConstraints with the same name
  2006  	// will be overridden in the simulation. That is, violations will be determined
  2007  	// as if all custom constraints in the overlay were instantiated. Only a single
  2008  	// custom_constraint is supported in the overlay at a time. For evaluating
  2009  	// multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests
  2010  	// are made, where each request evaluates a single constraint.
  2011  	CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"`
  2012  	// Policies: Optional. The OrgPolicy changes to preview violations for. Any
  2013  	// existing OrgPolicies with the same name will be overridden in the
  2014  	// simulation. That is, violations will be determined as if all policies in the
  2015  	// overlay were created or updated.
  2016  	Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"`
  2017  	// ForceSendFields is a list of field names (e.g. "CustomConstraints") to
  2018  	// unconditionally include in API requests. By default, fields with empty or
  2019  	// default values are omitted from API requests. See
  2020  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2021  	// details.
  2022  	ForceSendFields []string `json:"-"`
  2023  	// NullFields is a list of field names (e.g. "CustomConstraints") to include in
  2024  	// API requests with the JSON null value. By default, fields with empty values
  2025  	// are omitted from API requests. See
  2026  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2027  	NullFields []string `json:"-"`
  2028  }
  2029  
  2030  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) {
  2031  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
  2032  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2033  }
  2034  
  2035  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay: A
  2036  // change to an OrgPolicy custom constraint.
  2037  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct {
  2038  	// CustomConstraint: Optional. The new or updated custom constraint.
  2039  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  2040  	// CustomConstraintParent: Optional. Resource the constraint is attached to.
  2041  	// Example: "organization/987654"
  2042  	CustomConstraintParent string `json:"customConstraintParent,omitempty"`
  2043  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  2044  	// unconditionally include in API requests. By default, fields with empty or
  2045  	// default values are omitted from API requests. See
  2046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2047  	// details.
  2048  	ForceSendFields []string `json:"-"`
  2049  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  2050  	// API requests with the JSON null value. By default, fields with empty values
  2051  	// are omitted from API requests. See
  2052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2053  	NullFields []string `json:"-"`
  2054  }
  2055  
  2056  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) {
  2057  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
  2058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2059  }
  2060  
  2061  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A change to
  2062  // an OrgPolicy.
  2063  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct {
  2064  	// Policy: Optional. The new or updated OrgPolicy.
  2065  	Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"`
  2066  	// PolicyParent: Optional. The parent of the policy we are attaching to.
  2067  	// Example: "projects/123456"
  2068  	PolicyParent string `json:"policyParent,omitempty"`
  2069  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  2070  	// include in API requests. By default, fields with empty or default values are
  2071  	// omitted from API requests. See
  2072  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2073  	// details.
  2074  	ForceSendFields []string `json:"-"`
  2075  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2076  	// requests with the JSON null value. By default, fields with empty values are
  2077  	// omitted from API requests. See
  2078  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2079  	NullFields []string `json:"-"`
  2080  }
  2081  
  2082  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) {
  2083  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
  2084  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2085  }
  2086  
  2087  // GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview:
  2088  // OrgPolicyViolationsPreview is a resource providing a preview of the
  2089  // violations that will exist if an OrgPolicy change is made. The list of
  2090  // violations are modeled as child resources and retrieved via a
  2091  // ListOrgPolicyViolations API call. There are potentially more
  2092  // OrgPolicyViolations than could fit in an embedded field. Thus, the use of a
  2093  // child resource instead of a field.
  2094  type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct {
  2095  	// CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` was
  2096  	// created.
  2097  	CreateTime string `json:"createTime,omitempty"`
  2098  	// CustomConstraints: Output only. The names of the constraints against which
  2099  	// all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only
  2100  	// contains `PolicyOverlay` then it contains the name of the configured custom
  2101  	// constraint, applicable to the specified policies. Otherwise it contains the
  2102  	// name of the constraint specified in `CustomConstraintOverlay`. Format:
  2103  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
  2104  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
  2105  	CustomConstraints []string `json:"customConstraints,omitempty"`
  2106  	// Name: Output only. The resource name of the `OrgPolicyViolationsPreview`. It
  2107  	// has the following format:
  2108  	// `organizations/{organization}/locations/{location}/orgPolicyViolationsPreview
  2109  	// s/{orgPolicyViolationsPreview}` Example:
  2110  	// `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/50
  2111  	// 6a5f7f`
  2112  	Name string `json:"name,omitempty"`
  2113  	// Overlay: Required. The proposed changes we are previewing violations for.
  2114  	Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"`
  2115  	// ResourceCounts: Output only. A summary of the state of all resources scanned
  2116  	// for compliance with the changed OrgPolicy.
  2117  	ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"`
  2118  	// State: Output only. The state of the `OrgPolicyViolationsPreview`.
  2119  	//
  2120  	// Possible values:
  2121  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  2122  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  2123  	// yet.
  2124  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  2125  	// created.
  2126  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  2127  	// successfully.
  2128  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  2129  	// error.
  2130  	State string `json:"state,omitempty"`
  2131  	// ViolationsCount: Output only. The number of OrgPolicyViolations in this
  2132  	// `OrgPolicyViolationsPreview`. This count may differ from
  2133  	// `resource_summary.noncompliant_count` because each OrgPolicyViolation is
  2134  	// specific to a resource **and** constraint. If there are multiple constraints
  2135  	// being evaluated (i.e. multiple policies in the overlay), a single resource
  2136  	// may violate multiple constraints.
  2137  	ViolationsCount int64 `json:"violationsCount,omitempty"`
  2138  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2139  	// unconditionally include in API requests. By default, fields with empty or
  2140  	// default values are omitted from API requests. See
  2141  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2142  	// details.
  2143  	ForceSendFields []string `json:"-"`
  2144  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2145  	// requests with the JSON null value. By default, fields with empty values are
  2146  	// omitted from API requests. See
  2147  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2148  	NullFields []string `json:"-"`
  2149  }
  2150  
  2151  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) {
  2152  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
  2153  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2154  }
  2155  
  2156  // GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts: A
  2157  // summary of the state of all resources scanned for compliance with the
  2158  // changed OrgPolicy.
  2159  type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct {
  2160  	// Compliant: Output only. Number of scanned resources with zero violations.
  2161  	Compliant int64 `json:"compliant,omitempty"`
  2162  	// Errors: Output only. Number of resources that returned an error when
  2163  	// scanned.
  2164  	Errors int64 `json:"errors,omitempty"`
  2165  	// Noncompliant: Output only. Number of scanned resources with at least one
  2166  	// violation.
  2167  	Noncompliant int64 `json:"noncompliant,omitempty"`
  2168  	// Scanned: Output only. Number of resources checked for compliance. Must
  2169  	// equal: unenforced + noncompliant + compliant + error
  2170  	Scanned int64 `json:"scanned,omitempty"`
  2171  	// Unenforced: Output only. Number of resources where the constraint was not
  2172  	// enforced, i.e. the Policy set `enforced: false` for that resource.
  2173  	Unenforced int64 `json:"unenforced,omitempty"`
  2174  	// ForceSendFields is a list of field names (e.g. "Compliant") to
  2175  	// unconditionally include in API requests. By default, fields with empty or
  2176  	// default values are omitted from API requests. See
  2177  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2178  	// details.
  2179  	ForceSendFields []string `json:"-"`
  2180  	// NullFields is a list of field names (e.g. "Compliant") to include in API
  2181  	// requests with the JSON null value. By default, fields with empty values are
  2182  	// omitted from API requests. See
  2183  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2184  	NullFields []string `json:"-"`
  2185  }
  2186  
  2187  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) {
  2188  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
  2189  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2190  }
  2191  
  2192  // GoogleIamV1AuditConfig: Specifies the audit configuration for a service. The
  2193  // configuration determines which permission types are logged, and what
  2194  // identities, if any, are exempted from logging. An AuditConfig must have one
  2195  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
  2196  // and a specific service, the union of the two AuditConfigs is used for that
  2197  // service: the log_types specified in each AuditConfig are enabled, and the
  2198  // exempted_members in each AuditLogConfig are exempted. Example Policy with
  2199  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
  2200  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
  2201  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
  2202  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
  2203  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
  2204  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
  2205  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
  2206  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
  2207  // `aliya@example.com` from DATA_WRITE logging.
  2208  type GoogleIamV1AuditConfig struct {
  2209  	// AuditLogConfigs: The configuration for logging of each type of permission.
  2210  	AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"`
  2211  	// Service: Specifies a service that will be enabled for audit logging. For
  2212  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
  2213  	// is a special value that covers all services.
  2214  	Service string `json:"service,omitempty"`
  2215  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  2216  	// unconditionally include in API requests. By default, fields with empty or
  2217  	// default values are omitted from API requests. See
  2218  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2219  	// details.
  2220  	ForceSendFields []string `json:"-"`
  2221  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
  2222  	// API requests with the JSON null value. By default, fields with empty values
  2223  	// are omitted from API requests. See
  2224  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2225  	NullFields []string `json:"-"`
  2226  }
  2227  
  2228  func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) {
  2229  	type NoMethod GoogleIamV1AuditConfig
  2230  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2231  }
  2232  
  2233  // GoogleIamV1AuditLogConfig: Provides the configuration for logging a type of
  2234  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
  2235  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
  2236  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  2237  // exempting jose@example.com from DATA_READ logging.
  2238  type GoogleIamV1AuditLogConfig struct {
  2239  	// ExemptedMembers: Specifies the identities that do not cause logging for this
  2240  	// type of permission. Follows the same format of Binding.members.
  2241  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  2242  	// LogType: The log type that this config enables.
  2243  	//
  2244  	// Possible values:
  2245  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  2246  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  2247  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  2248  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
  2249  	LogType string `json:"logType,omitempty"`
  2250  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  2251  	// unconditionally include in API requests. By default, fields with empty or
  2252  	// default values are omitted from API requests. See
  2253  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2254  	// details.
  2255  	ForceSendFields []string `json:"-"`
  2256  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
  2257  	// API requests with the JSON null value. By default, fields with empty values
  2258  	// are omitted from API requests. See
  2259  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2260  	NullFields []string `json:"-"`
  2261  }
  2262  
  2263  func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) {
  2264  	type NoMethod GoogleIamV1AuditLogConfig
  2265  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2266  }
  2267  
  2268  // GoogleIamV1Binding: Associates `members`, or principals, with a `role`.
  2269  type GoogleIamV1Binding struct {
  2270  	// Condition: The condition that is associated with this binding. If the
  2271  	// condition evaluates to `true`, then this binding applies to the current
  2272  	// request. If the condition evaluates to `false`, then this binding does not
  2273  	// apply to the current request. However, a different role binding might grant
  2274  	// the same role to one or more of the principals in this binding. To learn
  2275  	// which resources support conditions in their IAM policies, see the IAM
  2276  	// documentation
  2277  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2278  	Condition *GoogleTypeExpr `json:"condition,omitempty"`
  2279  	// Members: Specifies the principals requesting access for a Google Cloud
  2280  	// resource. `members` can have the following values: * `allUsers`: A special
  2281  	// identifier that represents anyone who is on the internet; with or without a
  2282  	// Google account. * `allAuthenticatedUsers`: A special identifier that
  2283  	// represents anyone who is authenticated with a Google account or a service
  2284  	// account. Does not include identities that come from external identity
  2285  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
  2286  	// address that represents a specific Google account. For example,
  2287  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
  2288  	// represents a Google service account. For example,
  2289  	// `my-other-app@appspot.gserviceaccount.com`. *
  2290  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
  2291  	// identifier for a Kubernetes service account
  2292  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
  2293  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
  2294  	// `group:{emailid}`: An email address that represents a Google group. For
  2295  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
  2296  	// (primary) that represents all the users of that domain. For example,
  2297  	// `google.com` or `example.com`. *
  2298  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
  2299  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
  2300  	// pool. *
  2301  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2302  	// group/{group_id}`: All workforce identities in a group. *
  2303  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2304  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
  2305  	// a specific attribute value. *
  2306  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2307  	// *`: All identities in a workforce identity pool. *
  2308  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
  2309  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
  2310  	// identity in a workload identity pool. *
  2311  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2312  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
  2313  	// group. *
  2314  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2315  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
  2316  	// `: All identities in a workload identity pool with a certain attribute. *
  2317  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2318  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
  2319  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
  2320  	// unique identifier) representing a user that has been recently deleted. For
  2321  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
  2322  	// recovered, this value reverts to `user:{emailid}` and the recovered user
  2323  	// retains the role in the binding. *
  2324  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
  2325  	// unique identifier) representing a service account that has been recently
  2326  	// deleted. For example,
  2327  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
  2328  	// service account is undeleted, this value reverts to
  2329  	// `serviceAccount:{emailid}` and the undeleted service account retains the
  2330  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
  2331  	// address (plus unique identifier) representing a Google group that has been
  2332  	// recently deleted. For example,
  2333  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
  2334  	// this value reverts to `group:{emailid}` and the recovered group retains the
  2335  	// role in the binding. *
  2336  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
  2337  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
  2338  	// workforce identity pool. For example,
  2339  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
  2340  	// ol-id/subject/my-subject-attribute-value`.
  2341  	Members []string `json:"members,omitempty"`
  2342  	// Role: Role that is assigned to the list of `members`, or principals. For
  2343  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
  2344  	// of the IAM roles and permissions, see the IAM documentation
  2345  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
  2346  	// available pre-defined roles, see here
  2347  	// (https://cloud.google.com/iam/docs/understanding-roles).
  2348  	Role string `json:"role,omitempty"`
  2349  	// ForceSendFields is a list of field names (e.g. "Condition") to
  2350  	// unconditionally include in API requests. By default, fields with empty or
  2351  	// default values are omitted from API requests. See
  2352  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2353  	// details.
  2354  	ForceSendFields []string `json:"-"`
  2355  	// NullFields is a list of field names (e.g. "Condition") to include in API
  2356  	// requests with the JSON null value. By default, fields with empty values are
  2357  	// omitted from API requests. See
  2358  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2359  	NullFields []string `json:"-"`
  2360  }
  2361  
  2362  func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) {
  2363  	type NoMethod GoogleIamV1Binding
  2364  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2365  }
  2366  
  2367  // GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which
  2368  // specifies access controls for Google Cloud resources. A `Policy` is a
  2369  // collection of `bindings`. A `binding` binds one or more `members`, or
  2370  // principals, to a single `role`. Principals can be user accounts, service
  2371  // accounts, Google groups, and domains (such as G Suite). A `role` is a named
  2372  // list of permissions; each `role` can be an IAM predefined role or a
  2373  // user-created custom role. For some types of Google Cloud resources, a
  2374  // `binding` can also specify a `condition`, which is a logical expression that
  2375  // allows access to a resource only if the expression evaluates to `true`. A
  2376  // condition can add constraints based on attributes of the request, the
  2377  // resource, or both. To learn which resources support conditions in their IAM
  2378  // policies, see the IAM documentation
  2379  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  2380  // example:** ``` { "bindings": [ { "role":
  2381  // "roles/resourcemanager.organizationAdmin", "members": [
  2382  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  2383  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  2384  // "roles/resourcemanager.organizationViewer", "members": [
  2385  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2386  // "description": "Does not grant access after Sep 2020", "expression":
  2387  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  2388  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  2389  // members: - user:mike@example.com - group:admins@example.com -
  2390  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  2391  // role: roles/resourcemanager.organizationAdmin - members: -
  2392  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2393  // condition: title: expirable access description: Does not grant access after
  2394  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2395  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2396  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2397  type GoogleIamV1Policy struct {
  2398  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  2399  	AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"`
  2400  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2401  	// Optionally, may specify a `condition` that determines how and when the
  2402  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2403  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2404  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2405  	// principal counts towards these limits. For example, if the `bindings` grant
  2406  	// 50 different roles to `user:alice@example.com`, and not to any other
  2407  	// principal, then you can add another 1,450 principals to the `bindings` in
  2408  	// the `Policy`.
  2409  	Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"`
  2410  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2411  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2412  	// strongly suggested that systems make use of the `etag` in the
  2413  	// read-modify-write cycle to perform policy updates in order to avoid race
  2414  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2415  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2416  	// ensure that their change will be applied to the same version of the policy.
  2417  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2418  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2419  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2420  	// the conditions in the version `3` policy are lost.
  2421  	Etag string `json:"etag,omitempty"`
  2422  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2423  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2424  	// affects conditional role bindings must specify version `3`. This requirement
  2425  	// applies to the following operations: * Getting a policy that includes a
  2426  	// conditional role binding * Adding a conditional role binding to a policy *
  2427  	// Changing a conditional role binding in a policy * Removing any role binding,
  2428  	// with or without a condition, from a policy that includes conditions
  2429  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2430  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2431  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2432  	// the conditions in the version `3` policy are lost. If a policy does not
  2433  	// include any conditions, operations on that policy may specify any valid
  2434  	// version or leave the field unset. To learn which resources support
  2435  	// conditions in their IAM policies, see the IAM documentation
  2436  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2437  	Version int64 `json:"version,omitempty"`
  2438  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2439  	// unconditionally include in API requests. By default, fields with empty or
  2440  	// default values are omitted from API requests. See
  2441  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2442  	// details.
  2443  	ForceSendFields []string `json:"-"`
  2444  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  2445  	// requests with the JSON null value. By default, fields with empty values are
  2446  	// omitted from API requests. See
  2447  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2448  	NullFields []string `json:"-"`
  2449  }
  2450  
  2451  func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) {
  2452  	type NoMethod GoogleIamV1Policy
  2453  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2454  }
  2455  
  2456  // GoogleLongrunningListOperationsResponse: The response message for
  2457  // Operations.ListOperations.
  2458  type GoogleLongrunningListOperationsResponse struct {
  2459  	// NextPageToken: The standard List next-page token.
  2460  	NextPageToken string `json:"nextPageToken,omitempty"`
  2461  	// Operations: A list of operations that matches the specified filter in the
  2462  	// request.
  2463  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  2464  
  2465  	// ServerResponse contains the HTTP response code and headers from the server.
  2466  	googleapi.ServerResponse `json:"-"`
  2467  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2468  	// unconditionally include in API requests. By default, fields with empty or
  2469  	// default values are omitted from API requests. See
  2470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2471  	// details.
  2472  	ForceSendFields []string `json:"-"`
  2473  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2474  	// requests with the JSON null value. By default, fields with empty values are
  2475  	// omitted from API requests. See
  2476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2477  	NullFields []string `json:"-"`
  2478  }
  2479  
  2480  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  2481  	type NoMethod GoogleLongrunningListOperationsResponse
  2482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2483  }
  2484  
  2485  // GoogleLongrunningOperation: This resource represents a long-running
  2486  // operation that is the result of a network API call.
  2487  type GoogleLongrunningOperation struct {
  2488  	// Done: If the value is `false`, it means the operation is still in progress.
  2489  	// If `true`, the operation is completed, and either `error` or `response` is
  2490  	// available.
  2491  	Done bool `json:"done,omitempty"`
  2492  	// Error: The error result of the operation in case of failure or cancellation.
  2493  	Error *GoogleRpcStatus `json:"error,omitempty"`
  2494  	// Metadata: Service-specific metadata associated with the operation. It
  2495  	// typically contains progress information and common metadata such as create
  2496  	// time. Some services might not provide such metadata. Any method that returns
  2497  	// a long-running operation should document the metadata type, if any.
  2498  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2499  	// Name: The server-assigned name, which is only unique within the same service
  2500  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2501  	// should be a resource name ending with `operations/{unique_id}`.
  2502  	Name string `json:"name,omitempty"`
  2503  	// Response: The normal, successful response of the operation. If the original
  2504  	// method returns no data on success, such as `Delete`, the response is
  2505  	// `google.protobuf.Empty`. If the original method is standard
  2506  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2507  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2508  	// original method name. For example, if the original method name is
  2509  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2510  	Response googleapi.RawMessage `json:"response,omitempty"`
  2511  
  2512  	// ServerResponse contains the HTTP response code and headers from the server.
  2513  	googleapi.ServerResponse `json:"-"`
  2514  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2515  	// include in API requests. By default, fields with empty or default values are
  2516  	// omitted from API requests. See
  2517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2518  	// details.
  2519  	ForceSendFields []string `json:"-"`
  2520  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2521  	// with the JSON null value. By default, fields with empty values are omitted
  2522  	// from API requests. See
  2523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2524  	NullFields []string `json:"-"`
  2525  }
  2526  
  2527  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  2528  	type NoMethod GoogleLongrunningOperation
  2529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2530  }
  2531  
  2532  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  2533  // suitable for different programming environments, including REST APIs and RPC
  2534  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  2535  // contains three pieces of data: error code, error message, and error details.
  2536  // You can find out more about this error model and how to work with it in the
  2537  // API Design Guide (https://cloud.google.com/apis/design/errors).
  2538  type GoogleRpcStatus struct {
  2539  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2540  	Code int64 `json:"code,omitempty"`
  2541  	// Details: A list of messages that carry the error details. There is a common
  2542  	// set of message types for APIs to use.
  2543  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2544  	// Message: A developer-facing error message, which should be in English. Any
  2545  	// user-facing error message should be localized and sent in the
  2546  	// google.rpc.Status.details field, or localized by the client.
  2547  	Message string `json:"message,omitempty"`
  2548  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2549  	// include in API requests. By default, fields with empty or default values are
  2550  	// omitted from API requests. See
  2551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2552  	// details.
  2553  	ForceSendFields []string `json:"-"`
  2554  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2555  	// with the JSON null value. By default, fields with empty values are omitted
  2556  	// from API requests. See
  2557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2558  	NullFields []string `json:"-"`
  2559  }
  2560  
  2561  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  2562  	type NoMethod GoogleRpcStatus
  2563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2564  }
  2565  
  2566  // GoogleTypeDate: Represents a whole or partial calendar date, such as a
  2567  // birthday. The time of day and time zone are either specified elsewhere or
  2568  // are insignificant. The date is relative to the Gregorian Calendar. This can
  2569  // represent one of the following: * A full date, with non-zero year, month,
  2570  // and day values. * A month and day, with a zero year (for example, an
  2571  // anniversary). * A year on its own, with a zero month and a zero day. * A
  2572  // year and month, with a zero day (for example, a credit card expiration
  2573  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
  2574  // google.protobuf.Timestamp
  2575  type GoogleTypeDate struct {
  2576  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
  2577  	// or 0 to specify a year by itself or a year and month where the day isn't
  2578  	// significant.
  2579  	Day int64 `json:"day,omitempty"`
  2580  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
  2581  	// a month and day.
  2582  	Month int64 `json:"month,omitempty"`
  2583  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
  2584  	// without a year.
  2585  	Year int64 `json:"year,omitempty"`
  2586  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  2587  	// include in API requests. By default, fields with empty or default values are
  2588  	// omitted from API requests. See
  2589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2590  	// details.
  2591  	ForceSendFields []string `json:"-"`
  2592  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  2593  	// with the JSON null value. By default, fields with empty values are omitted
  2594  	// from API requests. See
  2595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2596  	NullFields []string `json:"-"`
  2597  }
  2598  
  2599  func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  2600  	type NoMethod GoogleTypeDate
  2601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2602  }
  2603  
  2604  // GoogleTypeExpr: Represents a textual expression in the Common Expression
  2605  // Language (CEL) syntax. CEL is a C-like expression language. The syntax and
  2606  // semantics of CEL are documented at https://github.com/google/cel-spec.
  2607  // Example (Comparison): title: "Summary size limit" description: "Determines
  2608  // if a summary is less than 100 chars" expression: "document.summary.size() <
  2609  // 100" Example (Equality): title: "Requestor is owner" description:
  2610  // "Determines if requestor is the document owner" expression: "document.owner
  2611  // == request.auth.claims.email" Example (Logic): title: "Public documents"
  2612  // description: "Determine whether the document should be publicly visible"
  2613  // expression: "document.type != 'private' && document.type != 'internal'"
  2614  // Example (Data Manipulation): title: "Notification string" description:
  2615  // "Create a notification string with a timestamp." expression: "'New message
  2616  // received at ' + string(document.create_time)" The exact variables and
  2617  // functions that may be referenced within an expression are determined by the
  2618  // service that evaluates it. See the service documentation for additional
  2619  // information.
  2620  type GoogleTypeExpr struct {
  2621  	// Description: Optional. Description of the expression. This is a longer text
  2622  	// which describes the expression, e.g. when hovered over it in a UI.
  2623  	Description string `json:"description,omitempty"`
  2624  	// Expression: Textual representation of an expression in Common Expression
  2625  	// Language syntax.
  2626  	Expression string `json:"expression,omitempty"`
  2627  	// Location: Optional. String indicating the location of the expression for
  2628  	// error reporting, e.g. a file name and a position in the file.
  2629  	Location string `json:"location,omitempty"`
  2630  	// Title: Optional. Title for the expression, i.e. a short string describing
  2631  	// its purpose. This can be used e.g. in UIs which allow to enter the
  2632  	// expression.
  2633  	Title string `json:"title,omitempty"`
  2634  	// ForceSendFields is a list of field names (e.g. "Description") to
  2635  	// unconditionally include in API requests. By default, fields with empty or
  2636  	// default values are omitted from API requests. See
  2637  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2638  	// details.
  2639  	ForceSendFields []string `json:"-"`
  2640  	// NullFields is a list of field names (e.g. "Description") to include in API
  2641  	// requests with the JSON null value. By default, fields with empty values are
  2642  	// omitted from API requests. See
  2643  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2644  	NullFields []string `json:"-"`
  2645  }
  2646  
  2647  func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) {
  2648  	type NoMethod GoogleTypeExpr
  2649  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2650  }
  2651  
  2652  type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  2653  	s            *Service
  2654  	name         string
  2655  	urlParams_   gensupport.URLParams
  2656  	ifNoneMatch_ string
  2657  	ctx_         context.Context
  2658  	header_      http.Header
  2659  }
  2660  
  2661  // Get: Gets the latest state of a long-running operation. Clients can use this
  2662  // method to poll the operation result at intervals as recommended by the API
  2663  // service.
  2664  //
  2665  // - name: The name of the operation resource.
  2666  func (r *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2667  	c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2668  	c.name = name
  2669  	return c
  2670  }
  2671  
  2672  // Fields allows partial responses to be retrieved. See
  2673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2674  // details.
  2675  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2677  	return c
  2678  }
  2679  
  2680  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2681  // object's ETag matches the given value. This is useful for getting updates
  2682  // only after the object has changed since the last request.
  2683  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2684  	c.ifNoneMatch_ = entityTag
  2685  	return c
  2686  }
  2687  
  2688  // Context sets the context to be used in this call's Do method.
  2689  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2690  	c.ctx_ = ctx
  2691  	return c
  2692  }
  2693  
  2694  // Header returns a http.Header that can be modified by the caller to add
  2695  // headers to the request.
  2696  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  2697  	if c.header_ == nil {
  2698  		c.header_ = make(http.Header)
  2699  	}
  2700  	return c.header_
  2701  }
  2702  
  2703  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2704  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2705  	if c.ifNoneMatch_ != "" {
  2706  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2707  	}
  2708  	var body io.Reader = nil
  2709  	c.urlParams_.Set("alt", alt)
  2710  	c.urlParams_.Set("prettyPrint", "false")
  2711  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2712  	urls += "?" + c.urlParams_.Encode()
  2713  	req, err := http.NewRequest("GET", urls, body)
  2714  	if err != nil {
  2715  		return nil, err
  2716  	}
  2717  	req.Header = reqHeaders
  2718  	googleapi.Expand(req.URL, map[string]string{
  2719  		"name": c.name,
  2720  	})
  2721  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2722  }
  2723  
  2724  // Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get" call.
  2725  // Any non-2xx status code is an error. Response headers are in either
  2726  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2727  // returned at all) in error.(*googleapi.Error).Header. Use
  2728  // googleapi.IsNotModified to check whether the returned error was because
  2729  // http.StatusNotModified was returned.
  2730  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2731  	gensupport.SetOptions(c.urlParams_, opts...)
  2732  	res, err := c.doRequest("json")
  2733  	if res != nil && res.StatusCode == http.StatusNotModified {
  2734  		if res.Body != nil {
  2735  			res.Body.Close()
  2736  		}
  2737  		return nil, gensupport.WrapError(&googleapi.Error{
  2738  			Code:   res.StatusCode,
  2739  			Header: res.Header,
  2740  		})
  2741  	}
  2742  	if err != nil {
  2743  		return nil, err
  2744  	}
  2745  	defer googleapi.CloseBody(res)
  2746  	if err := googleapi.CheckResponse(res); err != nil {
  2747  		return nil, gensupport.WrapError(err)
  2748  	}
  2749  	ret := &GoogleLongrunningOperation{
  2750  		ServerResponse: googleapi.ServerResponse{
  2751  			Header:         res.Header,
  2752  			HTTPStatusCode: res.StatusCode,
  2753  		},
  2754  	}
  2755  	target := &ret
  2756  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2757  		return nil, err
  2758  	}
  2759  	return ret, nil
  2760  }
  2761  
  2762  type FoldersLocationsReplaysCreateCall struct {
  2763  	s                                  *Service
  2764  	parent                             string
  2765  	googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay
  2766  	urlParams_                         gensupport.URLParams
  2767  	ctx_                               context.Context
  2768  	header_                            http.Header
  2769  }
  2770  
  2771  // Create: Creates and starts a Replay using the given ReplayConfig.
  2772  //
  2773  //   - parent: The parent resource where this Replay will be created. This
  2774  //     resource must be a project, folder, or organization with a location.
  2775  //     Example: `projects/my-example-project/locations/global`.
  2776  func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *FoldersLocationsReplaysCreateCall {
  2777  	c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2778  	c.parent = parent
  2779  	c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay
  2780  	return c
  2781  }
  2782  
  2783  // Fields allows partial responses to be retrieved. See
  2784  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2785  // details.
  2786  func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall {
  2787  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2788  	return c
  2789  }
  2790  
  2791  // Context sets the context to be used in this call's Do method.
  2792  func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall {
  2793  	c.ctx_ = ctx
  2794  	return c
  2795  }
  2796  
  2797  // Header returns a http.Header that can be modified by the caller to add
  2798  // headers to the request.
  2799  func (c *FoldersLocationsReplaysCreateCall) Header() http.Header {
  2800  	if c.header_ == nil {
  2801  		c.header_ = make(http.Header)
  2802  	}
  2803  	return c.header_
  2804  }
  2805  
  2806  func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  2807  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2808  	var body io.Reader = nil
  2809  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay)
  2810  	if err != nil {
  2811  		return nil, err
  2812  	}
  2813  	c.urlParams_.Set("alt", alt)
  2814  	c.urlParams_.Set("prettyPrint", "false")
  2815  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays")
  2816  	urls += "?" + c.urlParams_.Encode()
  2817  	req, err := http.NewRequest("POST", urls, body)
  2818  	if err != nil {
  2819  		return nil, err
  2820  	}
  2821  	req.Header = reqHeaders
  2822  	googleapi.Expand(req.URL, map[string]string{
  2823  		"parent": c.parent,
  2824  	})
  2825  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2826  }
  2827  
  2828  // Do executes the "policysimulator.folders.locations.replays.create" call.
  2829  // Any non-2xx status code is an error. Response headers are in either
  2830  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2831  // returned at all) in error.(*googleapi.Error).Header. Use
  2832  // googleapi.IsNotModified to check whether the returned error was because
  2833  // http.StatusNotModified was returned.
  2834  func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2835  	gensupport.SetOptions(c.urlParams_, opts...)
  2836  	res, err := c.doRequest("json")
  2837  	if res != nil && res.StatusCode == http.StatusNotModified {
  2838  		if res.Body != nil {
  2839  			res.Body.Close()
  2840  		}
  2841  		return nil, gensupport.WrapError(&googleapi.Error{
  2842  			Code:   res.StatusCode,
  2843  			Header: res.Header,
  2844  		})
  2845  	}
  2846  	if err != nil {
  2847  		return nil, err
  2848  	}
  2849  	defer googleapi.CloseBody(res)
  2850  	if err := googleapi.CheckResponse(res); err != nil {
  2851  		return nil, gensupport.WrapError(err)
  2852  	}
  2853  	ret := &GoogleLongrunningOperation{
  2854  		ServerResponse: googleapi.ServerResponse{
  2855  			Header:         res.Header,
  2856  			HTTPStatusCode: res.StatusCode,
  2857  		},
  2858  	}
  2859  	target := &ret
  2860  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2861  		return nil, err
  2862  	}
  2863  	return ret, nil
  2864  }
  2865  
  2866  type FoldersLocationsReplaysGetCall struct {
  2867  	s            *Service
  2868  	name         string
  2869  	urlParams_   gensupport.URLParams
  2870  	ifNoneMatch_ string
  2871  	ctx_         context.Context
  2872  	header_      http.Header
  2873  }
  2874  
  2875  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  2876  // days.
  2877  //
  2878  //   - name: The name of the Replay to retrieve, in the following format:
  2879  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  2880  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  2881  //     organization that owns the `Replay`. Example:
  2882  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  2883  //     03-479ce1833c36`.
  2884  func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall {
  2885  	c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2886  	c.name = name
  2887  	return c
  2888  }
  2889  
  2890  // Fields allows partial responses to be retrieved. See
  2891  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2892  // details.
  2893  func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall {
  2894  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2895  	return c
  2896  }
  2897  
  2898  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2899  // object's ETag matches the given value. This is useful for getting updates
  2900  // only after the object has changed since the last request.
  2901  func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall {
  2902  	c.ifNoneMatch_ = entityTag
  2903  	return c
  2904  }
  2905  
  2906  // Context sets the context to be used in this call's Do method.
  2907  func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall {
  2908  	c.ctx_ = ctx
  2909  	return c
  2910  }
  2911  
  2912  // Header returns a http.Header that can be modified by the caller to add
  2913  // headers to the request.
  2914  func (c *FoldersLocationsReplaysGetCall) Header() http.Header {
  2915  	if c.header_ == nil {
  2916  		c.header_ = make(http.Header)
  2917  	}
  2918  	return c.header_
  2919  }
  2920  
  2921  func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  2922  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2923  	if c.ifNoneMatch_ != "" {
  2924  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2925  	}
  2926  	var body io.Reader = nil
  2927  	c.urlParams_.Set("alt", alt)
  2928  	c.urlParams_.Set("prettyPrint", "false")
  2929  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2930  	urls += "?" + c.urlParams_.Encode()
  2931  	req, err := http.NewRequest("GET", urls, body)
  2932  	if err != nil {
  2933  		return nil, err
  2934  	}
  2935  	req.Header = reqHeaders
  2936  	googleapi.Expand(req.URL, map[string]string{
  2937  		"name": c.name,
  2938  	})
  2939  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2940  }
  2941  
  2942  // Do executes the "policysimulator.folders.locations.replays.get" call.
  2943  // Any non-2xx status code is an error. Response headers are in either
  2944  // *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or (if a response
  2945  // was returned at all) in error.(*googleapi.Error).Header. Use
  2946  // googleapi.IsNotModified to check whether the returned error was because
  2947  // http.StatusNotModified was returned.
  2948  func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) {
  2949  	gensupport.SetOptions(c.urlParams_, opts...)
  2950  	res, err := c.doRequest("json")
  2951  	if res != nil && res.StatusCode == http.StatusNotModified {
  2952  		if res.Body != nil {
  2953  			res.Body.Close()
  2954  		}
  2955  		return nil, gensupport.WrapError(&googleapi.Error{
  2956  			Code:   res.StatusCode,
  2957  			Header: res.Header,
  2958  		})
  2959  	}
  2960  	if err != nil {
  2961  		return nil, err
  2962  	}
  2963  	defer googleapi.CloseBody(res)
  2964  	if err := googleapi.CheckResponse(res); err != nil {
  2965  		return nil, gensupport.WrapError(err)
  2966  	}
  2967  	ret := &GoogleCloudPolicysimulatorV1Replay{
  2968  		ServerResponse: googleapi.ServerResponse{
  2969  			Header:         res.Header,
  2970  			HTTPStatusCode: res.StatusCode,
  2971  		},
  2972  	}
  2973  	target := &ret
  2974  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2975  		return nil, err
  2976  	}
  2977  	return ret, nil
  2978  }
  2979  
  2980  type FoldersLocationsReplaysOperationsGetCall struct {
  2981  	s            *Service
  2982  	name         string
  2983  	urlParams_   gensupport.URLParams
  2984  	ifNoneMatch_ string
  2985  	ctx_         context.Context
  2986  	header_      http.Header
  2987  }
  2988  
  2989  // Get: Gets the latest state of a long-running operation. Clients can use this
  2990  // method to poll the operation result at intervals as recommended by the API
  2991  // service.
  2992  //
  2993  // - name: The name of the operation resource.
  2994  func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall {
  2995  	c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2996  	c.name = name
  2997  	return c
  2998  }
  2999  
  3000  // Fields allows partial responses to be retrieved. See
  3001  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3002  // details.
  3003  func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall {
  3004  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3005  	return c
  3006  }
  3007  
  3008  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3009  // object's ETag matches the given value. This is useful for getting updates
  3010  // only after the object has changed since the last request.
  3011  func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall {
  3012  	c.ifNoneMatch_ = entityTag
  3013  	return c
  3014  }
  3015  
  3016  // Context sets the context to be used in this call's Do method.
  3017  func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall {
  3018  	c.ctx_ = ctx
  3019  	return c
  3020  }
  3021  
  3022  // Header returns a http.Header that can be modified by the caller to add
  3023  // headers to the request.
  3024  func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header {
  3025  	if c.header_ == nil {
  3026  		c.header_ = make(http.Header)
  3027  	}
  3028  	return c.header_
  3029  }
  3030  
  3031  func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3032  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3033  	if c.ifNoneMatch_ != "" {
  3034  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3035  	}
  3036  	var body io.Reader = nil
  3037  	c.urlParams_.Set("alt", alt)
  3038  	c.urlParams_.Set("prettyPrint", "false")
  3039  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3040  	urls += "?" + c.urlParams_.Encode()
  3041  	req, err := http.NewRequest("GET", urls, body)
  3042  	if err != nil {
  3043  		return nil, err
  3044  	}
  3045  	req.Header = reqHeaders
  3046  	googleapi.Expand(req.URL, map[string]string{
  3047  		"name": c.name,
  3048  	})
  3049  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3050  }
  3051  
  3052  // Do executes the "policysimulator.folders.locations.replays.operations.get" call.
  3053  // Any non-2xx status code is an error. Response headers are in either
  3054  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3055  // returned at all) in error.(*googleapi.Error).Header. Use
  3056  // googleapi.IsNotModified to check whether the returned error was because
  3057  // http.StatusNotModified was returned.
  3058  func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3059  	gensupport.SetOptions(c.urlParams_, opts...)
  3060  	res, err := c.doRequest("json")
  3061  	if res != nil && res.StatusCode == http.StatusNotModified {
  3062  		if res.Body != nil {
  3063  			res.Body.Close()
  3064  		}
  3065  		return nil, gensupport.WrapError(&googleapi.Error{
  3066  			Code:   res.StatusCode,
  3067  			Header: res.Header,
  3068  		})
  3069  	}
  3070  	if err != nil {
  3071  		return nil, err
  3072  	}
  3073  	defer googleapi.CloseBody(res)
  3074  	if err := googleapi.CheckResponse(res); err != nil {
  3075  		return nil, gensupport.WrapError(err)
  3076  	}
  3077  	ret := &GoogleLongrunningOperation{
  3078  		ServerResponse: googleapi.ServerResponse{
  3079  			Header:         res.Header,
  3080  			HTTPStatusCode: res.StatusCode,
  3081  		},
  3082  	}
  3083  	target := &ret
  3084  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3085  		return nil, err
  3086  	}
  3087  	return ret, nil
  3088  }
  3089  
  3090  type FoldersLocationsReplaysOperationsListCall struct {
  3091  	s            *Service
  3092  	name         string
  3093  	urlParams_   gensupport.URLParams
  3094  	ifNoneMatch_ string
  3095  	ctx_         context.Context
  3096  	header_      http.Header
  3097  }
  3098  
  3099  // List: Lists operations that match the specified filter in the request. If
  3100  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3101  //
  3102  // - name: The name of the operation's parent resource.
  3103  func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall {
  3104  	c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3105  	c.name = name
  3106  	return c
  3107  }
  3108  
  3109  // Filter sets the optional parameter "filter": The standard list filter.
  3110  func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall {
  3111  	c.urlParams_.Set("filter", filter)
  3112  	return c
  3113  }
  3114  
  3115  // PageSize sets the optional parameter "pageSize": The standard list page
  3116  // size.
  3117  func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall {
  3118  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3119  	return c
  3120  }
  3121  
  3122  // PageToken sets the optional parameter "pageToken": The standard list page
  3123  // token.
  3124  func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall {
  3125  	c.urlParams_.Set("pageToken", pageToken)
  3126  	return c
  3127  }
  3128  
  3129  // Fields allows partial responses to be retrieved. See
  3130  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3131  // details.
  3132  func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall {
  3133  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3134  	return c
  3135  }
  3136  
  3137  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3138  // object's ETag matches the given value. This is useful for getting updates
  3139  // only after the object has changed since the last request.
  3140  func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall {
  3141  	c.ifNoneMatch_ = entityTag
  3142  	return c
  3143  }
  3144  
  3145  // Context sets the context to be used in this call's Do method.
  3146  func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall {
  3147  	c.ctx_ = ctx
  3148  	return c
  3149  }
  3150  
  3151  // Header returns a http.Header that can be modified by the caller to add
  3152  // headers to the request.
  3153  func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header {
  3154  	if c.header_ == nil {
  3155  		c.header_ = make(http.Header)
  3156  	}
  3157  	return c.header_
  3158  }
  3159  
  3160  func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3161  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3162  	if c.ifNoneMatch_ != "" {
  3163  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3164  	}
  3165  	var body io.Reader = nil
  3166  	c.urlParams_.Set("alt", alt)
  3167  	c.urlParams_.Set("prettyPrint", "false")
  3168  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3169  	urls += "?" + c.urlParams_.Encode()
  3170  	req, err := http.NewRequest("GET", urls, body)
  3171  	if err != nil {
  3172  		return nil, err
  3173  	}
  3174  	req.Header = reqHeaders
  3175  	googleapi.Expand(req.URL, map[string]string{
  3176  		"name": c.name,
  3177  	})
  3178  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3179  }
  3180  
  3181  // Do executes the "policysimulator.folders.locations.replays.operations.list" call.
  3182  // Any non-2xx status code is an error. Response headers are in either
  3183  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  3184  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3185  // googleapi.IsNotModified to check whether the returned error was because
  3186  // http.StatusNotModified was returned.
  3187  func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  3188  	gensupport.SetOptions(c.urlParams_, opts...)
  3189  	res, err := c.doRequest("json")
  3190  	if res != nil && res.StatusCode == http.StatusNotModified {
  3191  		if res.Body != nil {
  3192  			res.Body.Close()
  3193  		}
  3194  		return nil, gensupport.WrapError(&googleapi.Error{
  3195  			Code:   res.StatusCode,
  3196  			Header: res.Header,
  3197  		})
  3198  	}
  3199  	if err != nil {
  3200  		return nil, err
  3201  	}
  3202  	defer googleapi.CloseBody(res)
  3203  	if err := googleapi.CheckResponse(res); err != nil {
  3204  		return nil, gensupport.WrapError(err)
  3205  	}
  3206  	ret := &GoogleLongrunningListOperationsResponse{
  3207  		ServerResponse: googleapi.ServerResponse{
  3208  			Header:         res.Header,
  3209  			HTTPStatusCode: res.StatusCode,
  3210  		},
  3211  	}
  3212  	target := &ret
  3213  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3214  		return nil, err
  3215  	}
  3216  	return ret, nil
  3217  }
  3218  
  3219  // Pages invokes f for each page of results.
  3220  // A non-nil error returned from f will halt the iteration.
  3221  // The provided context supersedes any context provided to the Context method.
  3222  func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  3223  	c.ctx_ = ctx
  3224  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3225  	for {
  3226  		x, err := c.Do()
  3227  		if err != nil {
  3228  			return err
  3229  		}
  3230  		if err := f(x); err != nil {
  3231  			return err
  3232  		}
  3233  		if x.NextPageToken == "" {
  3234  			return nil
  3235  		}
  3236  		c.PageToken(x.NextPageToken)
  3237  	}
  3238  }
  3239  
  3240  type FoldersLocationsReplaysResultsListCall struct {
  3241  	s            *Service
  3242  	parent       string
  3243  	urlParams_   gensupport.URLParams
  3244  	ifNoneMatch_ string
  3245  	ctx_         context.Context
  3246  	header_      http.Header
  3247  }
  3248  
  3249  // List: Lists the results of running a Replay.
  3250  //
  3251  //   - parent: The Replay whose results are listed, in the following format:
  3252  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  3253  //     eplay-id}` Example:
  3254  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  3255  //     1833c36`.
  3256  func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall {
  3257  	c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3258  	c.parent = parent
  3259  	return c
  3260  }
  3261  
  3262  // PageSize sets the optional parameter "pageSize": The maximum number of
  3263  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  3264  // values above 5000 are rounded down to 5000.
  3265  func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall {
  3266  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3267  	return c
  3268  }
  3269  
  3270  // PageToken sets the optional parameter "pageToken": A page token, received
  3271  // from a previous Simulator.ListReplayResults call. Provide this token to
  3272  // retrieve the next page of results. When paginating, all other parameters
  3273  // provided to [Simulator.ListReplayResults[] must match the call that provided
  3274  // the page token.
  3275  func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall {
  3276  	c.urlParams_.Set("pageToken", pageToken)
  3277  	return c
  3278  }
  3279  
  3280  // Fields allows partial responses to be retrieved. See
  3281  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3282  // details.
  3283  func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall {
  3284  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3285  	return c
  3286  }
  3287  
  3288  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3289  // object's ETag matches the given value. This is useful for getting updates
  3290  // only after the object has changed since the last request.
  3291  func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall {
  3292  	c.ifNoneMatch_ = entityTag
  3293  	return c
  3294  }
  3295  
  3296  // Context sets the context to be used in this call's Do method.
  3297  func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall {
  3298  	c.ctx_ = ctx
  3299  	return c
  3300  }
  3301  
  3302  // Header returns a http.Header that can be modified by the caller to add
  3303  // headers to the request.
  3304  func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header {
  3305  	if c.header_ == nil {
  3306  		c.header_ = make(http.Header)
  3307  	}
  3308  	return c.header_
  3309  }
  3310  
  3311  func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  3312  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3313  	if c.ifNoneMatch_ != "" {
  3314  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3315  	}
  3316  	var body io.Reader = nil
  3317  	c.urlParams_.Set("alt", alt)
  3318  	c.urlParams_.Set("prettyPrint", "false")
  3319  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results")
  3320  	urls += "?" + c.urlParams_.Encode()
  3321  	req, err := http.NewRequest("GET", urls, body)
  3322  	if err != nil {
  3323  		return nil, err
  3324  	}
  3325  	req.Header = reqHeaders
  3326  	googleapi.Expand(req.URL, map[string]string{
  3327  		"parent": c.parent,
  3328  	})
  3329  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3330  }
  3331  
  3332  // Do executes the "policysimulator.folders.locations.replays.results.list" call.
  3333  // Any non-2xx status code is an error. Response headers are in either
  3334  // *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse.Header
  3335  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  3336  // Use googleapi.IsNotModified to check whether the returned error was because
  3337  // http.StatusNotModified was returned.
  3338  func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) {
  3339  	gensupport.SetOptions(c.urlParams_, opts...)
  3340  	res, err := c.doRequest("json")
  3341  	if res != nil && res.StatusCode == http.StatusNotModified {
  3342  		if res.Body != nil {
  3343  			res.Body.Close()
  3344  		}
  3345  		return nil, gensupport.WrapError(&googleapi.Error{
  3346  			Code:   res.StatusCode,
  3347  			Header: res.Header,
  3348  		})
  3349  	}
  3350  	if err != nil {
  3351  		return nil, err
  3352  	}
  3353  	defer googleapi.CloseBody(res)
  3354  	if err := googleapi.CheckResponse(res); err != nil {
  3355  		return nil, gensupport.WrapError(err)
  3356  	}
  3357  	ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{
  3358  		ServerResponse: googleapi.ServerResponse{
  3359  			Header:         res.Header,
  3360  			HTTPStatusCode: res.StatusCode,
  3361  		},
  3362  	}
  3363  	target := &ret
  3364  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3365  		return nil, err
  3366  	}
  3367  	return ret, nil
  3368  }
  3369  
  3370  // Pages invokes f for each page of results.
  3371  // A non-nil error returned from f will halt the iteration.
  3372  // The provided context supersedes any context provided to the Context method.
  3373  func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error {
  3374  	c.ctx_ = ctx
  3375  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3376  	for {
  3377  		x, err := c.Do()
  3378  		if err != nil {
  3379  			return err
  3380  		}
  3381  		if err := f(x); err != nil {
  3382  			return err
  3383  		}
  3384  		if x.NextPageToken == "" {
  3385  			return nil
  3386  		}
  3387  		c.PageToken(x.NextPageToken)
  3388  	}
  3389  }
  3390  
  3391  type OperationsGetCall struct {
  3392  	s            *Service
  3393  	name         string
  3394  	urlParams_   gensupport.URLParams
  3395  	ifNoneMatch_ string
  3396  	ctx_         context.Context
  3397  	header_      http.Header
  3398  }
  3399  
  3400  // Get: Gets the latest state of a long-running operation. Clients can use this
  3401  // method to poll the operation result at intervals as recommended by the API
  3402  // service.
  3403  //
  3404  // - name: The name of the operation resource.
  3405  func (r *OperationsService) Get(name string) *OperationsGetCall {
  3406  	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3407  	c.name = name
  3408  	return c
  3409  }
  3410  
  3411  // Fields allows partial responses to be retrieved. See
  3412  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3413  // details.
  3414  func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  3415  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3416  	return c
  3417  }
  3418  
  3419  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3420  // object's ETag matches the given value. This is useful for getting updates
  3421  // only after the object has changed since the last request.
  3422  func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  3423  	c.ifNoneMatch_ = entityTag
  3424  	return c
  3425  }
  3426  
  3427  // Context sets the context to be used in this call's Do method.
  3428  func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  3429  	c.ctx_ = ctx
  3430  	return c
  3431  }
  3432  
  3433  // Header returns a http.Header that can be modified by the caller to add
  3434  // headers to the request.
  3435  func (c *OperationsGetCall) Header() http.Header {
  3436  	if c.header_ == nil {
  3437  		c.header_ = make(http.Header)
  3438  	}
  3439  	return c.header_
  3440  }
  3441  
  3442  func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3443  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3444  	if c.ifNoneMatch_ != "" {
  3445  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3446  	}
  3447  	var body io.Reader = nil
  3448  	c.urlParams_.Set("alt", alt)
  3449  	c.urlParams_.Set("prettyPrint", "false")
  3450  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3451  	urls += "?" + c.urlParams_.Encode()
  3452  	req, err := http.NewRequest("GET", urls, body)
  3453  	if err != nil {
  3454  		return nil, err
  3455  	}
  3456  	req.Header = reqHeaders
  3457  	googleapi.Expand(req.URL, map[string]string{
  3458  		"name": c.name,
  3459  	})
  3460  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3461  }
  3462  
  3463  // Do executes the "policysimulator.operations.get" call.
  3464  // Any non-2xx status code is an error. Response headers are in either
  3465  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3466  // returned at all) in error.(*googleapi.Error).Header. Use
  3467  // googleapi.IsNotModified to check whether the returned error was because
  3468  // http.StatusNotModified was returned.
  3469  func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3470  	gensupport.SetOptions(c.urlParams_, opts...)
  3471  	res, err := c.doRequest("json")
  3472  	if res != nil && res.StatusCode == http.StatusNotModified {
  3473  		if res.Body != nil {
  3474  			res.Body.Close()
  3475  		}
  3476  		return nil, gensupport.WrapError(&googleapi.Error{
  3477  			Code:   res.StatusCode,
  3478  			Header: res.Header,
  3479  		})
  3480  	}
  3481  	if err != nil {
  3482  		return nil, err
  3483  	}
  3484  	defer googleapi.CloseBody(res)
  3485  	if err := googleapi.CheckResponse(res); err != nil {
  3486  		return nil, gensupport.WrapError(err)
  3487  	}
  3488  	ret := &GoogleLongrunningOperation{
  3489  		ServerResponse: googleapi.ServerResponse{
  3490  			Header:         res.Header,
  3491  			HTTPStatusCode: res.StatusCode,
  3492  		},
  3493  	}
  3494  	target := &ret
  3495  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3496  		return nil, err
  3497  	}
  3498  	return ret, nil
  3499  }
  3500  
  3501  type OperationsListCall struct {
  3502  	s            *Service
  3503  	name         string
  3504  	urlParams_   gensupport.URLParams
  3505  	ifNoneMatch_ string
  3506  	ctx_         context.Context
  3507  	header_      http.Header
  3508  }
  3509  
  3510  // List: Lists operations that match the specified filter in the request. If
  3511  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3512  //
  3513  // - name: The name of the operation's parent resource.
  3514  func (r *OperationsService) List(name string) *OperationsListCall {
  3515  	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3516  	c.name = name
  3517  	return c
  3518  }
  3519  
  3520  // Filter sets the optional parameter "filter": The standard list filter.
  3521  func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  3522  	c.urlParams_.Set("filter", filter)
  3523  	return c
  3524  }
  3525  
  3526  // PageSize sets the optional parameter "pageSize": The standard list page
  3527  // size.
  3528  func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  3529  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3530  	return c
  3531  }
  3532  
  3533  // PageToken sets the optional parameter "pageToken": The standard list page
  3534  // token.
  3535  func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  3536  	c.urlParams_.Set("pageToken", pageToken)
  3537  	return c
  3538  }
  3539  
  3540  // Fields allows partial responses to be retrieved. See
  3541  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3542  // details.
  3543  func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  3544  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3545  	return c
  3546  }
  3547  
  3548  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3549  // object's ETag matches the given value. This is useful for getting updates
  3550  // only after the object has changed since the last request.
  3551  func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  3552  	c.ifNoneMatch_ = entityTag
  3553  	return c
  3554  }
  3555  
  3556  // Context sets the context to be used in this call's Do method.
  3557  func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  3558  	c.ctx_ = ctx
  3559  	return c
  3560  }
  3561  
  3562  // Header returns a http.Header that can be modified by the caller to add
  3563  // headers to the request.
  3564  func (c *OperationsListCall) Header() http.Header {
  3565  	if c.header_ == nil {
  3566  		c.header_ = make(http.Header)
  3567  	}
  3568  	return c.header_
  3569  }
  3570  
  3571  func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  3572  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3573  	if c.ifNoneMatch_ != "" {
  3574  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3575  	}
  3576  	var body io.Reader = nil
  3577  	c.urlParams_.Set("alt", alt)
  3578  	c.urlParams_.Set("prettyPrint", "false")
  3579  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3580  	urls += "?" + c.urlParams_.Encode()
  3581  	req, err := http.NewRequest("GET", urls, body)
  3582  	if err != nil {
  3583  		return nil, err
  3584  	}
  3585  	req.Header = reqHeaders
  3586  	googleapi.Expand(req.URL, map[string]string{
  3587  		"name": c.name,
  3588  	})
  3589  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3590  }
  3591  
  3592  // Do executes the "policysimulator.operations.list" call.
  3593  // Any non-2xx status code is an error. Response headers are in either
  3594  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  3595  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3596  // googleapi.IsNotModified to check whether the returned error was because
  3597  // http.StatusNotModified was returned.
  3598  func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  3599  	gensupport.SetOptions(c.urlParams_, opts...)
  3600  	res, err := c.doRequest("json")
  3601  	if res != nil && res.StatusCode == http.StatusNotModified {
  3602  		if res.Body != nil {
  3603  			res.Body.Close()
  3604  		}
  3605  		return nil, gensupport.WrapError(&googleapi.Error{
  3606  			Code:   res.StatusCode,
  3607  			Header: res.Header,
  3608  		})
  3609  	}
  3610  	if err != nil {
  3611  		return nil, err
  3612  	}
  3613  	defer googleapi.CloseBody(res)
  3614  	if err := googleapi.CheckResponse(res); err != nil {
  3615  		return nil, gensupport.WrapError(err)
  3616  	}
  3617  	ret := &GoogleLongrunningListOperationsResponse{
  3618  		ServerResponse: googleapi.ServerResponse{
  3619  			Header:         res.Header,
  3620  			HTTPStatusCode: res.StatusCode,
  3621  		},
  3622  	}
  3623  	target := &ret
  3624  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3625  		return nil, err
  3626  	}
  3627  	return ret, nil
  3628  }
  3629  
  3630  // Pages invokes f for each page of results.
  3631  // A non-nil error returned from f will halt the iteration.
  3632  // The provided context supersedes any context provided to the Context method.
  3633  func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  3634  	c.ctx_ = ctx
  3635  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3636  	for {
  3637  		x, err := c.Do()
  3638  		if err != nil {
  3639  			return err
  3640  		}
  3641  		if err := f(x); err != nil {
  3642  			return err
  3643  		}
  3644  		if x.NextPageToken == "" {
  3645  			return nil
  3646  		}
  3647  		c.PageToken(x.NextPageToken)
  3648  	}
  3649  }
  3650  
  3651  type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct {
  3652  	s                                                      *Service
  3653  	parent                                                 string
  3654  	googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
  3655  	urlParams_                                             gensupport.URLParams
  3656  	ctx_                                                   context.Context
  3657  	header_                                                http.Header
  3658  }
  3659  
  3660  // Create: CreateOrgPolicyViolationsPreview creates an
  3661  // OrgPolicyViolationsPreview for the proposed changes in the provided
  3662  // OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are
  3663  // specified by this `OrgPolicyOverlay`. The resources to scan are inferred
  3664  // from these specified changes.
  3665  //
  3666  //   - parent: The organization under which this OrgPolicyViolationsPreview will
  3667  //     be created. Example: `organizations/my-example-org/locations/global`.
  3668  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3669  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3670  	c.parent = parent
  3671  	c.googlecloudpolicysimulatorv1orgpolicyviolationspreview = googlecloudpolicysimulatorv1orgpolicyviolationspreview
  3672  	return c
  3673  }
  3674  
  3675  // OrgPolicyViolationsPreviewId sets the optional parameter
  3676  // "orgPolicyViolationsPreviewId": An optional user-specified ID for the
  3677  // OrgPolicyViolationsPreview. If not provided, a random ID will be generated.
  3678  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3679  	c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId)
  3680  	return c
  3681  }
  3682  
  3683  // Fields allows partial responses to be retrieved. See
  3684  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3685  // details.
  3686  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3687  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3688  	return c
  3689  }
  3690  
  3691  // Context sets the context to be used in this call's Do method.
  3692  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3693  	c.ctx_ = ctx
  3694  	return c
  3695  }
  3696  
  3697  // Header returns a http.Header that can be modified by the caller to add
  3698  // headers to the request.
  3699  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header {
  3700  	if c.header_ == nil {
  3701  		c.header_ = make(http.Header)
  3702  	}
  3703  	return c.header_
  3704  }
  3705  
  3706  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) {
  3707  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3708  	var body io.Reader = nil
  3709  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1orgpolicyviolationspreview)
  3710  	if err != nil {
  3711  		return nil, err
  3712  	}
  3713  	c.urlParams_.Set("alt", alt)
  3714  	c.urlParams_.Set("prettyPrint", "false")
  3715  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolationsPreviews")
  3716  	urls += "?" + c.urlParams_.Encode()
  3717  	req, err := http.NewRequest("POST", urls, body)
  3718  	if err != nil {
  3719  		return nil, err
  3720  	}
  3721  	req.Header = reqHeaders
  3722  	googleapi.Expand(req.URL, map[string]string{
  3723  		"parent": c.parent,
  3724  	})
  3725  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3726  }
  3727  
  3728  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call.
  3729  // Any non-2xx status code is an error. Response headers are in either
  3730  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3731  // returned at all) in error.(*googleapi.Error).Header. Use
  3732  // googleapi.IsNotModified to check whether the returned error was because
  3733  // http.StatusNotModified was returned.
  3734  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3735  	gensupport.SetOptions(c.urlParams_, opts...)
  3736  	res, err := c.doRequest("json")
  3737  	if res != nil && res.StatusCode == http.StatusNotModified {
  3738  		if res.Body != nil {
  3739  			res.Body.Close()
  3740  		}
  3741  		return nil, gensupport.WrapError(&googleapi.Error{
  3742  			Code:   res.StatusCode,
  3743  			Header: res.Header,
  3744  		})
  3745  	}
  3746  	if err != nil {
  3747  		return nil, err
  3748  	}
  3749  	defer googleapi.CloseBody(res)
  3750  	if err := googleapi.CheckResponse(res); err != nil {
  3751  		return nil, gensupport.WrapError(err)
  3752  	}
  3753  	ret := &GoogleLongrunningOperation{
  3754  		ServerResponse: googleapi.ServerResponse{
  3755  			Header:         res.Header,
  3756  			HTTPStatusCode: res.StatusCode,
  3757  		},
  3758  	}
  3759  	target := &ret
  3760  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3761  		return nil, err
  3762  	}
  3763  	return ret, nil
  3764  }
  3765  
  3766  type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct {
  3767  	s            *Service
  3768  	name         string
  3769  	urlParams_   gensupport.URLParams
  3770  	ifNoneMatch_ string
  3771  	ctx_         context.Context
  3772  	header_      http.Header
  3773  }
  3774  
  3775  // Get: GetOrgPolicyViolationsPreview gets the specified
  3776  // OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for
  3777  // at least 7 days.
  3778  //
  3779  // - name: The name of the OrgPolicyViolationsPreview to get.
  3780  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  3781  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3782  	c.name = name
  3783  	return c
  3784  }
  3785  
  3786  // Fields allows partial responses to be retrieved. See
  3787  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3788  // details.
  3789  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  3790  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3791  	return c
  3792  }
  3793  
  3794  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3795  // object's ETag matches the given value. This is useful for getting updates
  3796  // only after the object has changed since the last request.
  3797  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  3798  	c.ifNoneMatch_ = entityTag
  3799  	return c
  3800  }
  3801  
  3802  // Context sets the context to be used in this call's Do method.
  3803  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  3804  	c.ctx_ = ctx
  3805  	return c
  3806  }
  3807  
  3808  // Header returns a http.Header that can be modified by the caller to add
  3809  // headers to the request.
  3810  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header {
  3811  	if c.header_ == nil {
  3812  		c.header_ = make(http.Header)
  3813  	}
  3814  	return c.header_
  3815  }
  3816  
  3817  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) {
  3818  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3819  	if c.ifNoneMatch_ != "" {
  3820  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3821  	}
  3822  	var body io.Reader = nil
  3823  	c.urlParams_.Set("alt", alt)
  3824  	c.urlParams_.Set("prettyPrint", "false")
  3825  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3826  	urls += "?" + c.urlParams_.Encode()
  3827  	req, err := http.NewRequest("GET", urls, body)
  3828  	if err != nil {
  3829  		return nil, err
  3830  	}
  3831  	req.Header = reqHeaders
  3832  	googleapi.Expand(req.URL, map[string]string{
  3833  		"name": c.name,
  3834  	})
  3835  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3836  }
  3837  
  3838  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call.
  3839  // Any non-2xx status code is an error. Response headers are in either
  3840  // *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview.ServerResponse.Header
  3841  //
  3842  //	or (if a response was returned at all) in error.(*googleapi.Error).Header.
  3843  //
  3844  // Use googleapi.IsNotModified to check whether the returned error was because
  3845  // http.StatusNotModified was returned.
  3846  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, error) {
  3847  	gensupport.SetOptions(c.urlParams_, opts...)
  3848  	res, err := c.doRequest("json")
  3849  	if res != nil && res.StatusCode == http.StatusNotModified {
  3850  		if res.Body != nil {
  3851  			res.Body.Close()
  3852  		}
  3853  		return nil, gensupport.WrapError(&googleapi.Error{
  3854  			Code:   res.StatusCode,
  3855  			Header: res.Header,
  3856  		})
  3857  	}
  3858  	if err != nil {
  3859  		return nil, err
  3860  	}
  3861  	defer googleapi.CloseBody(res)
  3862  	if err := googleapi.CheckResponse(res); err != nil {
  3863  		return nil, gensupport.WrapError(err)
  3864  	}
  3865  	ret := &GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview{
  3866  		ServerResponse: googleapi.ServerResponse{
  3867  			Header:         res.Header,
  3868  			HTTPStatusCode: res.StatusCode,
  3869  		},
  3870  	}
  3871  	target := &ret
  3872  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3873  		return nil, err
  3874  	}
  3875  	return ret, nil
  3876  }
  3877  
  3878  type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct {
  3879  	s            *Service
  3880  	parent       string
  3881  	urlParams_   gensupport.URLParams
  3882  	ifNoneMatch_ string
  3883  	ctx_         context.Context
  3884  	header_      http.Header
  3885  }
  3886  
  3887  // List: ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview
  3888  // in an organization. Each OrgPolicyViolationsPreview is available for at
  3889  // least 7 days.
  3890  //
  3891  //   - parent: The parent the violations are scoped to. Format:
  3892  //     `organizations/{organization}/locations/{location}` Example:
  3893  //     `organizations/my-example-org/locations/global`.
  3894  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3895  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3896  	c.parent = parent
  3897  	return c
  3898  }
  3899  
  3900  // PageSize sets the optional parameter "pageSize": The maximum number of items
  3901  // to return. The service may return fewer than this value. If unspecified, at
  3902  // most 5 items will be returned. The maximum value is 10; values above 10 will
  3903  // be coerced to 10.
  3904  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3905  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3906  	return c
  3907  }
  3908  
  3909  // PageToken sets the optional parameter "pageToken": A page token, received
  3910  // from a previous call. Provide this to retrieve the subsequent page. When
  3911  // paginating, all other parameters must match the call that provided the page
  3912  // token.
  3913  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3914  	c.urlParams_.Set("pageToken", pageToken)
  3915  	return c
  3916  }
  3917  
  3918  // Fields allows partial responses to be retrieved. See
  3919  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3920  // details.
  3921  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3922  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3923  	return c
  3924  }
  3925  
  3926  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3927  // object's ETag matches the given value. This is useful for getting updates
  3928  // only after the object has changed since the last request.
  3929  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3930  	c.ifNoneMatch_ = entityTag
  3931  	return c
  3932  }
  3933  
  3934  // Context sets the context to be used in this call's Do method.
  3935  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  3936  	c.ctx_ = ctx
  3937  	return c
  3938  }
  3939  
  3940  // Header returns a http.Header that can be modified by the caller to add
  3941  // headers to the request.
  3942  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header {
  3943  	if c.header_ == nil {
  3944  		c.header_ = make(http.Header)
  3945  	}
  3946  	return c.header_
  3947  }
  3948  
  3949  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) {
  3950  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3951  	if c.ifNoneMatch_ != "" {
  3952  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3953  	}
  3954  	var body io.Reader = nil
  3955  	c.urlParams_.Set("alt", alt)
  3956  	c.urlParams_.Set("prettyPrint", "false")
  3957  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolationsPreviews")
  3958  	urls += "?" + c.urlParams_.Encode()
  3959  	req, err := http.NewRequest("GET", urls, body)
  3960  	if err != nil {
  3961  		return nil, err
  3962  	}
  3963  	req.Header = reqHeaders
  3964  	googleapi.Expand(req.URL, map[string]string{
  3965  		"parent": c.parent,
  3966  	})
  3967  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3968  }
  3969  
  3970  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call.
  3971  // Any non-2xx status code is an error. Response headers are in either
  3972  // *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse.ServerRe
  3973  // sponse.Header or (if a response was returned at all) in
  3974  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3975  // whether the returned error was because http.StatusNotModified was returned.
  3976  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse, error) {
  3977  	gensupport.SetOptions(c.urlParams_, opts...)
  3978  	res, err := c.doRequest("json")
  3979  	if res != nil && res.StatusCode == http.StatusNotModified {
  3980  		if res.Body != nil {
  3981  			res.Body.Close()
  3982  		}
  3983  		return nil, gensupport.WrapError(&googleapi.Error{
  3984  			Code:   res.StatusCode,
  3985  			Header: res.Header,
  3986  		})
  3987  	}
  3988  	if err != nil {
  3989  		return nil, err
  3990  	}
  3991  	defer googleapi.CloseBody(res)
  3992  	if err := googleapi.CheckResponse(res); err != nil {
  3993  		return nil, gensupport.WrapError(err)
  3994  	}
  3995  	ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse{
  3996  		ServerResponse: googleapi.ServerResponse{
  3997  			Header:         res.Header,
  3998  			HTTPStatusCode: res.StatusCode,
  3999  		},
  4000  	}
  4001  	target := &ret
  4002  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4003  		return nil, err
  4004  	}
  4005  	return ret, nil
  4006  }
  4007  
  4008  // Pages invokes f for each page of results.
  4009  // A non-nil error returned from f will halt the iteration.
  4010  // The provided context supersedes any context provided to the Context method.
  4011  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) error) error {
  4012  	c.ctx_ = ctx
  4013  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4014  	for {
  4015  		x, err := c.Do()
  4016  		if err != nil {
  4017  			return err
  4018  		}
  4019  		if err := f(x); err != nil {
  4020  			return err
  4021  		}
  4022  		if x.NextPageToken == "" {
  4023  			return nil
  4024  		}
  4025  		c.PageToken(x.NextPageToken)
  4026  	}
  4027  }
  4028  
  4029  type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  4030  	s            *Service
  4031  	name         string
  4032  	urlParams_   gensupport.URLParams
  4033  	ifNoneMatch_ string
  4034  	ctx_         context.Context
  4035  	header_      http.Header
  4036  }
  4037  
  4038  // Get: Gets the latest state of a long-running operation. Clients can use this
  4039  // method to poll the operation result at intervals as recommended by the API
  4040  // service.
  4041  //
  4042  // - name: The name of the operation resource.
  4043  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4044  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4045  	c.name = name
  4046  	return c
  4047  }
  4048  
  4049  // Fields allows partial responses to be retrieved. See
  4050  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4051  // details.
  4052  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4053  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4054  	return c
  4055  }
  4056  
  4057  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4058  // object's ETag matches the given value. This is useful for getting updates
  4059  // only after the object has changed since the last request.
  4060  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4061  	c.ifNoneMatch_ = entityTag
  4062  	return c
  4063  }
  4064  
  4065  // Context sets the context to be used in this call's Do method.
  4066  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4067  	c.ctx_ = ctx
  4068  	return c
  4069  }
  4070  
  4071  // Header returns a http.Header that can be modified by the caller to add
  4072  // headers to the request.
  4073  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  4074  	if c.header_ == nil {
  4075  		c.header_ = make(http.Header)
  4076  	}
  4077  	return c.header_
  4078  }
  4079  
  4080  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4081  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4082  	if c.ifNoneMatch_ != "" {
  4083  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4084  	}
  4085  	var body io.Reader = nil
  4086  	c.urlParams_.Set("alt", alt)
  4087  	c.urlParams_.Set("prettyPrint", "false")
  4088  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4089  	urls += "?" + c.urlParams_.Encode()
  4090  	req, err := http.NewRequest("GET", urls, body)
  4091  	if err != nil {
  4092  		return nil, err
  4093  	}
  4094  	req.Header = reqHeaders
  4095  	googleapi.Expand(req.URL, map[string]string{
  4096  		"name": c.name,
  4097  	})
  4098  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4099  }
  4100  
  4101  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call.
  4102  // Any non-2xx status code is an error. Response headers are in either
  4103  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4104  // returned at all) in error.(*googleapi.Error).Header. Use
  4105  // googleapi.IsNotModified to check whether the returned error was because
  4106  // http.StatusNotModified was returned.
  4107  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4108  	gensupport.SetOptions(c.urlParams_, opts...)
  4109  	res, err := c.doRequest("json")
  4110  	if res != nil && res.StatusCode == http.StatusNotModified {
  4111  		if res.Body != nil {
  4112  			res.Body.Close()
  4113  		}
  4114  		return nil, gensupport.WrapError(&googleapi.Error{
  4115  			Code:   res.StatusCode,
  4116  			Header: res.Header,
  4117  		})
  4118  	}
  4119  	if err != nil {
  4120  		return nil, err
  4121  	}
  4122  	defer googleapi.CloseBody(res)
  4123  	if err := googleapi.CheckResponse(res); err != nil {
  4124  		return nil, gensupport.WrapError(err)
  4125  	}
  4126  	ret := &GoogleLongrunningOperation{
  4127  		ServerResponse: googleapi.ServerResponse{
  4128  			Header:         res.Header,
  4129  			HTTPStatusCode: res.StatusCode,
  4130  		},
  4131  	}
  4132  	target := &ret
  4133  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4134  		return nil, err
  4135  	}
  4136  	return ret, nil
  4137  }
  4138  
  4139  type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct {
  4140  	s            *Service
  4141  	parent       string
  4142  	urlParams_   gensupport.URLParams
  4143  	ifNoneMatch_ string
  4144  	ctx_         context.Context
  4145  	header_      http.Header
  4146  }
  4147  
  4148  // List: ListOrgPolicyViolations lists the OrgPolicyViolations that are present
  4149  // in an OrgPolicyViolationsPreview.
  4150  //
  4151  //   - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations from.
  4152  //     Format:
  4153  //     organizations/{organization}/locations/{location}/orgPolicyViolationsPrevie
  4154  //     ws/{orgPolicyViolationsPreview}.
  4155  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4156  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4157  	c.parent = parent
  4158  	return c
  4159  }
  4160  
  4161  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4162  // to return. The service may return fewer than this value. If unspecified, at
  4163  // most 50 items will be returned. The maximum value is 1000; values above 1000
  4164  // will be coerced to 1000.
  4165  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4166  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4167  	return c
  4168  }
  4169  
  4170  // PageToken sets the optional parameter "pageToken": A page token, received
  4171  // from a previous call. Provide this to retrieve the subsequent page. When
  4172  // paginating, all other parameters must match the call that provided the page
  4173  // token.
  4174  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4175  	c.urlParams_.Set("pageToken", pageToken)
  4176  	return c
  4177  }
  4178  
  4179  // Fields allows partial responses to be retrieved. See
  4180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4181  // details.
  4182  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4184  	return c
  4185  }
  4186  
  4187  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4188  // object's ETag matches the given value. This is useful for getting updates
  4189  // only after the object has changed since the last request.
  4190  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4191  	c.ifNoneMatch_ = entityTag
  4192  	return c
  4193  }
  4194  
  4195  // Context sets the context to be used in this call's Do method.
  4196  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4197  	c.ctx_ = ctx
  4198  	return c
  4199  }
  4200  
  4201  // Header returns a http.Header that can be modified by the caller to add
  4202  // headers to the request.
  4203  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header {
  4204  	if c.header_ == nil {
  4205  		c.header_ = make(http.Header)
  4206  	}
  4207  	return c.header_
  4208  }
  4209  
  4210  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) {
  4211  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4212  	if c.ifNoneMatch_ != "" {
  4213  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4214  	}
  4215  	var body io.Reader = nil
  4216  	c.urlParams_.Set("alt", alt)
  4217  	c.urlParams_.Set("prettyPrint", "false")
  4218  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolations")
  4219  	urls += "?" + c.urlParams_.Encode()
  4220  	req, err := http.NewRequest("GET", urls, body)
  4221  	if err != nil {
  4222  		return nil, err
  4223  	}
  4224  	req.Header = reqHeaders
  4225  	googleapi.Expand(req.URL, map[string]string{
  4226  		"parent": c.parent,
  4227  	})
  4228  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4229  }
  4230  
  4231  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call.
  4232  // Any non-2xx status code is an error. Response headers are in either
  4233  // *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse.ServerResponse.H
  4234  // eader or (if a response was returned at all) in
  4235  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4236  // whether the returned error was because http.StatusNotModified was returned.
  4237  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse, error) {
  4238  	gensupport.SetOptions(c.urlParams_, opts...)
  4239  	res, err := c.doRequest("json")
  4240  	if res != nil && res.StatusCode == http.StatusNotModified {
  4241  		if res.Body != nil {
  4242  			res.Body.Close()
  4243  		}
  4244  		return nil, gensupport.WrapError(&googleapi.Error{
  4245  			Code:   res.StatusCode,
  4246  			Header: res.Header,
  4247  		})
  4248  	}
  4249  	if err != nil {
  4250  		return nil, err
  4251  	}
  4252  	defer googleapi.CloseBody(res)
  4253  	if err := googleapi.CheckResponse(res); err != nil {
  4254  		return nil, gensupport.WrapError(err)
  4255  	}
  4256  	ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse{
  4257  		ServerResponse: googleapi.ServerResponse{
  4258  			Header:         res.Header,
  4259  			HTTPStatusCode: res.StatusCode,
  4260  		},
  4261  	}
  4262  	target := &ret
  4263  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4264  		return nil, err
  4265  	}
  4266  	return ret, nil
  4267  }
  4268  
  4269  // Pages invokes f for each page of results.
  4270  // A non-nil error returned from f will halt the iteration.
  4271  // The provided context supersedes any context provided to the Context method.
  4272  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) error) error {
  4273  	c.ctx_ = ctx
  4274  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4275  	for {
  4276  		x, err := c.Do()
  4277  		if err != nil {
  4278  			return err
  4279  		}
  4280  		if err := f(x); err != nil {
  4281  			return err
  4282  		}
  4283  		if x.NextPageToken == "" {
  4284  			return nil
  4285  		}
  4286  		c.PageToken(x.NextPageToken)
  4287  	}
  4288  }
  4289  
  4290  type OrganizationsLocationsReplaysCreateCall struct {
  4291  	s                                  *Service
  4292  	parent                             string
  4293  	googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay
  4294  	urlParams_                         gensupport.URLParams
  4295  	ctx_                               context.Context
  4296  	header_                            http.Header
  4297  }
  4298  
  4299  // Create: Creates and starts a Replay using the given ReplayConfig.
  4300  //
  4301  //   - parent: The parent resource where this Replay will be created. This
  4302  //     resource must be a project, folder, or organization with a location.
  4303  //     Example: `projects/my-example-project/locations/global`.
  4304  func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *OrganizationsLocationsReplaysCreateCall {
  4305  	c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4306  	c.parent = parent
  4307  	c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay
  4308  	return c
  4309  }
  4310  
  4311  // Fields allows partial responses to be retrieved. See
  4312  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4313  // details.
  4314  func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall {
  4315  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4316  	return c
  4317  }
  4318  
  4319  // Context sets the context to be used in this call's Do method.
  4320  func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall {
  4321  	c.ctx_ = ctx
  4322  	return c
  4323  }
  4324  
  4325  // Header returns a http.Header that can be modified by the caller to add
  4326  // headers to the request.
  4327  func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header {
  4328  	if c.header_ == nil {
  4329  		c.header_ = make(http.Header)
  4330  	}
  4331  	return c.header_
  4332  }
  4333  
  4334  func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  4335  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4336  	var body io.Reader = nil
  4337  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay)
  4338  	if err != nil {
  4339  		return nil, err
  4340  	}
  4341  	c.urlParams_.Set("alt", alt)
  4342  	c.urlParams_.Set("prettyPrint", "false")
  4343  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays")
  4344  	urls += "?" + c.urlParams_.Encode()
  4345  	req, err := http.NewRequest("POST", urls, body)
  4346  	if err != nil {
  4347  		return nil, err
  4348  	}
  4349  	req.Header = reqHeaders
  4350  	googleapi.Expand(req.URL, map[string]string{
  4351  		"parent": c.parent,
  4352  	})
  4353  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4354  }
  4355  
  4356  // Do executes the "policysimulator.organizations.locations.replays.create" call.
  4357  // Any non-2xx status code is an error. Response headers are in either
  4358  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4359  // returned at all) in error.(*googleapi.Error).Header. Use
  4360  // googleapi.IsNotModified to check whether the returned error was because
  4361  // http.StatusNotModified was returned.
  4362  func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4363  	gensupport.SetOptions(c.urlParams_, opts...)
  4364  	res, err := c.doRequest("json")
  4365  	if res != nil && res.StatusCode == http.StatusNotModified {
  4366  		if res.Body != nil {
  4367  			res.Body.Close()
  4368  		}
  4369  		return nil, gensupport.WrapError(&googleapi.Error{
  4370  			Code:   res.StatusCode,
  4371  			Header: res.Header,
  4372  		})
  4373  	}
  4374  	if err != nil {
  4375  		return nil, err
  4376  	}
  4377  	defer googleapi.CloseBody(res)
  4378  	if err := googleapi.CheckResponse(res); err != nil {
  4379  		return nil, gensupport.WrapError(err)
  4380  	}
  4381  	ret := &GoogleLongrunningOperation{
  4382  		ServerResponse: googleapi.ServerResponse{
  4383  			Header:         res.Header,
  4384  			HTTPStatusCode: res.StatusCode,
  4385  		},
  4386  	}
  4387  	target := &ret
  4388  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4389  		return nil, err
  4390  	}
  4391  	return ret, nil
  4392  }
  4393  
  4394  type OrganizationsLocationsReplaysGetCall struct {
  4395  	s            *Service
  4396  	name         string
  4397  	urlParams_   gensupport.URLParams
  4398  	ifNoneMatch_ string
  4399  	ctx_         context.Context
  4400  	header_      http.Header
  4401  }
  4402  
  4403  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  4404  // days.
  4405  //
  4406  //   - name: The name of the Replay to retrieve, in the following format:
  4407  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  4408  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  4409  //     organization that owns the `Replay`. Example:
  4410  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  4411  //     03-479ce1833c36`.
  4412  func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall {
  4413  	c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4414  	c.name = name
  4415  	return c
  4416  }
  4417  
  4418  // Fields allows partial responses to be retrieved. See
  4419  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4420  // details.
  4421  func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall {
  4422  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4423  	return c
  4424  }
  4425  
  4426  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4427  // object's ETag matches the given value. This is useful for getting updates
  4428  // only after the object has changed since the last request.
  4429  func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall {
  4430  	c.ifNoneMatch_ = entityTag
  4431  	return c
  4432  }
  4433  
  4434  // Context sets the context to be used in this call's Do method.
  4435  func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall {
  4436  	c.ctx_ = ctx
  4437  	return c
  4438  }
  4439  
  4440  // Header returns a http.Header that can be modified by the caller to add
  4441  // headers to the request.
  4442  func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header {
  4443  	if c.header_ == nil {
  4444  		c.header_ = make(http.Header)
  4445  	}
  4446  	return c.header_
  4447  }
  4448  
  4449  func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  4450  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4451  	if c.ifNoneMatch_ != "" {
  4452  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4453  	}
  4454  	var body io.Reader = nil
  4455  	c.urlParams_.Set("alt", alt)
  4456  	c.urlParams_.Set("prettyPrint", "false")
  4457  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4458  	urls += "?" + c.urlParams_.Encode()
  4459  	req, err := http.NewRequest("GET", urls, body)
  4460  	if err != nil {
  4461  		return nil, err
  4462  	}
  4463  	req.Header = reqHeaders
  4464  	googleapi.Expand(req.URL, map[string]string{
  4465  		"name": c.name,
  4466  	})
  4467  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4468  }
  4469  
  4470  // Do executes the "policysimulator.organizations.locations.replays.get" call.
  4471  // Any non-2xx status code is an error. Response headers are in either
  4472  // *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or (if a response
  4473  // was returned at all) in error.(*googleapi.Error).Header. Use
  4474  // googleapi.IsNotModified to check whether the returned error was because
  4475  // http.StatusNotModified was returned.
  4476  func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) {
  4477  	gensupport.SetOptions(c.urlParams_, opts...)
  4478  	res, err := c.doRequest("json")
  4479  	if res != nil && res.StatusCode == http.StatusNotModified {
  4480  		if res.Body != nil {
  4481  			res.Body.Close()
  4482  		}
  4483  		return nil, gensupport.WrapError(&googleapi.Error{
  4484  			Code:   res.StatusCode,
  4485  			Header: res.Header,
  4486  		})
  4487  	}
  4488  	if err != nil {
  4489  		return nil, err
  4490  	}
  4491  	defer googleapi.CloseBody(res)
  4492  	if err := googleapi.CheckResponse(res); err != nil {
  4493  		return nil, gensupport.WrapError(err)
  4494  	}
  4495  	ret := &GoogleCloudPolicysimulatorV1Replay{
  4496  		ServerResponse: googleapi.ServerResponse{
  4497  			Header:         res.Header,
  4498  			HTTPStatusCode: res.StatusCode,
  4499  		},
  4500  	}
  4501  	target := &ret
  4502  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4503  		return nil, err
  4504  	}
  4505  	return ret, nil
  4506  }
  4507  
  4508  type OrganizationsLocationsReplaysOperationsGetCall struct {
  4509  	s            *Service
  4510  	name         string
  4511  	urlParams_   gensupport.URLParams
  4512  	ifNoneMatch_ string
  4513  	ctx_         context.Context
  4514  	header_      http.Header
  4515  }
  4516  
  4517  // Get: Gets the latest state of a long-running operation. Clients can use this
  4518  // method to poll the operation result at intervals as recommended by the API
  4519  // service.
  4520  //
  4521  // - name: The name of the operation resource.
  4522  func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall {
  4523  	c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4524  	c.name = name
  4525  	return c
  4526  }
  4527  
  4528  // Fields allows partial responses to be retrieved. See
  4529  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4530  // details.
  4531  func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall {
  4532  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4533  	return c
  4534  }
  4535  
  4536  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4537  // object's ETag matches the given value. This is useful for getting updates
  4538  // only after the object has changed since the last request.
  4539  func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall {
  4540  	c.ifNoneMatch_ = entityTag
  4541  	return c
  4542  }
  4543  
  4544  // Context sets the context to be used in this call's Do method.
  4545  func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall {
  4546  	c.ctx_ = ctx
  4547  	return c
  4548  }
  4549  
  4550  // Header returns a http.Header that can be modified by the caller to add
  4551  // headers to the request.
  4552  func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header {
  4553  	if c.header_ == nil {
  4554  		c.header_ = make(http.Header)
  4555  	}
  4556  	return c.header_
  4557  }
  4558  
  4559  func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4560  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4561  	if c.ifNoneMatch_ != "" {
  4562  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4563  	}
  4564  	var body io.Reader = nil
  4565  	c.urlParams_.Set("alt", alt)
  4566  	c.urlParams_.Set("prettyPrint", "false")
  4567  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4568  	urls += "?" + c.urlParams_.Encode()
  4569  	req, err := http.NewRequest("GET", urls, body)
  4570  	if err != nil {
  4571  		return nil, err
  4572  	}
  4573  	req.Header = reqHeaders
  4574  	googleapi.Expand(req.URL, map[string]string{
  4575  		"name": c.name,
  4576  	})
  4577  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4578  }
  4579  
  4580  // Do executes the "policysimulator.organizations.locations.replays.operations.get" call.
  4581  // Any non-2xx status code is an error. Response headers are in either
  4582  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4583  // returned at all) in error.(*googleapi.Error).Header. Use
  4584  // googleapi.IsNotModified to check whether the returned error was because
  4585  // http.StatusNotModified was returned.
  4586  func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4587  	gensupport.SetOptions(c.urlParams_, opts...)
  4588  	res, err := c.doRequest("json")
  4589  	if res != nil && res.StatusCode == http.StatusNotModified {
  4590  		if res.Body != nil {
  4591  			res.Body.Close()
  4592  		}
  4593  		return nil, gensupport.WrapError(&googleapi.Error{
  4594  			Code:   res.StatusCode,
  4595  			Header: res.Header,
  4596  		})
  4597  	}
  4598  	if err != nil {
  4599  		return nil, err
  4600  	}
  4601  	defer googleapi.CloseBody(res)
  4602  	if err := googleapi.CheckResponse(res); err != nil {
  4603  		return nil, gensupport.WrapError(err)
  4604  	}
  4605  	ret := &GoogleLongrunningOperation{
  4606  		ServerResponse: googleapi.ServerResponse{
  4607  			Header:         res.Header,
  4608  			HTTPStatusCode: res.StatusCode,
  4609  		},
  4610  	}
  4611  	target := &ret
  4612  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4613  		return nil, err
  4614  	}
  4615  	return ret, nil
  4616  }
  4617  
  4618  type OrganizationsLocationsReplaysOperationsListCall struct {
  4619  	s            *Service
  4620  	name         string
  4621  	urlParams_   gensupport.URLParams
  4622  	ifNoneMatch_ string
  4623  	ctx_         context.Context
  4624  	header_      http.Header
  4625  }
  4626  
  4627  // List: Lists operations that match the specified filter in the request. If
  4628  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4629  //
  4630  // - name: The name of the operation's parent resource.
  4631  func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall {
  4632  	c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4633  	c.name = name
  4634  	return c
  4635  }
  4636  
  4637  // Filter sets the optional parameter "filter": The standard list filter.
  4638  func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall {
  4639  	c.urlParams_.Set("filter", filter)
  4640  	return c
  4641  }
  4642  
  4643  // PageSize sets the optional parameter "pageSize": The standard list page
  4644  // size.
  4645  func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall {
  4646  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4647  	return c
  4648  }
  4649  
  4650  // PageToken sets the optional parameter "pageToken": The standard list page
  4651  // token.
  4652  func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall {
  4653  	c.urlParams_.Set("pageToken", pageToken)
  4654  	return c
  4655  }
  4656  
  4657  // Fields allows partial responses to be retrieved. See
  4658  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4659  // details.
  4660  func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall {
  4661  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4662  	return c
  4663  }
  4664  
  4665  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4666  // object's ETag matches the given value. This is useful for getting updates
  4667  // only after the object has changed since the last request.
  4668  func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall {
  4669  	c.ifNoneMatch_ = entityTag
  4670  	return c
  4671  }
  4672  
  4673  // Context sets the context to be used in this call's Do method.
  4674  func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall {
  4675  	c.ctx_ = ctx
  4676  	return c
  4677  }
  4678  
  4679  // Header returns a http.Header that can be modified by the caller to add
  4680  // headers to the request.
  4681  func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header {
  4682  	if c.header_ == nil {
  4683  		c.header_ = make(http.Header)
  4684  	}
  4685  	return c.header_
  4686  }
  4687  
  4688  func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4689  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4690  	if c.ifNoneMatch_ != "" {
  4691  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4692  	}
  4693  	var body io.Reader = nil
  4694  	c.urlParams_.Set("alt", alt)
  4695  	c.urlParams_.Set("prettyPrint", "false")
  4696  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4697  	urls += "?" + c.urlParams_.Encode()
  4698  	req, err := http.NewRequest("GET", urls, body)
  4699  	if err != nil {
  4700  		return nil, err
  4701  	}
  4702  	req.Header = reqHeaders
  4703  	googleapi.Expand(req.URL, map[string]string{
  4704  		"name": c.name,
  4705  	})
  4706  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4707  }
  4708  
  4709  // Do executes the "policysimulator.organizations.locations.replays.operations.list" call.
  4710  // Any non-2xx status code is an error. Response headers are in either
  4711  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  4712  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4713  // googleapi.IsNotModified to check whether the returned error was because
  4714  // http.StatusNotModified was returned.
  4715  func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  4716  	gensupport.SetOptions(c.urlParams_, opts...)
  4717  	res, err := c.doRequest("json")
  4718  	if res != nil && res.StatusCode == http.StatusNotModified {
  4719  		if res.Body != nil {
  4720  			res.Body.Close()
  4721  		}
  4722  		return nil, gensupport.WrapError(&googleapi.Error{
  4723  			Code:   res.StatusCode,
  4724  			Header: res.Header,
  4725  		})
  4726  	}
  4727  	if err != nil {
  4728  		return nil, err
  4729  	}
  4730  	defer googleapi.CloseBody(res)
  4731  	if err := googleapi.CheckResponse(res); err != nil {
  4732  		return nil, gensupport.WrapError(err)
  4733  	}
  4734  	ret := &GoogleLongrunningListOperationsResponse{
  4735  		ServerResponse: googleapi.ServerResponse{
  4736  			Header:         res.Header,
  4737  			HTTPStatusCode: res.StatusCode,
  4738  		},
  4739  	}
  4740  	target := &ret
  4741  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4742  		return nil, err
  4743  	}
  4744  	return ret, nil
  4745  }
  4746  
  4747  // Pages invokes f for each page of results.
  4748  // A non-nil error returned from f will halt the iteration.
  4749  // The provided context supersedes any context provided to the Context method.
  4750  func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  4751  	c.ctx_ = ctx
  4752  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4753  	for {
  4754  		x, err := c.Do()
  4755  		if err != nil {
  4756  			return err
  4757  		}
  4758  		if err := f(x); err != nil {
  4759  			return err
  4760  		}
  4761  		if x.NextPageToken == "" {
  4762  			return nil
  4763  		}
  4764  		c.PageToken(x.NextPageToken)
  4765  	}
  4766  }
  4767  
  4768  type OrganizationsLocationsReplaysResultsListCall struct {
  4769  	s            *Service
  4770  	parent       string
  4771  	urlParams_   gensupport.URLParams
  4772  	ifNoneMatch_ string
  4773  	ctx_         context.Context
  4774  	header_      http.Header
  4775  }
  4776  
  4777  // List: Lists the results of running a Replay.
  4778  //
  4779  //   - parent: The Replay whose results are listed, in the following format:
  4780  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  4781  //     eplay-id}` Example:
  4782  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  4783  //     1833c36`.
  4784  func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall {
  4785  	c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4786  	c.parent = parent
  4787  	return c
  4788  }
  4789  
  4790  // PageSize sets the optional parameter "pageSize": The maximum number of
  4791  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  4792  // values above 5000 are rounded down to 5000.
  4793  func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall {
  4794  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4795  	return c
  4796  }
  4797  
  4798  // PageToken sets the optional parameter "pageToken": A page token, received
  4799  // from a previous Simulator.ListReplayResults call. Provide this token to
  4800  // retrieve the next page of results. When paginating, all other parameters
  4801  // provided to [Simulator.ListReplayResults[] must match the call that provided
  4802  // the page token.
  4803  func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall {
  4804  	c.urlParams_.Set("pageToken", pageToken)
  4805  	return c
  4806  }
  4807  
  4808  // Fields allows partial responses to be retrieved. See
  4809  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4810  // details.
  4811  func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall {
  4812  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4813  	return c
  4814  }
  4815  
  4816  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4817  // object's ETag matches the given value. This is useful for getting updates
  4818  // only after the object has changed since the last request.
  4819  func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall {
  4820  	c.ifNoneMatch_ = entityTag
  4821  	return c
  4822  }
  4823  
  4824  // Context sets the context to be used in this call's Do method.
  4825  func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall {
  4826  	c.ctx_ = ctx
  4827  	return c
  4828  }
  4829  
  4830  // Header returns a http.Header that can be modified by the caller to add
  4831  // headers to the request.
  4832  func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header {
  4833  	if c.header_ == nil {
  4834  		c.header_ = make(http.Header)
  4835  	}
  4836  	return c.header_
  4837  }
  4838  
  4839  func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  4840  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4841  	if c.ifNoneMatch_ != "" {
  4842  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4843  	}
  4844  	var body io.Reader = nil
  4845  	c.urlParams_.Set("alt", alt)
  4846  	c.urlParams_.Set("prettyPrint", "false")
  4847  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results")
  4848  	urls += "?" + c.urlParams_.Encode()
  4849  	req, err := http.NewRequest("GET", urls, body)
  4850  	if err != nil {
  4851  		return nil, err
  4852  	}
  4853  	req.Header = reqHeaders
  4854  	googleapi.Expand(req.URL, map[string]string{
  4855  		"parent": c.parent,
  4856  	})
  4857  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4858  }
  4859  
  4860  // Do executes the "policysimulator.organizations.locations.replays.results.list" call.
  4861  // Any non-2xx status code is an error. Response headers are in either
  4862  // *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse.Header
  4863  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  4864  // Use googleapi.IsNotModified to check whether the returned error was because
  4865  // http.StatusNotModified was returned.
  4866  func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) {
  4867  	gensupport.SetOptions(c.urlParams_, opts...)
  4868  	res, err := c.doRequest("json")
  4869  	if res != nil && res.StatusCode == http.StatusNotModified {
  4870  		if res.Body != nil {
  4871  			res.Body.Close()
  4872  		}
  4873  		return nil, gensupport.WrapError(&googleapi.Error{
  4874  			Code:   res.StatusCode,
  4875  			Header: res.Header,
  4876  		})
  4877  	}
  4878  	if err != nil {
  4879  		return nil, err
  4880  	}
  4881  	defer googleapi.CloseBody(res)
  4882  	if err := googleapi.CheckResponse(res); err != nil {
  4883  		return nil, gensupport.WrapError(err)
  4884  	}
  4885  	ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{
  4886  		ServerResponse: googleapi.ServerResponse{
  4887  			Header:         res.Header,
  4888  			HTTPStatusCode: res.StatusCode,
  4889  		},
  4890  	}
  4891  	target := &ret
  4892  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4893  		return nil, err
  4894  	}
  4895  	return ret, nil
  4896  }
  4897  
  4898  // Pages invokes f for each page of results.
  4899  // A non-nil error returned from f will halt the iteration.
  4900  // The provided context supersedes any context provided to the Context method.
  4901  func (c *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error {
  4902  	c.ctx_ = ctx
  4903  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4904  	for {
  4905  		x, err := c.Do()
  4906  		if err != nil {
  4907  			return err
  4908  		}
  4909  		if err := f(x); err != nil {
  4910  			return err
  4911  		}
  4912  		if x.NextPageToken == "" {
  4913  			return nil
  4914  		}
  4915  		c.PageToken(x.NextPageToken)
  4916  	}
  4917  }
  4918  
  4919  type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  4920  	s            *Service
  4921  	name         string
  4922  	urlParams_   gensupport.URLParams
  4923  	ifNoneMatch_ string
  4924  	ctx_         context.Context
  4925  	header_      http.Header
  4926  }
  4927  
  4928  // Get: Gets the latest state of a long-running operation. Clients can use this
  4929  // method to poll the operation result at intervals as recommended by the API
  4930  // service.
  4931  //
  4932  // - name: The name of the operation resource.
  4933  func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4934  	c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4935  	c.name = name
  4936  	return c
  4937  }
  4938  
  4939  // Fields allows partial responses to be retrieved. See
  4940  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4941  // details.
  4942  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4943  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4944  	return c
  4945  }
  4946  
  4947  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4948  // object's ETag matches the given value. This is useful for getting updates
  4949  // only after the object has changed since the last request.
  4950  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4951  	c.ifNoneMatch_ = entityTag
  4952  	return c
  4953  }
  4954  
  4955  // Context sets the context to be used in this call's Do method.
  4956  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4957  	c.ctx_ = ctx
  4958  	return c
  4959  }
  4960  
  4961  // Header returns a http.Header that can be modified by the caller to add
  4962  // headers to the request.
  4963  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  4964  	if c.header_ == nil {
  4965  		c.header_ = make(http.Header)
  4966  	}
  4967  	return c.header_
  4968  }
  4969  
  4970  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4971  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4972  	if c.ifNoneMatch_ != "" {
  4973  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4974  	}
  4975  	var body io.Reader = nil
  4976  	c.urlParams_.Set("alt", alt)
  4977  	c.urlParams_.Set("prettyPrint", "false")
  4978  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4979  	urls += "?" + c.urlParams_.Encode()
  4980  	req, err := http.NewRequest("GET", urls, body)
  4981  	if err != nil {
  4982  		return nil, err
  4983  	}
  4984  	req.Header = reqHeaders
  4985  	googleapi.Expand(req.URL, map[string]string{
  4986  		"name": c.name,
  4987  	})
  4988  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4989  }
  4990  
  4991  // Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call.
  4992  // Any non-2xx status code is an error. Response headers are in either
  4993  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4994  // returned at all) in error.(*googleapi.Error).Header. Use
  4995  // googleapi.IsNotModified to check whether the returned error was because
  4996  // http.StatusNotModified was returned.
  4997  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4998  	gensupport.SetOptions(c.urlParams_, opts...)
  4999  	res, err := c.doRequest("json")
  5000  	if res != nil && res.StatusCode == http.StatusNotModified {
  5001  		if res.Body != nil {
  5002  			res.Body.Close()
  5003  		}
  5004  		return nil, gensupport.WrapError(&googleapi.Error{
  5005  			Code:   res.StatusCode,
  5006  			Header: res.Header,
  5007  		})
  5008  	}
  5009  	if err != nil {
  5010  		return nil, err
  5011  	}
  5012  	defer googleapi.CloseBody(res)
  5013  	if err := googleapi.CheckResponse(res); err != nil {
  5014  		return nil, gensupport.WrapError(err)
  5015  	}
  5016  	ret := &GoogleLongrunningOperation{
  5017  		ServerResponse: googleapi.ServerResponse{
  5018  			Header:         res.Header,
  5019  			HTTPStatusCode: res.StatusCode,
  5020  		},
  5021  	}
  5022  	target := &ret
  5023  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5024  		return nil, err
  5025  	}
  5026  	return ret, nil
  5027  }
  5028  
  5029  type ProjectsLocationsReplaysCreateCall struct {
  5030  	s                                  *Service
  5031  	parent                             string
  5032  	googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay
  5033  	urlParams_                         gensupport.URLParams
  5034  	ctx_                               context.Context
  5035  	header_                            http.Header
  5036  }
  5037  
  5038  // Create: Creates and starts a Replay using the given ReplayConfig.
  5039  //
  5040  //   - parent: The parent resource where this Replay will be created. This
  5041  //     resource must be a project, folder, or organization with a location.
  5042  //     Example: `projects/my-example-project/locations/global`.
  5043  func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *ProjectsLocationsReplaysCreateCall {
  5044  	c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5045  	c.parent = parent
  5046  	c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay
  5047  	return c
  5048  }
  5049  
  5050  // Fields allows partial responses to be retrieved. See
  5051  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5052  // details.
  5053  func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall {
  5054  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5055  	return c
  5056  }
  5057  
  5058  // Context sets the context to be used in this call's Do method.
  5059  func (c *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall {
  5060  	c.ctx_ = ctx
  5061  	return c
  5062  }
  5063  
  5064  // Header returns a http.Header that can be modified by the caller to add
  5065  // headers to the request.
  5066  func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header {
  5067  	if c.header_ == nil {
  5068  		c.header_ = make(http.Header)
  5069  	}
  5070  	return c.header_
  5071  }
  5072  
  5073  func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  5074  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5075  	var body io.Reader = nil
  5076  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay)
  5077  	if err != nil {
  5078  		return nil, err
  5079  	}
  5080  	c.urlParams_.Set("alt", alt)
  5081  	c.urlParams_.Set("prettyPrint", "false")
  5082  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays")
  5083  	urls += "?" + c.urlParams_.Encode()
  5084  	req, err := http.NewRequest("POST", urls, body)
  5085  	if err != nil {
  5086  		return nil, err
  5087  	}
  5088  	req.Header = reqHeaders
  5089  	googleapi.Expand(req.URL, map[string]string{
  5090  		"parent": c.parent,
  5091  	})
  5092  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5093  }
  5094  
  5095  // Do executes the "policysimulator.projects.locations.replays.create" call.
  5096  // Any non-2xx status code is an error. Response headers are in either
  5097  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5098  // returned at all) in error.(*googleapi.Error).Header. Use
  5099  // googleapi.IsNotModified to check whether the returned error was because
  5100  // http.StatusNotModified was returned.
  5101  func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5102  	gensupport.SetOptions(c.urlParams_, opts...)
  5103  	res, err := c.doRequest("json")
  5104  	if res != nil && res.StatusCode == http.StatusNotModified {
  5105  		if res.Body != nil {
  5106  			res.Body.Close()
  5107  		}
  5108  		return nil, gensupport.WrapError(&googleapi.Error{
  5109  			Code:   res.StatusCode,
  5110  			Header: res.Header,
  5111  		})
  5112  	}
  5113  	if err != nil {
  5114  		return nil, err
  5115  	}
  5116  	defer googleapi.CloseBody(res)
  5117  	if err := googleapi.CheckResponse(res); err != nil {
  5118  		return nil, gensupport.WrapError(err)
  5119  	}
  5120  	ret := &GoogleLongrunningOperation{
  5121  		ServerResponse: googleapi.ServerResponse{
  5122  			Header:         res.Header,
  5123  			HTTPStatusCode: res.StatusCode,
  5124  		},
  5125  	}
  5126  	target := &ret
  5127  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5128  		return nil, err
  5129  	}
  5130  	return ret, nil
  5131  }
  5132  
  5133  type ProjectsLocationsReplaysGetCall struct {
  5134  	s            *Service
  5135  	name         string
  5136  	urlParams_   gensupport.URLParams
  5137  	ifNoneMatch_ string
  5138  	ctx_         context.Context
  5139  	header_      http.Header
  5140  }
  5141  
  5142  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  5143  // days.
  5144  //
  5145  //   - name: The name of the Replay to retrieve, in the following format:
  5146  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  5147  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  5148  //     organization that owns the `Replay`. Example:
  5149  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  5150  //     03-479ce1833c36`.
  5151  func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall {
  5152  	c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5153  	c.name = name
  5154  	return c
  5155  }
  5156  
  5157  // Fields allows partial responses to be retrieved. See
  5158  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5159  // details.
  5160  func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall {
  5161  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5162  	return c
  5163  }
  5164  
  5165  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5166  // object's ETag matches the given value. This is useful for getting updates
  5167  // only after the object has changed since the last request.
  5168  func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall {
  5169  	c.ifNoneMatch_ = entityTag
  5170  	return c
  5171  }
  5172  
  5173  // Context sets the context to be used in this call's Do method.
  5174  func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall {
  5175  	c.ctx_ = ctx
  5176  	return c
  5177  }
  5178  
  5179  // Header returns a http.Header that can be modified by the caller to add
  5180  // headers to the request.
  5181  func (c *ProjectsLocationsReplaysGetCall) Header() http.Header {
  5182  	if c.header_ == nil {
  5183  		c.header_ = make(http.Header)
  5184  	}
  5185  	return c.header_
  5186  }
  5187  
  5188  func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  5189  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5190  	if c.ifNoneMatch_ != "" {
  5191  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5192  	}
  5193  	var body io.Reader = nil
  5194  	c.urlParams_.Set("alt", alt)
  5195  	c.urlParams_.Set("prettyPrint", "false")
  5196  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5197  	urls += "?" + c.urlParams_.Encode()
  5198  	req, err := http.NewRequest("GET", urls, body)
  5199  	if err != nil {
  5200  		return nil, err
  5201  	}
  5202  	req.Header = reqHeaders
  5203  	googleapi.Expand(req.URL, map[string]string{
  5204  		"name": c.name,
  5205  	})
  5206  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5207  }
  5208  
  5209  // Do executes the "policysimulator.projects.locations.replays.get" call.
  5210  // Any non-2xx status code is an error. Response headers are in either
  5211  // *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or (if a response
  5212  // was returned at all) in error.(*googleapi.Error).Header. Use
  5213  // googleapi.IsNotModified to check whether the returned error was because
  5214  // http.StatusNotModified was returned.
  5215  func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) {
  5216  	gensupport.SetOptions(c.urlParams_, opts...)
  5217  	res, err := c.doRequest("json")
  5218  	if res != nil && res.StatusCode == http.StatusNotModified {
  5219  		if res.Body != nil {
  5220  			res.Body.Close()
  5221  		}
  5222  		return nil, gensupport.WrapError(&googleapi.Error{
  5223  			Code:   res.StatusCode,
  5224  			Header: res.Header,
  5225  		})
  5226  	}
  5227  	if err != nil {
  5228  		return nil, err
  5229  	}
  5230  	defer googleapi.CloseBody(res)
  5231  	if err := googleapi.CheckResponse(res); err != nil {
  5232  		return nil, gensupport.WrapError(err)
  5233  	}
  5234  	ret := &GoogleCloudPolicysimulatorV1Replay{
  5235  		ServerResponse: googleapi.ServerResponse{
  5236  			Header:         res.Header,
  5237  			HTTPStatusCode: res.StatusCode,
  5238  		},
  5239  	}
  5240  	target := &ret
  5241  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5242  		return nil, err
  5243  	}
  5244  	return ret, nil
  5245  }
  5246  
  5247  type ProjectsLocationsReplaysOperationsGetCall struct {
  5248  	s            *Service
  5249  	name         string
  5250  	urlParams_   gensupport.URLParams
  5251  	ifNoneMatch_ string
  5252  	ctx_         context.Context
  5253  	header_      http.Header
  5254  }
  5255  
  5256  // Get: Gets the latest state of a long-running operation. Clients can use this
  5257  // method to poll the operation result at intervals as recommended by the API
  5258  // service.
  5259  //
  5260  // - name: The name of the operation resource.
  5261  func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall {
  5262  	c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5263  	c.name = name
  5264  	return c
  5265  }
  5266  
  5267  // Fields allows partial responses to be retrieved. See
  5268  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5269  // details.
  5270  func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall {
  5271  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5272  	return c
  5273  }
  5274  
  5275  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5276  // object's ETag matches the given value. This is useful for getting updates
  5277  // only after the object has changed since the last request.
  5278  func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall {
  5279  	c.ifNoneMatch_ = entityTag
  5280  	return c
  5281  }
  5282  
  5283  // Context sets the context to be used in this call's Do method.
  5284  func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall {
  5285  	c.ctx_ = ctx
  5286  	return c
  5287  }
  5288  
  5289  // Header returns a http.Header that can be modified by the caller to add
  5290  // headers to the request.
  5291  func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header {
  5292  	if c.header_ == nil {
  5293  		c.header_ = make(http.Header)
  5294  	}
  5295  	return c.header_
  5296  }
  5297  
  5298  func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5299  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5300  	if c.ifNoneMatch_ != "" {
  5301  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5302  	}
  5303  	var body io.Reader = nil
  5304  	c.urlParams_.Set("alt", alt)
  5305  	c.urlParams_.Set("prettyPrint", "false")
  5306  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5307  	urls += "?" + c.urlParams_.Encode()
  5308  	req, err := http.NewRequest("GET", urls, body)
  5309  	if err != nil {
  5310  		return nil, err
  5311  	}
  5312  	req.Header = reqHeaders
  5313  	googleapi.Expand(req.URL, map[string]string{
  5314  		"name": c.name,
  5315  	})
  5316  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5317  }
  5318  
  5319  // Do executes the "policysimulator.projects.locations.replays.operations.get" call.
  5320  // Any non-2xx status code is an error. Response headers are in either
  5321  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5322  // returned at all) in error.(*googleapi.Error).Header. Use
  5323  // googleapi.IsNotModified to check whether the returned error was because
  5324  // http.StatusNotModified was returned.
  5325  func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5326  	gensupport.SetOptions(c.urlParams_, opts...)
  5327  	res, err := c.doRequest("json")
  5328  	if res != nil && res.StatusCode == http.StatusNotModified {
  5329  		if res.Body != nil {
  5330  			res.Body.Close()
  5331  		}
  5332  		return nil, gensupport.WrapError(&googleapi.Error{
  5333  			Code:   res.StatusCode,
  5334  			Header: res.Header,
  5335  		})
  5336  	}
  5337  	if err != nil {
  5338  		return nil, err
  5339  	}
  5340  	defer googleapi.CloseBody(res)
  5341  	if err := googleapi.CheckResponse(res); err != nil {
  5342  		return nil, gensupport.WrapError(err)
  5343  	}
  5344  	ret := &GoogleLongrunningOperation{
  5345  		ServerResponse: googleapi.ServerResponse{
  5346  			Header:         res.Header,
  5347  			HTTPStatusCode: res.StatusCode,
  5348  		},
  5349  	}
  5350  	target := &ret
  5351  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5352  		return nil, err
  5353  	}
  5354  	return ret, nil
  5355  }
  5356  
  5357  type ProjectsLocationsReplaysOperationsListCall struct {
  5358  	s            *Service
  5359  	name         string
  5360  	urlParams_   gensupport.URLParams
  5361  	ifNoneMatch_ string
  5362  	ctx_         context.Context
  5363  	header_      http.Header
  5364  }
  5365  
  5366  // List: Lists operations that match the specified filter in the request. If
  5367  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5368  //
  5369  // - name: The name of the operation's parent resource.
  5370  func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall {
  5371  	c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5372  	c.name = name
  5373  	return c
  5374  }
  5375  
  5376  // Filter sets the optional parameter "filter": The standard list filter.
  5377  func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall {
  5378  	c.urlParams_.Set("filter", filter)
  5379  	return c
  5380  }
  5381  
  5382  // PageSize sets the optional parameter "pageSize": The standard list page
  5383  // size.
  5384  func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall {
  5385  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5386  	return c
  5387  }
  5388  
  5389  // PageToken sets the optional parameter "pageToken": The standard list page
  5390  // token.
  5391  func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall {
  5392  	c.urlParams_.Set("pageToken", pageToken)
  5393  	return c
  5394  }
  5395  
  5396  // Fields allows partial responses to be retrieved. See
  5397  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5398  // details.
  5399  func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall {
  5400  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5401  	return c
  5402  }
  5403  
  5404  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5405  // object's ETag matches the given value. This is useful for getting updates
  5406  // only after the object has changed since the last request.
  5407  func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall {
  5408  	c.ifNoneMatch_ = entityTag
  5409  	return c
  5410  }
  5411  
  5412  // Context sets the context to be used in this call's Do method.
  5413  func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall {
  5414  	c.ctx_ = ctx
  5415  	return c
  5416  }
  5417  
  5418  // Header returns a http.Header that can be modified by the caller to add
  5419  // headers to the request.
  5420  func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header {
  5421  	if c.header_ == nil {
  5422  		c.header_ = make(http.Header)
  5423  	}
  5424  	return c.header_
  5425  }
  5426  
  5427  func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5428  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5429  	if c.ifNoneMatch_ != "" {
  5430  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5431  	}
  5432  	var body io.Reader = nil
  5433  	c.urlParams_.Set("alt", alt)
  5434  	c.urlParams_.Set("prettyPrint", "false")
  5435  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5436  	urls += "?" + c.urlParams_.Encode()
  5437  	req, err := http.NewRequest("GET", urls, body)
  5438  	if err != nil {
  5439  		return nil, err
  5440  	}
  5441  	req.Header = reqHeaders
  5442  	googleapi.Expand(req.URL, map[string]string{
  5443  		"name": c.name,
  5444  	})
  5445  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5446  }
  5447  
  5448  // Do executes the "policysimulator.projects.locations.replays.operations.list" call.
  5449  // Any non-2xx status code is an error. Response headers are in either
  5450  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  5451  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5452  // googleapi.IsNotModified to check whether the returned error was because
  5453  // http.StatusNotModified was returned.
  5454  func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  5455  	gensupport.SetOptions(c.urlParams_, opts...)
  5456  	res, err := c.doRequest("json")
  5457  	if res != nil && res.StatusCode == http.StatusNotModified {
  5458  		if res.Body != nil {
  5459  			res.Body.Close()
  5460  		}
  5461  		return nil, gensupport.WrapError(&googleapi.Error{
  5462  			Code:   res.StatusCode,
  5463  			Header: res.Header,
  5464  		})
  5465  	}
  5466  	if err != nil {
  5467  		return nil, err
  5468  	}
  5469  	defer googleapi.CloseBody(res)
  5470  	if err := googleapi.CheckResponse(res); err != nil {
  5471  		return nil, gensupport.WrapError(err)
  5472  	}
  5473  	ret := &GoogleLongrunningListOperationsResponse{
  5474  		ServerResponse: googleapi.ServerResponse{
  5475  			Header:         res.Header,
  5476  			HTTPStatusCode: res.StatusCode,
  5477  		},
  5478  	}
  5479  	target := &ret
  5480  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5481  		return nil, err
  5482  	}
  5483  	return ret, nil
  5484  }
  5485  
  5486  // Pages invokes f for each page of results.
  5487  // A non-nil error returned from f will halt the iteration.
  5488  // The provided context supersedes any context provided to the Context method.
  5489  func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  5490  	c.ctx_ = ctx
  5491  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5492  	for {
  5493  		x, err := c.Do()
  5494  		if err != nil {
  5495  			return err
  5496  		}
  5497  		if err := f(x); err != nil {
  5498  			return err
  5499  		}
  5500  		if x.NextPageToken == "" {
  5501  			return nil
  5502  		}
  5503  		c.PageToken(x.NextPageToken)
  5504  	}
  5505  }
  5506  
  5507  type ProjectsLocationsReplaysResultsListCall struct {
  5508  	s            *Service
  5509  	parent       string
  5510  	urlParams_   gensupport.URLParams
  5511  	ifNoneMatch_ string
  5512  	ctx_         context.Context
  5513  	header_      http.Header
  5514  }
  5515  
  5516  // List: Lists the results of running a Replay.
  5517  //
  5518  //   - parent: The Replay whose results are listed, in the following format:
  5519  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  5520  //     eplay-id}` Example:
  5521  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  5522  //     1833c36`.
  5523  func (r *ProjectsLocationsReplaysResultsService) List(parent string) *ProjectsLocationsReplaysResultsListCall {
  5524  	c := &ProjectsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5525  	c.parent = parent
  5526  	return c
  5527  }
  5528  
  5529  // PageSize sets the optional parameter "pageSize": The maximum number of
  5530  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  5531  // values above 5000 are rounded down to 5000.
  5532  func (c *ProjectsLocationsReplaysResultsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysResultsListCall {
  5533  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5534  	return c
  5535  }
  5536  
  5537  // PageToken sets the optional parameter "pageToken": A page token, received
  5538  // from a previous Simulator.ListReplayResults call. Provide this token to
  5539  // retrieve the next page of results. When paginating, all other parameters
  5540  // provided to [Simulator.ListReplayResults[] must match the call that provided
  5541  // the page token.
  5542  func (c *ProjectsLocationsReplaysResultsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysResultsListCall {
  5543  	c.urlParams_.Set("pageToken", pageToken)
  5544  	return c
  5545  }
  5546  
  5547  // Fields allows partial responses to be retrieved. See
  5548  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5549  // details.
  5550  func (c *ProjectsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysResultsListCall {
  5551  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5552  	return c
  5553  }
  5554  
  5555  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5556  // object's ETag matches the given value. This is useful for getting updates
  5557  // only after the object has changed since the last request.
  5558  func (c *ProjectsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysResultsListCall {
  5559  	c.ifNoneMatch_ = entityTag
  5560  	return c
  5561  }
  5562  
  5563  // Context sets the context to be used in this call's Do method.
  5564  func (c *ProjectsLocationsReplaysResultsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysResultsListCall {
  5565  	c.ctx_ = ctx
  5566  	return c
  5567  }
  5568  
  5569  // Header returns a http.Header that can be modified by the caller to add
  5570  // headers to the request.
  5571  func (c *ProjectsLocationsReplaysResultsListCall) Header() http.Header {
  5572  	if c.header_ == nil {
  5573  		c.header_ = make(http.Header)
  5574  	}
  5575  	return c.header_
  5576  }
  5577  
  5578  func (c *ProjectsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  5579  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5580  	if c.ifNoneMatch_ != "" {
  5581  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5582  	}
  5583  	var body io.Reader = nil
  5584  	c.urlParams_.Set("alt", alt)
  5585  	c.urlParams_.Set("prettyPrint", "false")
  5586  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results")
  5587  	urls += "?" + c.urlParams_.Encode()
  5588  	req, err := http.NewRequest("GET", urls, body)
  5589  	if err != nil {
  5590  		return nil, err
  5591  	}
  5592  	req.Header = reqHeaders
  5593  	googleapi.Expand(req.URL, map[string]string{
  5594  		"parent": c.parent,
  5595  	})
  5596  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5597  }
  5598  
  5599  // Do executes the "policysimulator.projects.locations.replays.results.list" call.
  5600  // Any non-2xx status code is an error. Response headers are in either
  5601  // *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse.Header
  5602  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  5603  // Use googleapi.IsNotModified to check whether the returned error was because
  5604  // http.StatusNotModified was returned.
  5605  func (c *ProjectsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) {
  5606  	gensupport.SetOptions(c.urlParams_, opts...)
  5607  	res, err := c.doRequest("json")
  5608  	if res != nil && res.StatusCode == http.StatusNotModified {
  5609  		if res.Body != nil {
  5610  			res.Body.Close()
  5611  		}
  5612  		return nil, gensupport.WrapError(&googleapi.Error{
  5613  			Code:   res.StatusCode,
  5614  			Header: res.Header,
  5615  		})
  5616  	}
  5617  	if err != nil {
  5618  		return nil, err
  5619  	}
  5620  	defer googleapi.CloseBody(res)
  5621  	if err := googleapi.CheckResponse(res); err != nil {
  5622  		return nil, gensupport.WrapError(err)
  5623  	}
  5624  	ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{
  5625  		ServerResponse: googleapi.ServerResponse{
  5626  			Header:         res.Header,
  5627  			HTTPStatusCode: res.StatusCode,
  5628  		},
  5629  	}
  5630  	target := &ret
  5631  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5632  		return nil, err
  5633  	}
  5634  	return ret, nil
  5635  }
  5636  
  5637  // Pages invokes f for each page of results.
  5638  // A non-nil error returned from f will halt the iteration.
  5639  // The provided context supersedes any context provided to the Context method.
  5640  func (c *ProjectsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error {
  5641  	c.ctx_ = ctx
  5642  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5643  	for {
  5644  		x, err := c.Do()
  5645  		if err != nil {
  5646  			return err
  5647  		}
  5648  		if err := f(x); err != nil {
  5649  			return err
  5650  		}
  5651  		if x.NextPageToken == "" {
  5652  			return nil
  5653  		}
  5654  		c.PageToken(x.NextPageToken)
  5655  	}
  5656  }
  5657  

View as plain text