...

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

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

     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/v1beta"
    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/v1beta"
    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:v1beta"
    90  const apiName = "policysimulator"
    91  const apiVersion = "v1beta"
    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  // GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, or
   705  // simulation.
   706  type GoogleCloudPolicysimulatorV1Replay struct {
   707  	// Config: Required. The configuration used for the `Replay`.
   708  	Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"`
   709  	// Name: Output only. The resource name of the `Replay`, which has the
   710  	// following format:
   711  	// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{rep
   712  	// lay-id}`, where `{resource-id}` is the ID of the project, folder, or
   713  	// organization that owns the Replay. Example:
   714  	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03
   715  	// -479ce1833c36`
   716  	Name string `json:"name,omitempty"`
   717  	// ResultsSummary: Output only. Summary statistics about the replayed log
   718  	// entries.
   719  	ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"`
   720  	// State: Output only. The current state of the `Replay`.
   721  	//
   722  	// Possible values:
   723  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
   724  	//   "PENDING" - The `Replay` has not started yet.
   725  	//   "RUNNING" - The `Replay` is currently running.
   726  	//   "SUCCEEDED" - The `Replay` has successfully completed.
   727  	//   "FAILED" - The `Replay` has finished with an error.
   728  	State string `json:"state,omitempty"`
   729  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
   730  	// include in API requests. By default, fields with empty or default values are
   731  	// omitted from API requests. See
   732  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   733  	// details.
   734  	ForceSendFields []string `json:"-"`
   735  	// NullFields is a list of field names (e.g. "Config") to include in API
   736  	// requests with the JSON null value. By default, fields with empty values are
   737  	// omitted from API requests. See
   738  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   739  	NullFields []string `json:"-"`
   740  }
   741  
   742  func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) {
   743  	type NoMethod GoogleCloudPolicysimulatorV1Replay
   744  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   745  }
   746  
   747  // GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for a
   748  // Replay.
   749  type GoogleCloudPolicysimulatorV1ReplayConfig struct {
   750  	// LogSource: The logs to use as input for the Replay.
   751  	//
   752  	// Possible values:
   753  	//   "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log source is
   754  	// unspecified, the Replay defaults to using `RECENT_ACCESSES`.
   755  	//   "RECENT_ACCESSES" - All access logs from the last 90 days. These logs may
   756  	// not include logs from the most recent 7 days.
   757  	LogSource string `json:"logSource,omitempty"`
   758  	// PolicyOverlay: A mapping of the resources that you want to simulate policies
   759  	// for and the policies that you want to simulate. Keys are the full resource
   760  	// names for the resources. For example,
   761  	// `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of
   762  	// full resource names for Google Cloud services, see
   763  	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
   764  	// are Policy objects representing the policies that you want to simulate.
   765  	// Replays automatically take into account any IAM policies inherited through
   766  	// the resource hierarchy, and any policies set on descendant resources. You do
   767  	// not need to include these policies in the policy overlay.
   768  	PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"`
   769  	// ForceSendFields is a list of field names (e.g. "LogSource") to
   770  	// unconditionally include in API requests. By default, fields with empty or
   771  	// default values are omitted from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   773  	// details.
   774  	ForceSendFields []string `json:"-"`
   775  	// NullFields is a list of field names (e.g. "LogSource") to include in API
   776  	// requests with the JSON null value. By default, fields with empty values are
   777  	// omitted from API requests. See
   778  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   779  	NullFields []string `json:"-"`
   780  }
   781  
   782  func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) {
   783  	type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig
   784  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   785  }
   786  
   787  // GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a Replay
   788  // operation.
   789  type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct {
   790  	// StartTime: Time when the request was received.
   791  	StartTime string `json:"startTime,omitempty"`
   792  	// ForceSendFields is a list of field names (e.g. "StartTime") to
   793  	// unconditionally include in API requests. By default, fields with empty or
   794  	// default values are omitted from API requests. See
   795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   796  	// details.
   797  	ForceSendFields []string `json:"-"`
   798  	// NullFields is a list of field names (e.g. "StartTime") to include in API
   799  	// requests with the JSON null value. By default, fields with empty values are
   800  	// omitted from API requests. See
   801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   802  	NullFields []string `json:"-"`
   803  }
   804  
   805  func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) {
   806  	type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata
   807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   808  }
   809  
   810  // GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics about
   811  // the replayed log entries.
   812  type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct {
   813  	// DifferenceCount: The number of replayed log entries with a difference
   814  	// between baseline and simulated policies.
   815  	DifferenceCount int64 `json:"differenceCount,omitempty"`
   816  	// ErrorCount: The number of log entries that could not be replayed.
   817  	ErrorCount int64 `json:"errorCount,omitempty"`
   818  	// LogCount: The total number of log entries replayed.
   819  	LogCount int64 `json:"logCount,omitempty"`
   820  	// NewestDate: The date of the newest log entry replayed.
   821  	NewestDate *GoogleTypeDate `json:"newestDate,omitempty"`
   822  	// OldestDate: The date of the oldest log entry replayed.
   823  	OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"`
   824  	// UnchangedCount: The number of replayed log entries with no difference
   825  	// between baseline and simulated policies.
   826  	UnchangedCount int64 `json:"unchangedCount,omitempty"`
   827  	// ForceSendFields is a list of field names (e.g. "DifferenceCount") to
   828  	// unconditionally include in API requests. By default, fields with empty or
   829  	// default values are omitted from API requests. See
   830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   831  	// details.
   832  	ForceSendFields []string `json:"-"`
   833  	// NullFields is a list of field names (e.g. "DifferenceCount") to include in
   834  	// API requests with the JSON null value. By default, fields with empty values
   835  	// are omitted from API requests. See
   836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   837  	NullFields []string `json:"-"`
   838  }
   839  
   840  func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) {
   841  	type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary
   842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   843  }
   844  
   845  // GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMet
   846  // adata: CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about
   847  // an OrgPolicyViolationsPreview generations operation.
   848  type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct {
   849  	// RequestTime: Time when the request was received.
   850  	RequestTime string `json:"requestTime,omitempty"`
   851  	// ResourcesFound: Total number of resources that need scanning. Should equal
   852  	// resource_scanned + resources_pending
   853  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
   854  	// ResourcesPending: Number of resources still to scan.
   855  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
   856  	// ResourcesScanned: Number of resources already scanned.
   857  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
   858  	// StartTime: Time when the request started processing, i.e., when the state
   859  	// was set to RUNNING.
   860  	StartTime string `json:"startTime,omitempty"`
   861  	// State: Output only. The current state of the operation.
   862  	//
   863  	// Possible values:
   864  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
   865  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
   866  	// yet.
   867  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
   868  	// created.
   869  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
   870  	// successfully.
   871  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
   872  	// error.
   873  	State string `json:"state,omitempty"`
   874  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
   875  	// unconditionally include in API requests. By default, fields with empty or
   876  	// default values are omitted from API requests. See
   877  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   878  	// details.
   879  	ForceSendFields []string `json:"-"`
   880  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
   881  	// requests with the JSON null value. By default, fields with empty values are
   882  	// omitted from API requests. See
   883  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   884  	NullFields []string `json:"-"`
   885  }
   886  
   887  func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
   888  	type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
   889  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   890  }
   891  
   892  // GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationM
   893  // etadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata
   894  // about an OrgPolicyViolationsPreview generations operation.
   895  type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct {
   896  	// RequestTime: Time when the request was received.
   897  	RequestTime string `json:"requestTime,omitempty"`
   898  	// ResourcesFound: Total number of resources that need scanning. Should equal
   899  	// resource_scanned + resources_pending
   900  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
   901  	// ResourcesPending: Number of resources still to scan.
   902  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
   903  	// ResourcesScanned: Number of resources already scanned.
   904  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
   905  	// StartTime: Time when the request started processing, i.e. when the state was
   906  	// set to RUNNING.
   907  	StartTime string `json:"startTime,omitempty"`
   908  	// State: The current state of the operation.
   909  	//
   910  	// Possible values:
   911  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
   912  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
   913  	// yet.
   914  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
   915  	// created.
   916  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
   917  	// successfully.
   918  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
   919  	// error.
   920  	State string `json:"state,omitempty"`
   921  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
   922  	// unconditionally include in API requests. By default, fields with empty or
   923  	// default values are omitted from API requests. See
   924  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   925  	// details.
   926  	ForceSendFields []string `json:"-"`
   927  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
   928  	// requests with the JSON null value. By default, fields with empty values are
   929  	// omitted from API requests. See
   930  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   931  	NullFields []string `json:"-"`
   932  }
   933  
   934  func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
   935  	type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
   936  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   937  }
   938  
   939  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed changes to
   940  // OrgPolicy.
   941  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct {
   942  	// CustomConstraints: Optional. The OrgPolicy CustomConstraint changes to
   943  	// preview violations for. Any existing CustomConstraints with the same name
   944  	// will be overridden in the simulation. That is, violations will be determined
   945  	// as if all custom constraints in the overlay were instantiated. Only a single
   946  	// custom_constraint is supported in the overlay at a time. For evaluating
   947  	// multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests
   948  	// are made, where each request evaluates a single constraint.
   949  	CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"`
   950  	// Policies: Optional. The OrgPolicy changes to preview violations for. Any
   951  	// existing OrgPolicies with the same name will be overridden in the
   952  	// simulation. That is, violations will be determined as if all policies in the
   953  	// overlay were created or updated.
   954  	Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"`
   955  	// ForceSendFields is a list of field names (e.g. "CustomConstraints") to
   956  	// unconditionally include in API requests. By default, fields with empty or
   957  	// default values are omitted from API requests. See
   958  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   959  	// details.
   960  	ForceSendFields []string `json:"-"`
   961  	// NullFields is a list of field names (e.g. "CustomConstraints") to include in
   962  	// API requests with the JSON null value. By default, fields with empty values
   963  	// are omitted from API requests. See
   964  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   965  	NullFields []string `json:"-"`
   966  }
   967  
   968  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) {
   969  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
   970  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   971  }
   972  
   973  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay: A
   974  // change to an OrgPolicy custom constraint.
   975  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct {
   976  	// CustomConstraint: Optional. The new or updated custom constraint.
   977  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
   978  	// CustomConstraintParent: Optional. Resource the constraint is attached to.
   979  	// Example: "organization/987654"
   980  	CustomConstraintParent string `json:"customConstraintParent,omitempty"`
   981  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
   982  	// unconditionally include in API requests. By default, fields with empty or
   983  	// default values are omitted from API requests. See
   984  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   985  	// details.
   986  	ForceSendFields []string `json:"-"`
   987  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
   988  	// API requests with the JSON null value. By default, fields with empty values
   989  	// are omitted from API requests. See
   990  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   991  	NullFields []string `json:"-"`
   992  }
   993  
   994  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) {
   995  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay
   996  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   997  }
   998  
   999  // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A change to
  1000  // an OrgPolicy.
  1001  type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct {
  1002  	// Policy: Optional. The new or updated OrgPolicy.
  1003  	Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"`
  1004  	// PolicyParent: Optional. The parent of the policy we are attaching to.
  1005  	// Example: "projects/123456"
  1006  	PolicyParent string `json:"policyParent,omitempty"`
  1007  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1008  	// include in API requests. By default, fields with empty or default values are
  1009  	// omitted from API requests. See
  1010  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1011  	// details.
  1012  	ForceSendFields []string `json:"-"`
  1013  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1014  	// requests with the JSON null value. By default, fields with empty values are
  1015  	// omitted from API requests. See
  1016  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1017  	NullFields []string `json:"-"`
  1018  }
  1019  
  1020  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) {
  1021  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay
  1022  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1023  }
  1024  
  1025  // GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview:
  1026  // OrgPolicyViolationsPreview is a resource providing a preview of the
  1027  // violations that will exist if an OrgPolicy change is made. The list of
  1028  // violations are modeled as child resources and retrieved via a
  1029  // ListOrgPolicyViolations API call. There are potentially more
  1030  // OrgPolicyViolations than could fit in an embedded field. Thus, the use of a
  1031  // child resource instead of a field.
  1032  type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct {
  1033  	// CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` was
  1034  	// created.
  1035  	CreateTime string `json:"createTime,omitempty"`
  1036  	// CustomConstraints: Output only. The names of the constraints against which
  1037  	// all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only
  1038  	// contains `PolicyOverlay` then it contains the name of the configured custom
  1039  	// constraint, applicable to the specified policies. Otherwise it contains the
  1040  	// name of the constraint specified in `CustomConstraintOverlay`. Format:
  1041  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
  1042  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
  1043  	CustomConstraints []string `json:"customConstraints,omitempty"`
  1044  	// Name: Output only. The resource name of the `OrgPolicyViolationsPreview`. It
  1045  	// has the following format:
  1046  	// `organizations/{organization}/locations/{location}/orgPolicyViolationsPreview
  1047  	// s/{orgPolicyViolationsPreview}` Example:
  1048  	// `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/50
  1049  	// 6a5f7f`
  1050  	Name string `json:"name,omitempty"`
  1051  	// Overlay: Required. The proposed changes we are previewing violations for.
  1052  	Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"`
  1053  	// ResourceCounts: Output only. A summary of the state of all resources scanned
  1054  	// for compliance with the changed OrgPolicy.
  1055  	ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"`
  1056  	// State: Output only. The state of the `OrgPolicyViolationsPreview`.
  1057  	//
  1058  	// Possible values:
  1059  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1060  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1061  	// yet.
  1062  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1063  	// created.
  1064  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1065  	// successfully.
  1066  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1067  	// error.
  1068  	State string `json:"state,omitempty"`
  1069  	// ViolationsCount: Output only. The number of OrgPolicyViolations in this
  1070  	// `OrgPolicyViolationsPreview`. This count may differ from
  1071  	// `resource_summary.noncompliant_count` because each OrgPolicyViolation is
  1072  	// specific to a resource **and** constraint. If there are multiple constraints
  1073  	// being evaluated (i.e. multiple policies in the overlay), a single resource
  1074  	// may violate multiple constraints.
  1075  	ViolationsCount int64 `json:"violationsCount,omitempty"`
  1076  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1077  	// unconditionally include in API requests. By default, fields with empty or
  1078  	// default values are omitted from API requests. See
  1079  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1080  	// details.
  1081  	ForceSendFields []string `json:"-"`
  1082  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1083  	// requests with the JSON null value. By default, fields with empty values are
  1084  	// omitted from API requests. See
  1085  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1086  	NullFields []string `json:"-"`
  1087  }
  1088  
  1089  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) {
  1090  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
  1091  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1092  }
  1093  
  1094  // GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts: A
  1095  // summary of the state of all resources scanned for compliance with the
  1096  // changed OrgPolicy.
  1097  type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct {
  1098  	// Compliant: Output only. Number of scanned resources with zero violations.
  1099  	Compliant int64 `json:"compliant,omitempty"`
  1100  	// Errors: Output only. Number of resources that returned an error when
  1101  	// scanned.
  1102  	Errors int64 `json:"errors,omitempty"`
  1103  	// Noncompliant: Output only. Number of scanned resources with at least one
  1104  	// violation.
  1105  	Noncompliant int64 `json:"noncompliant,omitempty"`
  1106  	// Scanned: Output only. Number of resources checked for compliance. Must
  1107  	// equal: unenforced + noncompliant + compliant + error
  1108  	Scanned int64 `json:"scanned,omitempty"`
  1109  	// Unenforced: Output only. Number of resources where the constraint was not
  1110  	// enforced, i.e. the Policy set `enforced: false` for that resource.
  1111  	Unenforced int64 `json:"unenforced,omitempty"`
  1112  	// ForceSendFields is a list of field names (e.g. "Compliant") to
  1113  	// unconditionally include in API requests. By default, fields with empty or
  1114  	// default values are omitted from API requests. See
  1115  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1116  	// details.
  1117  	ForceSendFields []string `json:"-"`
  1118  	// NullFields is a list of field names (e.g. "Compliant") to include in API
  1119  	// requests with the JSON null value. By default, fields with empty values are
  1120  	// omitted from API requests. See
  1121  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1122  	NullFields []string `json:"-"`
  1123  }
  1124  
  1125  func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) {
  1126  	type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
  1127  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1128  }
  1129  
  1130  // GoogleCloudPolicysimulatorV1betaAccessStateDiff: A summary and comparison of
  1131  // the principal's access under the current (baseline) policies and the
  1132  // proposed (simulated) policies for a single access tuple.
  1133  type GoogleCloudPolicysimulatorV1betaAccessStateDiff struct {
  1134  	// AccessChange: How the principal's access, specified in the AccessState
  1135  	// field, changed between the current (baseline) policies and proposed
  1136  	// (simulated) policies.
  1137  	//
  1138  	// Possible values:
  1139  	//   "ACCESS_CHANGE_TYPE_UNSPECIFIED" - Default value. This value is unused.
  1140  	//   "NO_CHANGE" - The principal's access did not change. This includes the
  1141  	// case where both baseline and simulated are UNKNOWN, but the unknown
  1142  	// information is equivalent.
  1143  	//   "UNKNOWN_CHANGE" - The principal's access under both the current policies
  1144  	// and the proposed policies is `UNKNOWN`, but the unknown information differs
  1145  	// between them.
  1146  	//   "ACCESS_REVOKED" - The principal had access under the current policies
  1147  	// (`GRANTED`), but will no longer have access after the proposed changes
  1148  	// (`NOT_GRANTED`).
  1149  	//   "ACCESS_GAINED" - The principal did not have access under the current
  1150  	// policies (`NOT_GRANTED`), but will have access after the proposed changes
  1151  	// (`GRANTED`).
  1152  	//   "ACCESS_MAYBE_REVOKED" - This result can occur for the following reasons:
  1153  	// * The principal had access under the current policies (`GRANTED`), but their
  1154  	// access after the proposed changes is `UNKNOWN`. * The principal's access
  1155  	// under the current policies is `UNKNOWN`, but they will not have access after
  1156  	// the proposed changes (`NOT_GRANTED`).
  1157  	//   "ACCESS_MAYBE_GAINED" - This result can occur for the following reasons: *
  1158  	// The principal did not have access under the current policies
  1159  	// (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. *
  1160  	// The principal's access under the current policies is `UNKNOWN`, but they
  1161  	// will have access after the proposed changes (`GRANTED`).
  1162  	AccessChange string `json:"accessChange,omitempty"`
  1163  	// Baseline: The results of evaluating the access tuple under the current
  1164  	// (baseline) policies. If the AccessState couldn't be fully evaluated, this
  1165  	// field explains why.
  1166  	Baseline *GoogleCloudPolicysimulatorV1betaExplainedAccess `json:"baseline,omitempty"`
  1167  	// Simulated: The results of evaluating the access tuple under the proposed
  1168  	// (simulated) policies. If the AccessState couldn't be fully evaluated, this
  1169  	// field explains why.
  1170  	Simulated *GoogleCloudPolicysimulatorV1betaExplainedAccess `json:"simulated,omitempty"`
  1171  	// ForceSendFields is a list of field names (e.g. "AccessChange") to
  1172  	// unconditionally include in API requests. By default, fields with empty or
  1173  	// default values are omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1175  	// details.
  1176  	ForceSendFields []string `json:"-"`
  1177  	// NullFields is a list of field names (e.g. "AccessChange") to include in API
  1178  	// requests with the JSON null value. By default, fields with empty values are
  1179  	// omitted from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1181  	NullFields []string `json:"-"`
  1182  }
  1183  
  1184  func (s *GoogleCloudPolicysimulatorV1betaAccessStateDiff) MarshalJSON() ([]byte, error) {
  1185  	type NoMethod GoogleCloudPolicysimulatorV1betaAccessStateDiff
  1186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1187  }
  1188  
  1189  // GoogleCloudPolicysimulatorV1betaAccessTuple: Information about the
  1190  // principal, resource, and permission to check.
  1191  type GoogleCloudPolicysimulatorV1betaAccessTuple struct {
  1192  	// FullResourceName: Required. The full resource name that identifies the
  1193  	// resource. For example,
  1194  	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/m
  1195  	// y-instance`. For examples of full resource names for Google Cloud services,
  1196  	// see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
  1197  	FullResourceName string `json:"fullResourceName,omitempty"`
  1198  	// Permission: Required. The IAM permission to check for the specified
  1199  	// principal and resource. For a complete list of IAM permissions, see
  1200  	// https://cloud.google.com/iam/help/permissions/reference. For a complete list
  1201  	// of predefined IAM roles and the permissions in each role, see
  1202  	// https://cloud.google.com/iam/help/roles/reference.
  1203  	Permission string `json:"permission,omitempty"`
  1204  	// Principal: Required. The principal whose access you want to check, in the
  1205  	// form of the email address that represents that principal. For example,
  1206  	// `alice@example.com` or
  1207  	// `my-service-account@my-project.iam.gserviceaccount.com`. The principal must
  1208  	// be a Google Account or a service account. Other types of principals are not
  1209  	// supported.
  1210  	Principal string `json:"principal,omitempty"`
  1211  	// ForceSendFields is a list of field names (e.g. "FullResourceName") to
  1212  	// unconditionally include in API requests. By default, fields with empty or
  1213  	// default values are omitted from API requests. See
  1214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1215  	// details.
  1216  	ForceSendFields []string `json:"-"`
  1217  	// NullFields is a list of field names (e.g. "FullResourceName") to include in
  1218  	// API requests with the JSON null value. By default, fields with empty values
  1219  	// are omitted from API requests. See
  1220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1221  	NullFields []string `json:"-"`
  1222  }
  1223  
  1224  func (s *GoogleCloudPolicysimulatorV1betaAccessTuple) MarshalJSON() ([]byte, error) {
  1225  	type NoMethod GoogleCloudPolicysimulatorV1betaAccessTuple
  1226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1227  }
  1228  
  1229  // GoogleCloudPolicysimulatorV1betaBindingExplanation: Details about how a
  1230  // binding in a policy affects a principal's ability to use a permission.
  1231  type GoogleCloudPolicysimulatorV1betaBindingExplanation struct {
  1232  	// Access: Required. Indicates whether _this binding_ provides the specified
  1233  	// permission to the specified principal for the specified resource. This field
  1234  	// does _not_ indicate whether the principal actually has the permission for
  1235  	// the resource. There might be another binding that overrides this binding. To
  1236  	// determine whether the principal actually has the permission, use the
  1237  	// `access` field in the TroubleshootIamPolicyResponse.
  1238  	//
  1239  	// Possible values:
  1240  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
  1241  	//   "GRANTED" - The principal has the permission.
  1242  	//   "NOT_GRANTED" - The principal does not have the permission.
  1243  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
  1244  	// condition expression evaluates to `true`.
  1245  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
  1246  	// access to all of the policies that Policy Simulator needs to evaluate.
  1247  	Access string `json:"access,omitempty"`
  1248  	// Condition: A condition expression that prevents this binding from granting
  1249  	// access unless the expression evaluates to `true`. To learn about IAM
  1250  	// Conditions, see https://cloud.google.com/iam/docs/conditions-overview.
  1251  	Condition *GoogleTypeExpr `json:"condition,omitempty"`
  1252  	// Memberships: Indicates whether each principal in the binding includes the
  1253  	// principal specified in the request, either directly or indirectly. Each key
  1254  	// identifies a principal in the binding, and each value indicates whether the
  1255  	// principal in the binding includes the principal in the request. For example,
  1256  	// suppose that a binding includes the following principals: *
  1257  	// `user:alice@example.com` * `group:product-eng@example.com` The principal in
  1258  	// the replayed access tuple is `user:bob@example.com`. This user is a
  1259  	// principal of the group `group:product-eng@example.com`. For the first
  1260  	// principal in the binding, the key is `user:alice@example.com`, and the
  1261  	// `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the
  1262  	// second principal in the binding, the key is `group:product-eng@example.com`,
  1263  	// and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.
  1264  	Memberships map[string]GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership `json:"memberships,omitempty"`
  1265  	// Relevance: The relevance of this binding to the overall determination for
  1266  	// the entire policy.
  1267  	//
  1268  	// Possible values:
  1269  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
  1270  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
  1271  	// data point is unlikely to affect the overall determination.
  1272  	//   "HIGH" - The data point has a strong effect on the result. Changing the
  1273  	// data point is likely to affect the overall determination.
  1274  	Relevance string `json:"relevance,omitempty"`
  1275  	// Role: The role that this binding grants. For example,
  1276  	// `roles/compute.serviceAgent`. For a complete list of predefined IAM roles,
  1277  	// as well as the permissions in each role, see
  1278  	// https://cloud.google.com/iam/help/roles/reference.
  1279  	Role string `json:"role,omitempty"`
  1280  	// RolePermission: Indicates whether the role granted by this binding contains
  1281  	// the specified permission.
  1282  	//
  1283  	// Possible values:
  1284  	//   "ROLE_PERMISSION_UNSPECIFIED" - Default value. This value is unused.
  1285  	//   "ROLE_PERMISSION_INCLUDED" - The permission is included in the role.
  1286  	//   "ROLE_PERMISSION_NOT_INCLUDED" - The permission is not included in the
  1287  	// role.
  1288  	//   "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" - The user who created the Replay is
  1289  	// not allowed to access the binding.
  1290  	RolePermission string `json:"rolePermission,omitempty"`
  1291  	// RolePermissionRelevance: The relevance of the permission's existence, or
  1292  	// nonexistence, in the role to the overall determination for the entire
  1293  	// policy.
  1294  	//
  1295  	// Possible values:
  1296  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
  1297  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
  1298  	// data point is unlikely to affect the overall determination.
  1299  	//   "HIGH" - The data point has a strong effect on the result. Changing the
  1300  	// data point is likely to affect the overall determination.
  1301  	RolePermissionRelevance string `json:"rolePermissionRelevance,omitempty"`
  1302  	// ForceSendFields is a list of field names (e.g. "Access") to unconditionally
  1303  	// include in API requests. By default, fields with empty or default values are
  1304  	// omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1306  	// details.
  1307  	ForceSendFields []string `json:"-"`
  1308  	// NullFields is a list of field names (e.g. "Access") to include in API
  1309  	// requests with the JSON null value. By default, fields with empty values are
  1310  	// omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1312  	NullFields []string `json:"-"`
  1313  }
  1314  
  1315  func (s *GoogleCloudPolicysimulatorV1betaBindingExplanation) MarshalJSON() ([]byte, error) {
  1316  	type NoMethod GoogleCloudPolicysimulatorV1betaBindingExplanation
  1317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1318  }
  1319  
  1320  // GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership:
  1321  // Details about whether the binding includes the principal.
  1322  type GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership struct {
  1323  	// Membership: Indicates whether the binding includes the principal.
  1324  	//
  1325  	// Possible values:
  1326  	//   "MEMBERSHIP_UNSPECIFIED" - Default value. This value is unused.
  1327  	//   "MEMBERSHIP_INCLUDED" - The binding includes the principal. The principal
  1328  	// can be included directly or indirectly. For example: * A principal is
  1329  	// included directly if that principal is listed in the binding. * A principal
  1330  	// is included indirectly if that principal is in a Google group or Google
  1331  	// Workspace domain that is listed in the binding.
  1332  	//   "MEMBERSHIP_NOT_INCLUDED" - The binding does not include the principal.
  1333  	//   "MEMBERSHIP_UNKNOWN_INFO_DENIED" - The user who created the Replay is not
  1334  	// allowed to access the binding.
  1335  	//   "MEMBERSHIP_UNKNOWN_UNSUPPORTED" - The principal is an unsupported type.
  1336  	// Only Google Accounts and service accounts are supported.
  1337  	Membership string `json:"membership,omitempty"`
  1338  	// Relevance: The relevance of the principal's status to the overall
  1339  	// determination for the binding.
  1340  	//
  1341  	// Possible values:
  1342  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
  1343  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
  1344  	// data point is unlikely to affect the overall determination.
  1345  	//   "HIGH" - The data point has a strong effect on the result. Changing the
  1346  	// data point is likely to affect the overall determination.
  1347  	Relevance string `json:"relevance,omitempty"`
  1348  	// ForceSendFields is a list of field names (e.g. "Membership") to
  1349  	// unconditionally include in API requests. By default, fields with empty or
  1350  	// default values are omitted from API requests. See
  1351  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1352  	// details.
  1353  	ForceSendFields []string `json:"-"`
  1354  	// NullFields is a list of field names (e.g. "Membership") to include in API
  1355  	// requests with the JSON null value. By default, fields with empty values are
  1356  	// omitted from API requests. See
  1357  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1358  	NullFields []string `json:"-"`
  1359  }
  1360  
  1361  func (s *GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership) MarshalJSON() ([]byte, error) {
  1362  	type NoMethod GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership
  1363  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1364  }
  1365  
  1366  // GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMeta
  1367  // data: CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
  1368  // OrgPolicyViolationsPreview generations operation.
  1369  type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct {
  1370  	// RequestTime: Time when the request was received.
  1371  	RequestTime string `json:"requestTime,omitempty"`
  1372  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1373  	// resource_scanned + resources_pending
  1374  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1375  	// ResourcesPending: Number of resources still to scan.
  1376  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1377  	// ResourcesScanned: Number of resources already scanned.
  1378  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1379  	// StartTime: Time when the request started processing, i.e., when the state
  1380  	// was set to RUNNING.
  1381  	StartTime string `json:"startTime,omitempty"`
  1382  	// State: Output only. The current state of the operation.
  1383  	//
  1384  	// Possible values:
  1385  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1386  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1387  	// yet.
  1388  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1389  	// created.
  1390  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1391  	// successfully.
  1392  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1393  	// error.
  1394  	State string `json:"state,omitempty"`
  1395  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1396  	// unconditionally include in API requests. By default, fields with empty or
  1397  	// default values are omitted from API requests. See
  1398  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1399  	// details.
  1400  	ForceSendFields []string `json:"-"`
  1401  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1402  	// requests with the JSON null value. By default, fields with empty values are
  1403  	// omitted from API requests. See
  1404  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1405  	NullFields []string `json:"-"`
  1406  }
  1407  
  1408  func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1409  	type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
  1410  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1411  }
  1412  
  1413  // GoogleCloudPolicysimulatorV1betaExplainedAccess: Details about how a set of
  1414  // policies, listed in ExplainedPolicy, resulted in a certain AccessState when
  1415  // replaying an access tuple.
  1416  type GoogleCloudPolicysimulatorV1betaExplainedAccess struct {
  1417  	// AccessState: Whether the principal in the access tuple has permission to
  1418  	// access the resource in the access tuple under the given policies.
  1419  	//
  1420  	// Possible values:
  1421  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
  1422  	//   "GRANTED" - The principal has the permission.
  1423  	//   "NOT_GRANTED" - The principal does not have the permission.
  1424  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
  1425  	// condition expression evaluates to `true`.
  1426  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
  1427  	// access to all of the policies that Policy Simulator needs to evaluate.
  1428  	AccessState string `json:"accessState,omitempty"`
  1429  	// Errors: If the AccessState is `UNKNOWN`, this field contains a list of
  1430  	// errors explaining why the result is `UNKNOWN`. If the `AccessState` is
  1431  	// `GRANTED` or `NOT_GRANTED`, this field is omitted.
  1432  	Errors []*GoogleRpcStatus `json:"errors,omitempty"`
  1433  	// Policies: If the AccessState is `UNKNOWN`, this field contains the policies
  1434  	// that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`,
  1435  	// this field is omitted.
  1436  	Policies []*GoogleCloudPolicysimulatorV1betaExplainedPolicy `json:"policies,omitempty"`
  1437  	// ForceSendFields is a list of field names (e.g. "AccessState") to
  1438  	// unconditionally include in API requests. By default, fields with empty or
  1439  	// default values are omitted from API requests. See
  1440  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1441  	// details.
  1442  	ForceSendFields []string `json:"-"`
  1443  	// NullFields is a list of field names (e.g. "AccessState") to include in API
  1444  	// requests with the JSON null value. By default, fields with empty values are
  1445  	// omitted from API requests. See
  1446  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1447  	NullFields []string `json:"-"`
  1448  }
  1449  
  1450  func (s *GoogleCloudPolicysimulatorV1betaExplainedAccess) MarshalJSON() ([]byte, error) {
  1451  	type NoMethod GoogleCloudPolicysimulatorV1betaExplainedAccess
  1452  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1453  }
  1454  
  1455  // GoogleCloudPolicysimulatorV1betaExplainedPolicy: Details about how a
  1456  // specific IAM Policy contributed to the access check.
  1457  type GoogleCloudPolicysimulatorV1betaExplainedPolicy struct {
  1458  	// Access: Indicates whether _this policy_ provides the specified permission to
  1459  	// the specified principal for the specified resource. This field does _not_
  1460  	// indicate whether the principal actually has the permission for the resource.
  1461  	// There might be another policy that overrides this policy. To determine
  1462  	// whether the principal actually has the permission, use the `access` field in
  1463  	// the TroubleshootIamPolicyResponse.
  1464  	//
  1465  	// Possible values:
  1466  	//   "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused.
  1467  	//   "GRANTED" - The principal has the permission.
  1468  	//   "NOT_GRANTED" - The principal does not have the permission.
  1469  	//   "UNKNOWN_CONDITIONAL" - The principal has the permission only if a
  1470  	// condition expression evaluates to `true`.
  1471  	//   "UNKNOWN_INFO_DENIED" - The user who created the Replay does not have
  1472  	// access to all of the policies that Policy Simulator needs to evaluate.
  1473  	Access string `json:"access,omitempty"`
  1474  	// BindingExplanations: Details about how each binding in the policy affects
  1475  	// the principal's ability, or inability, to use the permission for the
  1476  	// resource. If the user who created the Replay does not have access to the
  1477  	// policy, this field is omitted.
  1478  	BindingExplanations []*GoogleCloudPolicysimulatorV1betaBindingExplanation `json:"bindingExplanations,omitempty"`
  1479  	// FullResourceName: The full resource name that identifies the resource. For
  1480  	// example,
  1481  	// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/m
  1482  	// y-instance`. If the user who created the Replay does not have access to the
  1483  	// policy, this field is omitted. For examples of full resource names for
  1484  	// Google Cloud services, see
  1485  	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
  1486  	FullResourceName string `json:"fullResourceName,omitempty"`
  1487  	// Policy: The IAM policy attached to the resource. If the user who created the
  1488  	// Replay does not have access to the policy, this field is empty.
  1489  	Policy *GoogleIamV1Policy `json:"policy,omitempty"`
  1490  	// Relevance: The relevance of this policy to the overall determination in the
  1491  	// TroubleshootIamPolicyResponse. If the user who created the Replay does not
  1492  	// have access to the policy, this field is omitted.
  1493  	//
  1494  	// Possible values:
  1495  	//   "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is unused.
  1496  	//   "NORMAL" - The data point has a limited effect on the result. Changing the
  1497  	// data point is unlikely to affect the overall determination.
  1498  	//   "HIGH" - The data point has a strong effect on the result. Changing the
  1499  	// data point is likely to affect the overall determination.
  1500  	Relevance string `json:"relevance,omitempty"`
  1501  	// ForceSendFields is a list of field names (e.g. "Access") to unconditionally
  1502  	// include in API requests. By default, fields with empty or default values are
  1503  	// omitted from API requests. See
  1504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1505  	// details.
  1506  	ForceSendFields []string `json:"-"`
  1507  	// NullFields is a list of field names (e.g. "Access") to include in API
  1508  	// requests with the JSON null value. By default, fields with empty values are
  1509  	// omitted from API requests. See
  1510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1511  	NullFields []string `json:"-"`
  1512  }
  1513  
  1514  func (s *GoogleCloudPolicysimulatorV1betaExplainedPolicy) MarshalJSON() ([]byte, error) {
  1515  	type NoMethod GoogleCloudPolicysimulatorV1betaExplainedPolicy
  1516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1517  }
  1518  
  1519  // GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMe
  1520  // tadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata
  1521  // about an OrgPolicyViolationsPreview generations operation.
  1522  type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct {
  1523  	// RequestTime: Time when the request was received.
  1524  	RequestTime string `json:"requestTime,omitempty"`
  1525  	// ResourcesFound: Total number of resources that need scanning. Should equal
  1526  	// resource_scanned + resources_pending
  1527  	ResourcesFound int64 `json:"resourcesFound,omitempty"`
  1528  	// ResourcesPending: Number of resources still to scan.
  1529  	ResourcesPending int64 `json:"resourcesPending,omitempty"`
  1530  	// ResourcesScanned: Number of resources already scanned.
  1531  	ResourcesScanned int64 `json:"resourcesScanned,omitempty"`
  1532  	// StartTime: Time when the request started processing, i.e. when the state was
  1533  	// set to RUNNING.
  1534  	StartTime string `json:"startTime,omitempty"`
  1535  	// State: The current state of the operation.
  1536  	//
  1537  	// Possible values:
  1538  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1539  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1540  	// yet.
  1541  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1542  	// created.
  1543  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1544  	// successfully.
  1545  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1546  	// error.
  1547  	State string `json:"state,omitempty"`
  1548  	// ForceSendFields is a list of field names (e.g. "RequestTime") to
  1549  	// unconditionally include in API requests. By default, fields with empty or
  1550  	// default values are omitted from API requests. See
  1551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1552  	// details.
  1553  	ForceSendFields []string `json:"-"`
  1554  	// NullFields is a list of field names (e.g. "RequestTime") to include in API
  1555  	// requests with the JSON null value. By default, fields with empty values are
  1556  	// omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1558  	NullFields []string `json:"-"`
  1559  }
  1560  
  1561  func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1562  	type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
  1563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1564  }
  1565  
  1566  // GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse:
  1567  // ListOrgPolicyViolationsPreviewsResponse is the response message for
  1568  // OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
  1569  type GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse struct {
  1570  	// NextPageToken: A token that you can use to retrieve the next page of
  1571  	// results. If this field is omitted, there are no subsequent pages.
  1572  	NextPageToken string `json:"nextPageToken,omitempty"`
  1573  	// OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview
  1574  	OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,omitempty"`
  1575  
  1576  	// ServerResponse contains the HTTP response code and headers from the server.
  1577  	googleapi.ServerResponse `json:"-"`
  1578  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1579  	// unconditionally include in API requests. By default, fields with empty or
  1580  	// default values are omitted from API requests. See
  1581  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1582  	// details.
  1583  	ForceSendFields []string `json:"-"`
  1584  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1585  	// requests with the JSON null value. By default, fields with empty values are
  1586  	// omitted from API requests. See
  1587  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1588  	NullFields []string `json:"-"`
  1589  }
  1590  
  1591  func (s *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) {
  1592  	type NoMethod GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse
  1593  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1594  }
  1595  
  1596  // GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse:
  1597  // ListOrgPolicyViolationsResponse is the response message for
  1598  // OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
  1599  type GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse struct {
  1600  	// NextPageToken: A token that you can use to retrieve the next page of
  1601  	// results. If this field is omitted, there are no subsequent pages.
  1602  	NextPageToken string `json:"nextPageToken,omitempty"`
  1603  	// OrgPolicyViolations: The list of OrgPolicyViolations
  1604  	OrgPolicyViolations []*GoogleCloudPolicysimulatorV1betaOrgPolicyViolation `json:"orgPolicyViolations,omitempty"`
  1605  
  1606  	// ServerResponse contains the HTTP response code and headers from the server.
  1607  	googleapi.ServerResponse `json:"-"`
  1608  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1609  	// unconditionally include in API requests. By default, fields with empty or
  1610  	// default values are omitted from API requests. See
  1611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1612  	// details.
  1613  	ForceSendFields []string `json:"-"`
  1614  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1615  	// requests with the JSON null value. By default, fields with empty values are
  1616  	// omitted from API requests. See
  1617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1618  	NullFields []string `json:"-"`
  1619  }
  1620  
  1621  func (s *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) {
  1622  	type NoMethod GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse
  1623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1624  }
  1625  
  1626  // GoogleCloudPolicysimulatorV1betaListReplayResultsResponse: Response message
  1627  // for Simulator.ListReplayResults.
  1628  type GoogleCloudPolicysimulatorV1betaListReplayResultsResponse struct {
  1629  	// NextPageToken: A token that you can use to retrieve the next page of
  1630  	// ReplayResult objects. If this field is omitted, there are no subsequent
  1631  	// pages.
  1632  	NextPageToken string `json:"nextPageToken,omitempty"`
  1633  	// ReplayResults: The results of running a Replay.
  1634  	ReplayResults []*GoogleCloudPolicysimulatorV1betaReplayResult `json:"replayResults,omitempty"`
  1635  
  1636  	// ServerResponse contains the HTTP response code and headers from the server.
  1637  	googleapi.ServerResponse `json:"-"`
  1638  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1639  	// unconditionally include in API requests. By default, fields with empty or
  1640  	// default values are omitted from API requests. See
  1641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1642  	// details.
  1643  	ForceSendFields []string `json:"-"`
  1644  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1645  	// requests with the JSON null value. By default, fields with empty values are
  1646  	// omitted from API requests. See
  1647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1648  	NullFields []string `json:"-"`
  1649  }
  1650  
  1651  func (s *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) MarshalJSON() ([]byte, error) {
  1652  	type NoMethod GoogleCloudPolicysimulatorV1betaListReplayResultsResponse
  1653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1654  }
  1655  
  1656  // GoogleCloudPolicysimulatorV1betaListReplaysResponse: Response message for
  1657  // Simulator.ListReplays.
  1658  type GoogleCloudPolicysimulatorV1betaListReplaysResponse struct {
  1659  	// NextPageToken: A token that you can use to retrieve the next page of
  1660  	// results. If this field is omitted, there are no subsequent pages.
  1661  	NextPageToken string `json:"nextPageToken,omitempty"`
  1662  	// Replays: The list of Replay objects.
  1663  	Replays []*GoogleCloudPolicysimulatorV1betaReplay `json:"replays,omitempty"`
  1664  
  1665  	// ServerResponse contains the HTTP response code and headers from the server.
  1666  	googleapi.ServerResponse `json:"-"`
  1667  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1668  	// unconditionally include in API requests. By default, fields with empty or
  1669  	// default values are omitted from API requests. See
  1670  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1671  	// details.
  1672  	ForceSendFields []string `json:"-"`
  1673  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1674  	// requests with the JSON null value. By default, fields with empty values are
  1675  	// omitted from API requests. See
  1676  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1677  	NullFields []string `json:"-"`
  1678  }
  1679  
  1680  func (s *GoogleCloudPolicysimulatorV1betaListReplaysResponse) MarshalJSON() ([]byte, error) {
  1681  	type NoMethod GoogleCloudPolicysimulatorV1betaListReplaysResponse
  1682  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1683  }
  1684  
  1685  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed changes to
  1686  // OrgPolicy.
  1687  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct {
  1688  	// CustomConstraints: Optional. The OrgPolicy CustomConstraint changes to
  1689  	// preview violations for. Any existing CustomConstraints with the same name
  1690  	// will be overridden in the simulation. That is, violations will be determined
  1691  	// as if all custom constraints in the overlay were instantiated. Only a single
  1692  	// custom_constraint is supported in the overlay at a time. For evaluating
  1693  	// multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests
  1694  	// are made, where each request evaluates a single constraint.
  1695  	CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"`
  1696  	// Policies: Optional. The OrgPolicy changes to preview violations for. Any
  1697  	// existing OrgPolicies with the same name will be overridden in the
  1698  	// simulation. That is, violations will be determined as if all policies in the
  1699  	// overlay were created or updated.
  1700  	Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"`
  1701  	// ForceSendFields is a list of field names (e.g. "CustomConstraints") to
  1702  	// unconditionally include in API requests. By default, fields with empty or
  1703  	// default values are omitted from API requests. See
  1704  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1705  	// details.
  1706  	ForceSendFields []string `json:"-"`
  1707  	// NullFields is a list of field names (e.g. "CustomConstraints") to include in
  1708  	// API requests with the JSON null value. By default, fields with empty values
  1709  	// are omitted from API requests. See
  1710  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1711  	NullFields []string `json:"-"`
  1712  }
  1713  
  1714  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) {
  1715  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
  1716  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1717  }
  1718  
  1719  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay: A
  1720  // change to an OrgPolicy custom constraint.
  1721  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct {
  1722  	// CustomConstraint: Optional. The new or updated custom constraint.
  1723  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  1724  	// CustomConstraintParent: Optional. Resource the constraint is attached to.
  1725  	// Example: "organization/987654"
  1726  	CustomConstraintParent string `json:"customConstraintParent,omitempty"`
  1727  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  1728  	// unconditionally include in API requests. By default, fields with empty or
  1729  	// default values are omitted from API requests. See
  1730  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1731  	// details.
  1732  	ForceSendFields []string `json:"-"`
  1733  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  1734  	// API requests with the JSON null value. By default, fields with empty values
  1735  	// are omitted from API requests. See
  1736  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1737  	NullFields []string `json:"-"`
  1738  }
  1739  
  1740  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) {
  1741  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
  1742  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1743  }
  1744  
  1745  // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A change to
  1746  // an OrgPolicy.
  1747  type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct {
  1748  	// Policy: Optional. The new or updated OrgPolicy.
  1749  	Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"`
  1750  	// PolicyParent: Optional. The parent of the policy we are attaching to.
  1751  	// Example: "projects/123456"
  1752  	PolicyParent string `json:"policyParent,omitempty"`
  1753  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1754  	// include in API requests. By default, fields with empty or default values are
  1755  	// omitted from API requests. See
  1756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1757  	// details.
  1758  	ForceSendFields []string `json:"-"`
  1759  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1760  	// requests with the JSON null value. By default, fields with empty values are
  1761  	// omitted from API requests. See
  1762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1763  	NullFields []string `json:"-"`
  1764  }
  1765  
  1766  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) {
  1767  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
  1768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1769  }
  1770  
  1771  // GoogleCloudPolicysimulatorV1betaOrgPolicyViolation: OrgPolicyViolation is a
  1772  // resource representing a single resource violating a single OrgPolicy
  1773  // constraint.
  1774  type GoogleCloudPolicysimulatorV1betaOrgPolicyViolation struct {
  1775  	// CustomConstraint: The custom constraint being violated.
  1776  	CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"`
  1777  	// Error: Any error encountered during the evaluation.
  1778  	Error *GoogleRpcStatus `json:"error,omitempty"`
  1779  	// Name: The name of the `OrgPolicyViolation`. Example:
  1780  	// organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506
  1781  	// a5f7f/orgPolicyViolations/38ce`
  1782  	Name string `json:"name,omitempty"`
  1783  	// Resource: The resource violating the constraint.
  1784  	Resource *GoogleCloudPolicysimulatorV1betaResourceContext `json:"resource,omitempty"`
  1785  	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
  1786  	// unconditionally include in API requests. By default, fields with empty or
  1787  	// default values are omitted from API requests. See
  1788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1789  	// details.
  1790  	ForceSendFields []string `json:"-"`
  1791  	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
  1792  	// API requests with the JSON null value. By default, fields with empty values
  1793  	// are omitted from API requests. See
  1794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1795  	NullFields []string `json:"-"`
  1796  }
  1797  
  1798  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolation) MarshalJSON() ([]byte, error) {
  1799  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolation
  1800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1801  }
  1802  
  1803  // GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview:
  1804  // OrgPolicyViolationsPreview is a resource providing a preview of the
  1805  // violations that will exist if an OrgPolicy change is made. The list of
  1806  // violations are modeled as child resources and retrieved via a
  1807  // ListOrgPolicyViolations API call. There are potentially more
  1808  // OrgPolicyViolations than could fit in an embedded field. Thus, the use of a
  1809  // child resource instead of a field.
  1810  type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct {
  1811  	// CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` was
  1812  	// created.
  1813  	CreateTime string `json:"createTime,omitempty"`
  1814  	// CustomConstraints: Output only. The names of the constraints against which
  1815  	// all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only
  1816  	// contains `PolicyOverlay` then it contains the name of the configured custom
  1817  	// constraint, applicable to the specified policies. Otherwise it contains the
  1818  	// name of the constraint specified in `CustomConstraintOverlay`. Format:
  1819  	// `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
  1820  	// Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
  1821  	CustomConstraints []string `json:"customConstraints,omitempty"`
  1822  	// Name: Output only. The resource name of the `OrgPolicyViolationsPreview`. It
  1823  	// has the following format:
  1824  	// `organizations/{organization}/locations/{location}/orgPolicyViolationsPreview
  1825  	// s/{orgPolicyViolationsPreview}` Example:
  1826  	// `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/50
  1827  	// 6a5f7f`
  1828  	Name string `json:"name,omitempty"`
  1829  	// Overlay: Required. The proposed changes we are previewing violations for.
  1830  	Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"`
  1831  	// ResourceCounts: Output only. A summary of the state of all resources scanned
  1832  	// for compliance with the changed OrgPolicy.
  1833  	ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"`
  1834  	// State: Output only. The state of the `OrgPolicyViolationsPreview`.
  1835  	//
  1836  	// Possible values:
  1837  	//   "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified.
  1838  	//   "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been created
  1839  	// yet.
  1840  	//   "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently being
  1841  	// created.
  1842  	//   "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation finished
  1843  	// successfully.
  1844  	//   "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed with an
  1845  	// error.
  1846  	State string `json:"state,omitempty"`
  1847  	// ViolationsCount: Output only. The number of OrgPolicyViolations in this
  1848  	// `OrgPolicyViolationsPreview`. This count may differ from
  1849  	// `resource_summary.noncompliant_count` because each OrgPolicyViolation is
  1850  	// specific to a resource **and** constraint. If there are multiple constraints
  1851  	// being evaluated (i.e. multiple policies in the overlay), a single resource
  1852  	// may violate multiple constraints.
  1853  	ViolationsCount int64 `json:"violationsCount,omitempty"`
  1854  
  1855  	// ServerResponse contains the HTTP response code and headers from the server.
  1856  	googleapi.ServerResponse `json:"-"`
  1857  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1858  	// unconditionally include in API requests. By default, fields with empty or
  1859  	// default values are omitted from API requests. See
  1860  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1861  	// details.
  1862  	ForceSendFields []string `json:"-"`
  1863  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1864  	// requests with the JSON null value. By default, fields with empty values are
  1865  	// omitted from API requests. See
  1866  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1867  	NullFields []string `json:"-"`
  1868  }
  1869  
  1870  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) {
  1871  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
  1872  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1873  }
  1874  
  1875  // GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts: A
  1876  // summary of the state of all resources scanned for compliance with the
  1877  // changed OrgPolicy.
  1878  type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct {
  1879  	// Compliant: Output only. Number of scanned resources with zero violations.
  1880  	Compliant int64 `json:"compliant,omitempty"`
  1881  	// Errors: Output only. Number of resources that returned an error when
  1882  	// scanned.
  1883  	Errors int64 `json:"errors,omitempty"`
  1884  	// Noncompliant: Output only. Number of scanned resources with at least one
  1885  	// violation.
  1886  	Noncompliant int64 `json:"noncompliant,omitempty"`
  1887  	// Scanned: Output only. Number of resources checked for compliance. Must
  1888  	// equal: unenforced + noncompliant + compliant + error
  1889  	Scanned int64 `json:"scanned,omitempty"`
  1890  	// Unenforced: Output only. Number of resources where the constraint was not
  1891  	// enforced, i.e. the Policy set `enforced: false` for that resource.
  1892  	Unenforced int64 `json:"unenforced,omitempty"`
  1893  	// ForceSendFields is a list of field names (e.g. "Compliant") to
  1894  	// unconditionally include in API requests. By default, fields with empty or
  1895  	// default values are omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1897  	// details.
  1898  	ForceSendFields []string `json:"-"`
  1899  	// NullFields is a list of field names (e.g. "Compliant") to include in API
  1900  	// requests with the JSON null value. By default, fields with empty values are
  1901  	// omitted from API requests. See
  1902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1903  	NullFields []string `json:"-"`
  1904  }
  1905  
  1906  func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) {
  1907  	type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
  1908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1909  }
  1910  
  1911  // GoogleCloudPolicysimulatorV1betaReplay: A resource describing a `Replay`, or
  1912  // simulation.
  1913  type GoogleCloudPolicysimulatorV1betaReplay struct {
  1914  	// Config: Required. The configuration used for the `Replay`.
  1915  	Config *GoogleCloudPolicysimulatorV1betaReplayConfig `json:"config,omitempty"`
  1916  	// Name: Output only. The resource name of the `Replay`, which has the
  1917  	// following format:
  1918  	// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{rep
  1919  	// lay-id}`, where `{resource-id}` is the ID of the project, folder, or
  1920  	// organization that owns the Replay. Example:
  1921  	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03
  1922  	// -479ce1833c36`
  1923  	Name string `json:"name,omitempty"`
  1924  	// ResultsSummary: Output only. Summary statistics about the replayed log
  1925  	// entries.
  1926  	ResultsSummary *GoogleCloudPolicysimulatorV1betaReplayResultsSummary `json:"resultsSummary,omitempty"`
  1927  	// State: Output only. The current state of the `Replay`.
  1928  	//
  1929  	// Possible values:
  1930  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
  1931  	//   "PENDING" - The `Replay` has not started yet.
  1932  	//   "RUNNING" - The `Replay` is currently running.
  1933  	//   "SUCCEEDED" - The `Replay` has successfully completed.
  1934  	//   "FAILED" - The `Replay` has finished with an error.
  1935  	State string `json:"state,omitempty"`
  1936  
  1937  	// ServerResponse contains the HTTP response code and headers from the server.
  1938  	googleapi.ServerResponse `json:"-"`
  1939  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
  1940  	// include in API requests. By default, fields with empty or default values are
  1941  	// omitted from API requests. See
  1942  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1943  	// details.
  1944  	ForceSendFields []string `json:"-"`
  1945  	// NullFields is a list of field names (e.g. "Config") to include in API
  1946  	// requests with the JSON null value. By default, fields with empty values are
  1947  	// omitted from API requests. See
  1948  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1949  	NullFields []string `json:"-"`
  1950  }
  1951  
  1952  func (s *GoogleCloudPolicysimulatorV1betaReplay) MarshalJSON() ([]byte, error) {
  1953  	type NoMethod GoogleCloudPolicysimulatorV1betaReplay
  1954  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1955  }
  1956  
  1957  // GoogleCloudPolicysimulatorV1betaReplayConfig: The configuration used for a
  1958  // Replay.
  1959  type GoogleCloudPolicysimulatorV1betaReplayConfig struct {
  1960  	// LogSource: The logs to use as input for the Replay.
  1961  	//
  1962  	// Possible values:
  1963  	//   "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log source is
  1964  	// unspecified, the Replay defaults to using `RECENT_ACCESSES`.
  1965  	//   "RECENT_ACCESSES" - All access logs from the last 90 days. These logs may
  1966  	// not include logs from the most recent 7 days.
  1967  	LogSource string `json:"logSource,omitempty"`
  1968  	// PolicyOverlay: A mapping of the resources that you want to simulate policies
  1969  	// for and the policies that you want to simulate. Keys are the full resource
  1970  	// names for the resources. For example,
  1971  	// `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of
  1972  	// full resource names for Google Cloud services, see
  1973  	// https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
  1974  	// are Policy objects representing the policies that you want to simulate.
  1975  	// Replays automatically take into account any IAM policies inherited through
  1976  	// the resource hierarchy, and any policies set on descendant resources. You do
  1977  	// not need to include these policies in the policy overlay.
  1978  	PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"`
  1979  	// ForceSendFields is a list of field names (e.g. "LogSource") to
  1980  	// unconditionally include in API requests. By default, fields with empty or
  1981  	// default values are omitted from API requests. See
  1982  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1983  	// details.
  1984  	ForceSendFields []string `json:"-"`
  1985  	// NullFields is a list of field names (e.g. "LogSource") to include in API
  1986  	// requests with the JSON null value. By default, fields with empty values are
  1987  	// omitted from API requests. See
  1988  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1989  	NullFields []string `json:"-"`
  1990  }
  1991  
  1992  func (s *GoogleCloudPolicysimulatorV1betaReplayConfig) MarshalJSON() ([]byte, error) {
  1993  	type NoMethod GoogleCloudPolicysimulatorV1betaReplayConfig
  1994  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1995  }
  1996  
  1997  // GoogleCloudPolicysimulatorV1betaReplayDiff: The difference between the
  1998  // results of evaluating an access tuple under the current (baseline) policies
  1999  // and under the proposed (simulated) policies. This difference explains how a
  2000  // principal's access could change if the proposed policies were applied.
  2001  type GoogleCloudPolicysimulatorV1betaReplayDiff struct {
  2002  	// AccessDiff: A summary and comparison of the principal's access under the
  2003  	// current (baseline) policies and the proposed (simulated) policies for a
  2004  	// single access tuple. The evaluation of the principal's access is reported in
  2005  	// the AccessState field.
  2006  	AccessDiff *GoogleCloudPolicysimulatorV1betaAccessStateDiff `json:"accessDiff,omitempty"`
  2007  	// ForceSendFields is a list of field names (e.g. "AccessDiff") to
  2008  	// unconditionally include in API requests. By default, fields with empty or
  2009  	// default values are omitted from API requests. See
  2010  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2011  	// details.
  2012  	ForceSendFields []string `json:"-"`
  2013  	// NullFields is a list of field names (e.g. "AccessDiff") to include in API
  2014  	// requests with the JSON null value. By default, fields with empty values are
  2015  	// omitted from API requests. See
  2016  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2017  	NullFields []string `json:"-"`
  2018  }
  2019  
  2020  func (s *GoogleCloudPolicysimulatorV1betaReplayDiff) MarshalJSON() ([]byte, error) {
  2021  	type NoMethod GoogleCloudPolicysimulatorV1betaReplayDiff
  2022  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2023  }
  2024  
  2025  // GoogleCloudPolicysimulatorV1betaReplayResult: The result of replaying a
  2026  // single access tuple against a simulated state.
  2027  type GoogleCloudPolicysimulatorV1betaReplayResult struct {
  2028  	// AccessTuple: The access tuple that was replayed. This field includes
  2029  	// information about the principal, resource, and permission that were involved
  2030  	// in the access attempt.
  2031  	AccessTuple *GoogleCloudPolicysimulatorV1betaAccessTuple `json:"accessTuple,omitempty"`
  2032  	// Diff: The difference between the principal's access under the current
  2033  	// (baseline) policies and the principal's access under the proposed
  2034  	// (simulated) policies. This field is only included for access tuples that
  2035  	// were successfully replayed and had different results under the current
  2036  	// policies and the proposed policies.
  2037  	Diff *GoogleCloudPolicysimulatorV1betaReplayDiff `json:"diff,omitempty"`
  2038  	// Error: The error that caused the access tuple replay to fail. This field is
  2039  	// only included for access tuples that were not replayed successfully.
  2040  	Error *GoogleRpcStatus `json:"error,omitempty"`
  2041  	// LastSeenDate: The latest date this access tuple was seen in the logs.
  2042  	LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"`
  2043  	// Name: The resource name of the `ReplayResult`, in the following format:
  2044  	// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{rep
  2045  	// lay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the
  2046  	// project, folder, or organization that owns the Replay. Example:
  2047  	// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03
  2048  	// -479ce1833c36/results/1234`
  2049  	Name string `json:"name,omitempty"`
  2050  	// Parent: The Replay that the access tuple was included in.
  2051  	Parent string `json:"parent,omitempty"`
  2052  	// ForceSendFields is a list of field names (e.g. "AccessTuple") to
  2053  	// unconditionally include in API requests. By default, fields with empty or
  2054  	// default values are omitted from API requests. See
  2055  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2056  	// details.
  2057  	ForceSendFields []string `json:"-"`
  2058  	// NullFields is a list of field names (e.g. "AccessTuple") to include in API
  2059  	// requests with the JSON null value. By default, fields with empty values are
  2060  	// omitted from API requests. See
  2061  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2062  	NullFields []string `json:"-"`
  2063  }
  2064  
  2065  func (s *GoogleCloudPolicysimulatorV1betaReplayResult) MarshalJSON() ([]byte, error) {
  2066  	type NoMethod GoogleCloudPolicysimulatorV1betaReplayResult
  2067  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2068  }
  2069  
  2070  // GoogleCloudPolicysimulatorV1betaReplayResultsSummary: Summary statistics
  2071  // about the replayed log entries.
  2072  type GoogleCloudPolicysimulatorV1betaReplayResultsSummary struct {
  2073  	// DifferenceCount: The number of replayed log entries with a difference
  2074  	// between baseline and simulated policies.
  2075  	DifferenceCount int64 `json:"differenceCount,omitempty"`
  2076  	// ErrorCount: The number of log entries that could not be replayed.
  2077  	ErrorCount int64 `json:"errorCount,omitempty"`
  2078  	// LogCount: The total number of log entries replayed.
  2079  	LogCount int64 `json:"logCount,omitempty"`
  2080  	// NewestDate: The date of the newest log entry replayed.
  2081  	NewestDate *GoogleTypeDate `json:"newestDate,omitempty"`
  2082  	// OldestDate: The date of the oldest log entry replayed.
  2083  	OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"`
  2084  	// UnchangedCount: The number of replayed log entries with no difference
  2085  	// between baseline and simulated policies.
  2086  	UnchangedCount int64 `json:"unchangedCount,omitempty"`
  2087  	// ForceSendFields is a list of field names (e.g. "DifferenceCount") to
  2088  	// unconditionally include in API requests. By default, fields with empty or
  2089  	// default values are omitted from API requests. See
  2090  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2091  	// details.
  2092  	ForceSendFields []string `json:"-"`
  2093  	// NullFields is a list of field names (e.g. "DifferenceCount") to include in
  2094  	// API requests with the JSON null value. By default, fields with empty values
  2095  	// are omitted from API requests. See
  2096  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2097  	NullFields []string `json:"-"`
  2098  }
  2099  
  2100  func (s *GoogleCloudPolicysimulatorV1betaReplayResultsSummary) MarshalJSON() ([]byte, error) {
  2101  	type NoMethod GoogleCloudPolicysimulatorV1betaReplayResultsSummary
  2102  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2103  }
  2104  
  2105  // GoogleCloudPolicysimulatorV1betaResourceContext: ResourceContext provides
  2106  // the context we know about a resource. It is similar in concept to
  2107  // google.cloud.asset.v1.Resource, but focuses on the information specifically
  2108  // used by Simulator.
  2109  type GoogleCloudPolicysimulatorV1betaResourceContext struct {
  2110  	// Ancestors: The ancestry path of the resource in Google Cloud resource
  2111  	// hierarchy
  2112  	// (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
  2113  	// represented as a list of relative resource names. An ancestry path starts
  2114  	// with the closest ancestor in the hierarchy and ends at root. If the resource
  2115  	// is a project, folder, or organization, the ancestry path starts from the
  2116  	// resource itself. Example: `["projects/123456789", "folders/5432",
  2117  	// "organizations/1234"]`
  2118  	Ancestors []string `json:"ancestors,omitempty"`
  2119  	// AssetType: The asset type of the resource as defined by CAIS. Example:
  2120  	// `compute.googleapis.com/Firewall` See Supported asset types
  2121  	// (https://cloud.google.com/asset-inventory/docs/supported-asset-types) for
  2122  	// more information.
  2123  	AssetType string `json:"assetType,omitempty"`
  2124  	// Resource: The full name of the resource. Example:
  2125  	// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/insta
  2126  	// nce1` See Resource names
  2127  	// (https://cloud.google.com/apis/design/resource_names#full_resource_name) for
  2128  	// more information.
  2129  	Resource string `json:"resource,omitempty"`
  2130  	// ForceSendFields is a list of field names (e.g. "Ancestors") to
  2131  	// unconditionally include in API requests. By default, fields with empty or
  2132  	// default values are omitted from API requests. See
  2133  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2134  	// details.
  2135  	ForceSendFields []string `json:"-"`
  2136  	// NullFields is a list of field names (e.g. "Ancestors") to include in API
  2137  	// requests with the JSON null value. By default, fields with empty values are
  2138  	// omitted from API requests. See
  2139  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2140  	NullFields []string `json:"-"`
  2141  }
  2142  
  2143  func (s *GoogleCloudPolicysimulatorV1betaResourceContext) MarshalJSON() ([]byte, error) {
  2144  	type NoMethod GoogleCloudPolicysimulatorV1betaResourceContext
  2145  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2146  }
  2147  
  2148  // GoogleIamV1AuditConfig: Specifies the audit configuration for a service. The
  2149  // configuration determines which permission types are logged, and what
  2150  // identities, if any, are exempted from logging. An AuditConfig must have one
  2151  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
  2152  // and a specific service, the union of the two AuditConfigs is used for that
  2153  // service: the log_types specified in each AuditConfig are enabled, and the
  2154  // exempted_members in each AuditLogConfig are exempted. Example Policy with
  2155  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
  2156  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
  2157  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
  2158  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
  2159  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
  2160  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
  2161  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
  2162  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
  2163  // `aliya@example.com` from DATA_WRITE logging.
  2164  type GoogleIamV1AuditConfig struct {
  2165  	// AuditLogConfigs: The configuration for logging of each type of permission.
  2166  	AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"`
  2167  	// Service: Specifies a service that will be enabled for audit logging. For
  2168  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
  2169  	// is a special value that covers all services.
  2170  	Service string `json:"service,omitempty"`
  2171  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  2172  	// unconditionally include in API requests. By default, fields with empty or
  2173  	// default values are omitted from API requests. See
  2174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2175  	// details.
  2176  	ForceSendFields []string `json:"-"`
  2177  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
  2178  	// API requests with the JSON null value. By default, fields with empty values
  2179  	// are omitted from API requests. See
  2180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2181  	NullFields []string `json:"-"`
  2182  }
  2183  
  2184  func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) {
  2185  	type NoMethod GoogleIamV1AuditConfig
  2186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2187  }
  2188  
  2189  // GoogleIamV1AuditLogConfig: Provides the configuration for logging a type of
  2190  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
  2191  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
  2192  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  2193  // exempting jose@example.com from DATA_READ logging.
  2194  type GoogleIamV1AuditLogConfig struct {
  2195  	// ExemptedMembers: Specifies the identities that do not cause logging for this
  2196  	// type of permission. Follows the same format of Binding.members.
  2197  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  2198  	// LogType: The log type that this config enables.
  2199  	//
  2200  	// Possible values:
  2201  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  2202  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  2203  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  2204  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
  2205  	LogType string `json:"logType,omitempty"`
  2206  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  2207  	// unconditionally include in API requests. By default, fields with empty or
  2208  	// default values are omitted from API requests. See
  2209  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2210  	// details.
  2211  	ForceSendFields []string `json:"-"`
  2212  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
  2213  	// API requests with the JSON null value. By default, fields with empty values
  2214  	// are omitted from API requests. See
  2215  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2216  	NullFields []string `json:"-"`
  2217  }
  2218  
  2219  func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) {
  2220  	type NoMethod GoogleIamV1AuditLogConfig
  2221  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2222  }
  2223  
  2224  // GoogleIamV1Binding: Associates `members`, or principals, with a `role`.
  2225  type GoogleIamV1Binding struct {
  2226  	// Condition: The condition that is associated with this binding. If the
  2227  	// condition evaluates to `true`, then this binding applies to the current
  2228  	// request. If the condition evaluates to `false`, then this binding does not
  2229  	// apply to the current request. However, a different role binding might grant
  2230  	// the same role to one or more of the principals in this binding. To learn
  2231  	// which resources support conditions in their IAM policies, see the IAM
  2232  	// documentation
  2233  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2234  	Condition *GoogleTypeExpr `json:"condition,omitempty"`
  2235  	// Members: Specifies the principals requesting access for a Google Cloud
  2236  	// resource. `members` can have the following values: * `allUsers`: A special
  2237  	// identifier that represents anyone who is on the internet; with or without a
  2238  	// Google account. * `allAuthenticatedUsers`: A special identifier that
  2239  	// represents anyone who is authenticated with a Google account or a service
  2240  	// account. Does not include identities that come from external identity
  2241  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
  2242  	// address that represents a specific Google account. For example,
  2243  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
  2244  	// represents a Google service account. For example,
  2245  	// `my-other-app@appspot.gserviceaccount.com`. *
  2246  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
  2247  	// identifier for a Kubernetes service account
  2248  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
  2249  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
  2250  	// `group:{emailid}`: An email address that represents a Google group. For
  2251  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
  2252  	// (primary) that represents all the users of that domain. For example,
  2253  	// `google.com` or `example.com`. *
  2254  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
  2255  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
  2256  	// pool. *
  2257  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2258  	// group/{group_id}`: All workforce identities in a group. *
  2259  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2260  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
  2261  	// a specific attribute value. *
  2262  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
  2263  	// *`: All identities in a workforce identity pool. *
  2264  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
  2265  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
  2266  	// identity in a workload identity pool. *
  2267  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2268  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
  2269  	// group. *
  2270  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2271  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
  2272  	// `: All identities in a workload identity pool with a certain attribute. *
  2273  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
  2274  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
  2275  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
  2276  	// unique identifier) representing a user that has been recently deleted. For
  2277  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
  2278  	// recovered, this value reverts to `user:{emailid}` and the recovered user
  2279  	// retains the role in the binding. *
  2280  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
  2281  	// unique identifier) representing a service account that has been recently
  2282  	// deleted. For example,
  2283  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
  2284  	// service account is undeleted, this value reverts to
  2285  	// `serviceAccount:{emailid}` and the undeleted service account retains the
  2286  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
  2287  	// address (plus unique identifier) representing a Google group that has been
  2288  	// recently deleted. For example,
  2289  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
  2290  	// this value reverts to `group:{emailid}` and the recovered group retains the
  2291  	// role in the binding. *
  2292  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
  2293  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
  2294  	// workforce identity pool. For example,
  2295  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
  2296  	// ol-id/subject/my-subject-attribute-value`.
  2297  	Members []string `json:"members,omitempty"`
  2298  	// Role: Role that is assigned to the list of `members`, or principals. For
  2299  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
  2300  	// of the IAM roles and permissions, see the IAM documentation
  2301  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
  2302  	// available pre-defined roles, see here
  2303  	// (https://cloud.google.com/iam/docs/understanding-roles).
  2304  	Role string `json:"role,omitempty"`
  2305  	// ForceSendFields is a list of field names (e.g. "Condition") to
  2306  	// unconditionally include in API requests. By default, fields with empty or
  2307  	// default values are omitted from API requests. See
  2308  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2309  	// details.
  2310  	ForceSendFields []string `json:"-"`
  2311  	// NullFields is a list of field names (e.g. "Condition") to include in API
  2312  	// requests with the JSON null value. By default, fields with empty values are
  2313  	// omitted from API requests. See
  2314  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2315  	NullFields []string `json:"-"`
  2316  }
  2317  
  2318  func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) {
  2319  	type NoMethod GoogleIamV1Binding
  2320  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2321  }
  2322  
  2323  // GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which
  2324  // specifies access controls for Google Cloud resources. A `Policy` is a
  2325  // collection of `bindings`. A `binding` binds one or more `members`, or
  2326  // principals, to a single `role`. Principals can be user accounts, service
  2327  // accounts, Google groups, and domains (such as G Suite). A `role` is a named
  2328  // list of permissions; each `role` can be an IAM predefined role or a
  2329  // user-created custom role. For some types of Google Cloud resources, a
  2330  // `binding` can also specify a `condition`, which is a logical expression that
  2331  // allows access to a resource only if the expression evaluates to `true`. A
  2332  // condition can add constraints based on attributes of the request, the
  2333  // resource, or both. To learn which resources support conditions in their IAM
  2334  // policies, see the IAM documentation
  2335  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  2336  // example:** ``` { "bindings": [ { "role":
  2337  // "roles/resourcemanager.organizationAdmin", "members": [
  2338  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  2339  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  2340  // "roles/resourcemanager.organizationViewer", "members": [
  2341  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2342  // "description": "Does not grant access after Sep 2020", "expression":
  2343  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  2344  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  2345  // members: - user:mike@example.com - group:admins@example.com -
  2346  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  2347  // role: roles/resourcemanager.organizationAdmin - members: -
  2348  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2349  // condition: title: expirable access description: Does not grant access after
  2350  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2351  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2352  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2353  type GoogleIamV1Policy struct {
  2354  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  2355  	AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"`
  2356  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2357  	// Optionally, may specify a `condition` that determines how and when the
  2358  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2359  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2360  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2361  	// principal counts towards these limits. For example, if the `bindings` grant
  2362  	// 50 different roles to `user:alice@example.com`, and not to any other
  2363  	// principal, then you can add another 1,450 principals to the `bindings` in
  2364  	// the `Policy`.
  2365  	Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"`
  2366  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2367  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2368  	// strongly suggested that systems make use of the `etag` in the
  2369  	// read-modify-write cycle to perform policy updates in order to avoid race
  2370  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2371  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2372  	// ensure that their change will be applied to the same version of the policy.
  2373  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2374  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2375  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2376  	// the conditions in the version `3` policy are lost.
  2377  	Etag string `json:"etag,omitempty"`
  2378  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2379  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2380  	// affects conditional role bindings must specify version `3`. This requirement
  2381  	// applies to the following operations: * Getting a policy that includes a
  2382  	// conditional role binding * Adding a conditional role binding to a policy *
  2383  	// Changing a conditional role binding in a policy * Removing any role binding,
  2384  	// with or without a condition, from a policy that includes conditions
  2385  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2386  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2387  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2388  	// the conditions in the version `3` policy are lost. If a policy does not
  2389  	// include any conditions, operations on that policy may specify any valid
  2390  	// version or leave the field unset. To learn which resources support
  2391  	// conditions in their IAM policies, see the IAM documentation
  2392  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2393  	Version int64 `json:"version,omitempty"`
  2394  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2395  	// unconditionally include in API requests. By default, fields with empty or
  2396  	// default values are omitted from API requests. See
  2397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2398  	// details.
  2399  	ForceSendFields []string `json:"-"`
  2400  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  2401  	// requests with the JSON null value. By default, fields with empty values are
  2402  	// omitted from API requests. See
  2403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2404  	NullFields []string `json:"-"`
  2405  }
  2406  
  2407  func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) {
  2408  	type NoMethod GoogleIamV1Policy
  2409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2410  }
  2411  
  2412  // GoogleLongrunningListOperationsResponse: The response message for
  2413  // Operations.ListOperations.
  2414  type GoogleLongrunningListOperationsResponse struct {
  2415  	// NextPageToken: The standard List next-page token.
  2416  	NextPageToken string `json:"nextPageToken,omitempty"`
  2417  	// Operations: A list of operations that matches the specified filter in the
  2418  	// request.
  2419  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  2420  
  2421  	// ServerResponse contains the HTTP response code and headers from the server.
  2422  	googleapi.ServerResponse `json:"-"`
  2423  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2424  	// unconditionally include in API requests. By default, fields with empty or
  2425  	// default values are omitted from API requests. See
  2426  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2427  	// details.
  2428  	ForceSendFields []string `json:"-"`
  2429  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2430  	// requests with the JSON null value. By default, fields with empty values are
  2431  	// omitted from API requests. See
  2432  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2433  	NullFields []string `json:"-"`
  2434  }
  2435  
  2436  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  2437  	type NoMethod GoogleLongrunningListOperationsResponse
  2438  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2439  }
  2440  
  2441  // GoogleLongrunningOperation: This resource represents a long-running
  2442  // operation that is the result of a network API call.
  2443  type GoogleLongrunningOperation struct {
  2444  	// Done: If the value is `false`, it means the operation is still in progress.
  2445  	// If `true`, the operation is completed, and either `error` or `response` is
  2446  	// available.
  2447  	Done bool `json:"done,omitempty"`
  2448  	// Error: The error result of the operation in case of failure or cancellation.
  2449  	Error *GoogleRpcStatus `json:"error,omitempty"`
  2450  	// Metadata: Service-specific metadata associated with the operation. It
  2451  	// typically contains progress information and common metadata such as create
  2452  	// time. Some services might not provide such metadata. Any method that returns
  2453  	// a long-running operation should document the metadata type, if any.
  2454  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2455  	// Name: The server-assigned name, which is only unique within the same service
  2456  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2457  	// should be a resource name ending with `operations/{unique_id}`.
  2458  	Name string `json:"name,omitempty"`
  2459  	// Response: The normal, successful response of the operation. If the original
  2460  	// method returns no data on success, such as `Delete`, the response is
  2461  	// `google.protobuf.Empty`. If the original method is standard
  2462  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2463  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2464  	// original method name. For example, if the original method name is
  2465  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2466  	Response googleapi.RawMessage `json:"response,omitempty"`
  2467  
  2468  	// ServerResponse contains the HTTP response code and headers from the server.
  2469  	googleapi.ServerResponse `json:"-"`
  2470  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2471  	// include in API requests. By default, fields with empty or default values are
  2472  	// omitted from API requests. See
  2473  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2474  	// details.
  2475  	ForceSendFields []string `json:"-"`
  2476  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2477  	// with the JSON null value. By default, fields with empty values are omitted
  2478  	// from API requests. See
  2479  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2480  	NullFields []string `json:"-"`
  2481  }
  2482  
  2483  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  2484  	type NoMethod GoogleLongrunningOperation
  2485  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2486  }
  2487  
  2488  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  2489  // suitable for different programming environments, including REST APIs and RPC
  2490  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  2491  // contains three pieces of data: error code, error message, and error details.
  2492  // You can find out more about this error model and how to work with it in the
  2493  // API Design Guide (https://cloud.google.com/apis/design/errors).
  2494  type GoogleRpcStatus struct {
  2495  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2496  	Code int64 `json:"code,omitempty"`
  2497  	// Details: A list of messages that carry the error details. There is a common
  2498  	// set of message types for APIs to use.
  2499  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2500  	// Message: A developer-facing error message, which should be in English. Any
  2501  	// user-facing error message should be localized and sent in the
  2502  	// google.rpc.Status.details field, or localized by the client.
  2503  	Message string `json:"message,omitempty"`
  2504  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2505  	// include in API requests. By default, fields with empty or default values are
  2506  	// omitted from API requests. See
  2507  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2508  	// details.
  2509  	ForceSendFields []string `json:"-"`
  2510  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2511  	// with the JSON null value. By default, fields with empty values are omitted
  2512  	// from API requests. See
  2513  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2514  	NullFields []string `json:"-"`
  2515  }
  2516  
  2517  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  2518  	type NoMethod GoogleRpcStatus
  2519  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2520  }
  2521  
  2522  // GoogleTypeDate: Represents a whole or partial calendar date, such as a
  2523  // birthday. The time of day and time zone are either specified elsewhere or
  2524  // are insignificant. The date is relative to the Gregorian Calendar. This can
  2525  // represent one of the following: * A full date, with non-zero year, month,
  2526  // and day values. * A month and day, with a zero year (for example, an
  2527  // anniversary). * A year on its own, with a zero month and a zero day. * A
  2528  // year and month, with a zero day (for example, a credit card expiration
  2529  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
  2530  // google.protobuf.Timestamp
  2531  type GoogleTypeDate struct {
  2532  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
  2533  	// or 0 to specify a year by itself or a year and month where the day isn't
  2534  	// significant.
  2535  	Day int64 `json:"day,omitempty"`
  2536  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
  2537  	// a month and day.
  2538  	Month int64 `json:"month,omitempty"`
  2539  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
  2540  	// without a year.
  2541  	Year int64 `json:"year,omitempty"`
  2542  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  2543  	// include in API requests. By default, fields with empty or default values are
  2544  	// omitted from API requests. See
  2545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2546  	// details.
  2547  	ForceSendFields []string `json:"-"`
  2548  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  2549  	// with the JSON null value. By default, fields with empty values are omitted
  2550  	// from API requests. See
  2551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2552  	NullFields []string `json:"-"`
  2553  }
  2554  
  2555  func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  2556  	type NoMethod GoogleTypeDate
  2557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2558  }
  2559  
  2560  // GoogleTypeExpr: Represents a textual expression in the Common Expression
  2561  // Language (CEL) syntax. CEL is a C-like expression language. The syntax and
  2562  // semantics of CEL are documented at https://github.com/google/cel-spec.
  2563  // Example (Comparison): title: "Summary size limit" description: "Determines
  2564  // if a summary is less than 100 chars" expression: "document.summary.size() <
  2565  // 100" Example (Equality): title: "Requestor is owner" description:
  2566  // "Determines if requestor is the document owner" expression: "document.owner
  2567  // == request.auth.claims.email" Example (Logic): title: "Public documents"
  2568  // description: "Determine whether the document should be publicly visible"
  2569  // expression: "document.type != 'private' && document.type != 'internal'"
  2570  // Example (Data Manipulation): title: "Notification string" description:
  2571  // "Create a notification string with a timestamp." expression: "'New message
  2572  // received at ' + string(document.create_time)" The exact variables and
  2573  // functions that may be referenced within an expression are determined by the
  2574  // service that evaluates it. See the service documentation for additional
  2575  // information.
  2576  type GoogleTypeExpr struct {
  2577  	// Description: Optional. Description of the expression. This is a longer text
  2578  	// which describes the expression, e.g. when hovered over it in a UI.
  2579  	Description string `json:"description,omitempty"`
  2580  	// Expression: Textual representation of an expression in Common Expression
  2581  	// Language syntax.
  2582  	Expression string `json:"expression,omitempty"`
  2583  	// Location: Optional. String indicating the location of the expression for
  2584  	// error reporting, e.g. a file name and a position in the file.
  2585  	Location string `json:"location,omitempty"`
  2586  	// Title: Optional. Title for the expression, i.e. a short string describing
  2587  	// its purpose. This can be used e.g. in UIs which allow to enter the
  2588  	// expression.
  2589  	Title string `json:"title,omitempty"`
  2590  	// ForceSendFields is a list of field names (e.g. "Description") to
  2591  	// unconditionally include in API requests. By default, fields with empty or
  2592  	// default values are omitted from API requests. See
  2593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2594  	// details.
  2595  	ForceSendFields []string `json:"-"`
  2596  	// NullFields is a list of field names (e.g. "Description") to include in API
  2597  	// requests with the JSON null value. By default, fields with empty values are
  2598  	// omitted from API requests. See
  2599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2600  	NullFields []string `json:"-"`
  2601  }
  2602  
  2603  func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) {
  2604  	type NoMethod GoogleTypeExpr
  2605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2606  }
  2607  
  2608  type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  2609  	s            *Service
  2610  	name         string
  2611  	urlParams_   gensupport.URLParams
  2612  	ifNoneMatch_ string
  2613  	ctx_         context.Context
  2614  	header_      http.Header
  2615  }
  2616  
  2617  // Get: Gets the latest state of a long-running operation. Clients can use this
  2618  // method to poll the operation result at intervals as recommended by the API
  2619  // service.
  2620  //
  2621  // - name: The name of the operation resource.
  2622  func (r *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2623  	c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2624  	c.name = name
  2625  	return c
  2626  }
  2627  
  2628  // Fields allows partial responses to be retrieved. See
  2629  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2630  // details.
  2631  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2632  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2633  	return c
  2634  }
  2635  
  2636  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2637  // object's ETag matches the given value. This is useful for getting updates
  2638  // only after the object has changed since the last request.
  2639  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2640  	c.ifNoneMatch_ = entityTag
  2641  	return c
  2642  }
  2643  
  2644  // Context sets the context to be used in this call's Do method.
  2645  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  2646  	c.ctx_ = ctx
  2647  	return c
  2648  }
  2649  
  2650  // Header returns a http.Header that can be modified by the caller to add
  2651  // headers to the request.
  2652  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  2653  	if c.header_ == nil {
  2654  		c.header_ = make(http.Header)
  2655  	}
  2656  	return c.header_
  2657  }
  2658  
  2659  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2660  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2661  	if c.ifNoneMatch_ != "" {
  2662  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2663  	}
  2664  	var body io.Reader = nil
  2665  	c.urlParams_.Set("alt", alt)
  2666  	c.urlParams_.Set("prettyPrint", "false")
  2667  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2668  	urls += "?" + c.urlParams_.Encode()
  2669  	req, err := http.NewRequest("GET", urls, body)
  2670  	if err != nil {
  2671  		return nil, err
  2672  	}
  2673  	req.Header = reqHeaders
  2674  	googleapi.Expand(req.URL, map[string]string{
  2675  		"name": c.name,
  2676  	})
  2677  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2678  }
  2679  
  2680  // Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get" call.
  2681  // Any non-2xx status code is an error. Response headers are in either
  2682  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2683  // returned at all) in error.(*googleapi.Error).Header. Use
  2684  // googleapi.IsNotModified to check whether the returned error was because
  2685  // http.StatusNotModified was returned.
  2686  func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2687  	gensupport.SetOptions(c.urlParams_, opts...)
  2688  	res, err := c.doRequest("json")
  2689  	if res != nil && res.StatusCode == http.StatusNotModified {
  2690  		if res.Body != nil {
  2691  			res.Body.Close()
  2692  		}
  2693  		return nil, gensupport.WrapError(&googleapi.Error{
  2694  			Code:   res.StatusCode,
  2695  			Header: res.Header,
  2696  		})
  2697  	}
  2698  	if err != nil {
  2699  		return nil, err
  2700  	}
  2701  	defer googleapi.CloseBody(res)
  2702  	if err := googleapi.CheckResponse(res); err != nil {
  2703  		return nil, gensupport.WrapError(err)
  2704  	}
  2705  	ret := &GoogleLongrunningOperation{
  2706  		ServerResponse: googleapi.ServerResponse{
  2707  			Header:         res.Header,
  2708  			HTTPStatusCode: res.StatusCode,
  2709  		},
  2710  	}
  2711  	target := &ret
  2712  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2713  		return nil, err
  2714  	}
  2715  	return ret, nil
  2716  }
  2717  
  2718  type FoldersLocationsReplaysCreateCall struct {
  2719  	s                                      *Service
  2720  	parent                                 string
  2721  	googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay
  2722  	urlParams_                             gensupport.URLParams
  2723  	ctx_                                   context.Context
  2724  	header_                                http.Header
  2725  }
  2726  
  2727  // Create: Creates and starts a Replay using the given ReplayConfig.
  2728  //
  2729  //   - parent: The parent resource where this Replay will be created. This
  2730  //     resource must be a project, folder, or organization with a location.
  2731  //     Example: `projects/my-example-project/locations/global`.
  2732  func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *FoldersLocationsReplaysCreateCall {
  2733  	c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2734  	c.parent = parent
  2735  	c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay
  2736  	return c
  2737  }
  2738  
  2739  // Fields allows partial responses to be retrieved. See
  2740  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2741  // details.
  2742  func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall {
  2743  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2744  	return c
  2745  }
  2746  
  2747  // Context sets the context to be used in this call's Do method.
  2748  func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall {
  2749  	c.ctx_ = ctx
  2750  	return c
  2751  }
  2752  
  2753  // Header returns a http.Header that can be modified by the caller to add
  2754  // headers to the request.
  2755  func (c *FoldersLocationsReplaysCreateCall) Header() http.Header {
  2756  	if c.header_ == nil {
  2757  		c.header_ = make(http.Header)
  2758  	}
  2759  	return c.header_
  2760  }
  2761  
  2762  func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  2763  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2764  	var body io.Reader = nil
  2765  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay)
  2766  	if err != nil {
  2767  		return nil, err
  2768  	}
  2769  	c.urlParams_.Set("alt", alt)
  2770  	c.urlParams_.Set("prettyPrint", "false")
  2771  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  2772  	urls += "?" + c.urlParams_.Encode()
  2773  	req, err := http.NewRequest("POST", urls, body)
  2774  	if err != nil {
  2775  		return nil, err
  2776  	}
  2777  	req.Header = reqHeaders
  2778  	googleapi.Expand(req.URL, map[string]string{
  2779  		"parent": c.parent,
  2780  	})
  2781  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2782  }
  2783  
  2784  // Do executes the "policysimulator.folders.locations.replays.create" call.
  2785  // Any non-2xx status code is an error. Response headers are in either
  2786  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2787  // returned at all) in error.(*googleapi.Error).Header. Use
  2788  // googleapi.IsNotModified to check whether the returned error was because
  2789  // http.StatusNotModified was returned.
  2790  func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2791  	gensupport.SetOptions(c.urlParams_, opts...)
  2792  	res, err := c.doRequest("json")
  2793  	if res != nil && res.StatusCode == http.StatusNotModified {
  2794  		if res.Body != nil {
  2795  			res.Body.Close()
  2796  		}
  2797  		return nil, gensupport.WrapError(&googleapi.Error{
  2798  			Code:   res.StatusCode,
  2799  			Header: res.Header,
  2800  		})
  2801  	}
  2802  	if err != nil {
  2803  		return nil, err
  2804  	}
  2805  	defer googleapi.CloseBody(res)
  2806  	if err := googleapi.CheckResponse(res); err != nil {
  2807  		return nil, gensupport.WrapError(err)
  2808  	}
  2809  	ret := &GoogleLongrunningOperation{
  2810  		ServerResponse: googleapi.ServerResponse{
  2811  			Header:         res.Header,
  2812  			HTTPStatusCode: res.StatusCode,
  2813  		},
  2814  	}
  2815  	target := &ret
  2816  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2817  		return nil, err
  2818  	}
  2819  	return ret, nil
  2820  }
  2821  
  2822  type FoldersLocationsReplaysGetCall struct {
  2823  	s            *Service
  2824  	name         string
  2825  	urlParams_   gensupport.URLParams
  2826  	ifNoneMatch_ string
  2827  	ctx_         context.Context
  2828  	header_      http.Header
  2829  }
  2830  
  2831  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  2832  // days.
  2833  //
  2834  //   - name: The name of the Replay to retrieve, in the following format:
  2835  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  2836  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  2837  //     organization that owns the `Replay`. Example:
  2838  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  2839  //     03-479ce1833c36`.
  2840  func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall {
  2841  	c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2842  	c.name = name
  2843  	return c
  2844  }
  2845  
  2846  // Fields allows partial responses to be retrieved. See
  2847  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2848  // details.
  2849  func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall {
  2850  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2851  	return c
  2852  }
  2853  
  2854  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2855  // object's ETag matches the given value. This is useful for getting updates
  2856  // only after the object has changed since the last request.
  2857  func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall {
  2858  	c.ifNoneMatch_ = entityTag
  2859  	return c
  2860  }
  2861  
  2862  // Context sets the context to be used in this call's Do method.
  2863  func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall {
  2864  	c.ctx_ = ctx
  2865  	return c
  2866  }
  2867  
  2868  // Header returns a http.Header that can be modified by the caller to add
  2869  // headers to the request.
  2870  func (c *FoldersLocationsReplaysGetCall) Header() http.Header {
  2871  	if c.header_ == nil {
  2872  		c.header_ = make(http.Header)
  2873  	}
  2874  	return c.header_
  2875  }
  2876  
  2877  func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  2878  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2879  	if c.ifNoneMatch_ != "" {
  2880  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2881  	}
  2882  	var body io.Reader = nil
  2883  	c.urlParams_.Set("alt", alt)
  2884  	c.urlParams_.Set("prettyPrint", "false")
  2885  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2886  	urls += "?" + c.urlParams_.Encode()
  2887  	req, err := http.NewRequest("GET", urls, body)
  2888  	if err != nil {
  2889  		return nil, err
  2890  	}
  2891  	req.Header = reqHeaders
  2892  	googleapi.Expand(req.URL, map[string]string{
  2893  		"name": c.name,
  2894  	})
  2895  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2896  }
  2897  
  2898  // Do executes the "policysimulator.folders.locations.replays.get" call.
  2899  // Any non-2xx status code is an error. Response headers are in either
  2900  // *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if a
  2901  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2902  // googleapi.IsNotModified to check whether the returned error was because
  2903  // http.StatusNotModified was returned.
  2904  func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) {
  2905  	gensupport.SetOptions(c.urlParams_, opts...)
  2906  	res, err := c.doRequest("json")
  2907  	if res != nil && res.StatusCode == http.StatusNotModified {
  2908  		if res.Body != nil {
  2909  			res.Body.Close()
  2910  		}
  2911  		return nil, gensupport.WrapError(&googleapi.Error{
  2912  			Code:   res.StatusCode,
  2913  			Header: res.Header,
  2914  		})
  2915  	}
  2916  	if err != nil {
  2917  		return nil, err
  2918  	}
  2919  	defer googleapi.CloseBody(res)
  2920  	if err := googleapi.CheckResponse(res); err != nil {
  2921  		return nil, gensupport.WrapError(err)
  2922  	}
  2923  	ret := &GoogleCloudPolicysimulatorV1betaReplay{
  2924  		ServerResponse: googleapi.ServerResponse{
  2925  			Header:         res.Header,
  2926  			HTTPStatusCode: res.StatusCode,
  2927  		},
  2928  	}
  2929  	target := &ret
  2930  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2931  		return nil, err
  2932  	}
  2933  	return ret, nil
  2934  }
  2935  
  2936  type FoldersLocationsReplaysListCall struct {
  2937  	s            *Service
  2938  	parent       string
  2939  	urlParams_   gensupport.URLParams
  2940  	ifNoneMatch_ string
  2941  	ctx_         context.Context
  2942  	header_      http.Header
  2943  }
  2944  
  2945  // List: Lists each Replay in a project, folder, or organization. Each `Replay`
  2946  // is available for at least 7 days.
  2947  //
  2948  //   - parent: The parent resource, in the following format:
  2949  //     `{projects|folders|organizations}/{resource-id}/locations/global`, where
  2950  //     `{resource-id}` is the ID of the project, folder, or organization that
  2951  //     owns the Replay. Example: `projects/my-example-project/locations/global`
  2952  //     Only `Replay` objects that are direct children of the provided parent are
  2953  //     listed. In other words, `Replay` objects that are children of a project
  2954  //     will not be included when the parent is a folder of that project.
  2955  func (r *FoldersLocationsReplaysService) List(parent string) *FoldersLocationsReplaysListCall {
  2956  	c := &FoldersLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2957  	c.parent = parent
  2958  	return c
  2959  }
  2960  
  2961  // PageSize sets the optional parameter "pageSize": The maximum number of
  2962  // Replay objects to return. Defaults to 50. The maximum value is 1000; values
  2963  // above 1000 are rounded down to 1000.
  2964  func (c *FoldersLocationsReplaysListCall) PageSize(pageSize int64) *FoldersLocationsReplaysListCall {
  2965  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2966  	return c
  2967  }
  2968  
  2969  // PageToken sets the optional parameter "pageToken": A page token, received
  2970  // from a previous Simulator.ListReplays call. Provide this to retrieve the
  2971  // subsequent page. When paginating, all other parameters provided to
  2972  // Simulator.ListReplays must match the call that provided the page token.
  2973  func (c *FoldersLocationsReplaysListCall) PageToken(pageToken string) *FoldersLocationsReplaysListCall {
  2974  	c.urlParams_.Set("pageToken", pageToken)
  2975  	return c
  2976  }
  2977  
  2978  // Fields allows partial responses to be retrieved. See
  2979  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2980  // details.
  2981  func (c *FoldersLocationsReplaysListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysListCall {
  2982  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2983  	return c
  2984  }
  2985  
  2986  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2987  // object's ETag matches the given value. This is useful for getting updates
  2988  // only after the object has changed since the last request.
  2989  func (c *FoldersLocationsReplaysListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysListCall {
  2990  	c.ifNoneMatch_ = entityTag
  2991  	return c
  2992  }
  2993  
  2994  // Context sets the context to be used in this call's Do method.
  2995  func (c *FoldersLocationsReplaysListCall) Context(ctx context.Context) *FoldersLocationsReplaysListCall {
  2996  	c.ctx_ = ctx
  2997  	return c
  2998  }
  2999  
  3000  // Header returns a http.Header that can be modified by the caller to add
  3001  // headers to the request.
  3002  func (c *FoldersLocationsReplaysListCall) Header() http.Header {
  3003  	if c.header_ == nil {
  3004  		c.header_ = make(http.Header)
  3005  	}
  3006  	return c.header_
  3007  }
  3008  
  3009  func (c *FoldersLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) {
  3010  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3011  	if c.ifNoneMatch_ != "" {
  3012  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3013  	}
  3014  	var body io.Reader = nil
  3015  	c.urlParams_.Set("alt", alt)
  3016  	c.urlParams_.Set("prettyPrint", "false")
  3017  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  3018  	urls += "?" + c.urlParams_.Encode()
  3019  	req, err := http.NewRequest("GET", urls, body)
  3020  	if err != nil {
  3021  		return nil, err
  3022  	}
  3023  	req.Header = reqHeaders
  3024  	googleapi.Expand(req.URL, map[string]string{
  3025  		"parent": c.parent,
  3026  	})
  3027  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3028  }
  3029  
  3030  // Do executes the "policysimulator.folders.locations.replays.list" call.
  3031  // Any non-2xx status code is an error. Response headers are in either
  3032  // *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.Header
  3033  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  3034  // Use googleapi.IsNotModified to check whether the returned error was because
  3035  // http.StatusNotModified was returned.
  3036  func (c *FoldersLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) {
  3037  	gensupport.SetOptions(c.urlParams_, opts...)
  3038  	res, err := c.doRequest("json")
  3039  	if res != nil && res.StatusCode == http.StatusNotModified {
  3040  		if res.Body != nil {
  3041  			res.Body.Close()
  3042  		}
  3043  		return nil, gensupport.WrapError(&googleapi.Error{
  3044  			Code:   res.StatusCode,
  3045  			Header: res.Header,
  3046  		})
  3047  	}
  3048  	if err != nil {
  3049  		return nil, err
  3050  	}
  3051  	defer googleapi.CloseBody(res)
  3052  	if err := googleapi.CheckResponse(res); err != nil {
  3053  		return nil, gensupport.WrapError(err)
  3054  	}
  3055  	ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{
  3056  		ServerResponse: googleapi.ServerResponse{
  3057  			Header:         res.Header,
  3058  			HTTPStatusCode: res.StatusCode,
  3059  		},
  3060  	}
  3061  	target := &ret
  3062  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3063  		return nil, err
  3064  	}
  3065  	return ret, nil
  3066  }
  3067  
  3068  // Pages invokes f for each page of results.
  3069  // A non-nil error returned from f will halt the iteration.
  3070  // The provided context supersedes any context provided to the Context method.
  3071  func (c *FoldersLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error {
  3072  	c.ctx_ = ctx
  3073  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3074  	for {
  3075  		x, err := c.Do()
  3076  		if err != nil {
  3077  			return err
  3078  		}
  3079  		if err := f(x); err != nil {
  3080  			return err
  3081  		}
  3082  		if x.NextPageToken == "" {
  3083  			return nil
  3084  		}
  3085  		c.PageToken(x.NextPageToken)
  3086  	}
  3087  }
  3088  
  3089  type FoldersLocationsReplaysOperationsGetCall struct {
  3090  	s            *Service
  3091  	name         string
  3092  	urlParams_   gensupport.URLParams
  3093  	ifNoneMatch_ string
  3094  	ctx_         context.Context
  3095  	header_      http.Header
  3096  }
  3097  
  3098  // Get: Gets the latest state of a long-running operation. Clients can use this
  3099  // method to poll the operation result at intervals as recommended by the API
  3100  // service.
  3101  //
  3102  // - name: The name of the operation resource.
  3103  func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall {
  3104  	c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3105  	c.name = name
  3106  	return c
  3107  }
  3108  
  3109  // Fields allows partial responses to be retrieved. See
  3110  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3111  // details.
  3112  func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall {
  3113  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3114  	return c
  3115  }
  3116  
  3117  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3118  // object's ETag matches the given value. This is useful for getting updates
  3119  // only after the object has changed since the last request.
  3120  func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall {
  3121  	c.ifNoneMatch_ = entityTag
  3122  	return c
  3123  }
  3124  
  3125  // Context sets the context to be used in this call's Do method.
  3126  func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall {
  3127  	c.ctx_ = ctx
  3128  	return c
  3129  }
  3130  
  3131  // Header returns a http.Header that can be modified by the caller to add
  3132  // headers to the request.
  3133  func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header {
  3134  	if c.header_ == nil {
  3135  		c.header_ = make(http.Header)
  3136  	}
  3137  	return c.header_
  3138  }
  3139  
  3140  func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3141  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3142  	if c.ifNoneMatch_ != "" {
  3143  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3144  	}
  3145  	var body io.Reader = nil
  3146  	c.urlParams_.Set("alt", alt)
  3147  	c.urlParams_.Set("prettyPrint", "false")
  3148  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3149  	urls += "?" + c.urlParams_.Encode()
  3150  	req, err := http.NewRequest("GET", urls, body)
  3151  	if err != nil {
  3152  		return nil, err
  3153  	}
  3154  	req.Header = reqHeaders
  3155  	googleapi.Expand(req.URL, map[string]string{
  3156  		"name": c.name,
  3157  	})
  3158  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3159  }
  3160  
  3161  // Do executes the "policysimulator.folders.locations.replays.operations.get" call.
  3162  // Any non-2xx status code is an error. Response headers are in either
  3163  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3164  // returned at all) in error.(*googleapi.Error).Header. Use
  3165  // googleapi.IsNotModified to check whether the returned error was because
  3166  // http.StatusNotModified was returned.
  3167  func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3168  	gensupport.SetOptions(c.urlParams_, opts...)
  3169  	res, err := c.doRequest("json")
  3170  	if res != nil && res.StatusCode == http.StatusNotModified {
  3171  		if res.Body != nil {
  3172  			res.Body.Close()
  3173  		}
  3174  		return nil, gensupport.WrapError(&googleapi.Error{
  3175  			Code:   res.StatusCode,
  3176  			Header: res.Header,
  3177  		})
  3178  	}
  3179  	if err != nil {
  3180  		return nil, err
  3181  	}
  3182  	defer googleapi.CloseBody(res)
  3183  	if err := googleapi.CheckResponse(res); err != nil {
  3184  		return nil, gensupport.WrapError(err)
  3185  	}
  3186  	ret := &GoogleLongrunningOperation{
  3187  		ServerResponse: googleapi.ServerResponse{
  3188  			Header:         res.Header,
  3189  			HTTPStatusCode: res.StatusCode,
  3190  		},
  3191  	}
  3192  	target := &ret
  3193  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3194  		return nil, err
  3195  	}
  3196  	return ret, nil
  3197  }
  3198  
  3199  type FoldersLocationsReplaysOperationsListCall struct {
  3200  	s            *Service
  3201  	name         string
  3202  	urlParams_   gensupport.URLParams
  3203  	ifNoneMatch_ string
  3204  	ctx_         context.Context
  3205  	header_      http.Header
  3206  }
  3207  
  3208  // List: Lists operations that match the specified filter in the request. If
  3209  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3210  //
  3211  // - name: The name of the operation's parent resource.
  3212  func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall {
  3213  	c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3214  	c.name = name
  3215  	return c
  3216  }
  3217  
  3218  // Filter sets the optional parameter "filter": The standard list filter.
  3219  func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall {
  3220  	c.urlParams_.Set("filter", filter)
  3221  	return c
  3222  }
  3223  
  3224  // PageSize sets the optional parameter "pageSize": The standard list page
  3225  // size.
  3226  func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall {
  3227  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3228  	return c
  3229  }
  3230  
  3231  // PageToken sets the optional parameter "pageToken": The standard list page
  3232  // token.
  3233  func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall {
  3234  	c.urlParams_.Set("pageToken", pageToken)
  3235  	return c
  3236  }
  3237  
  3238  // Fields allows partial responses to be retrieved. See
  3239  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3240  // details.
  3241  func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall {
  3242  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3243  	return c
  3244  }
  3245  
  3246  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3247  // object's ETag matches the given value. This is useful for getting updates
  3248  // only after the object has changed since the last request.
  3249  func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall {
  3250  	c.ifNoneMatch_ = entityTag
  3251  	return c
  3252  }
  3253  
  3254  // Context sets the context to be used in this call's Do method.
  3255  func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall {
  3256  	c.ctx_ = ctx
  3257  	return c
  3258  }
  3259  
  3260  // Header returns a http.Header that can be modified by the caller to add
  3261  // headers to the request.
  3262  func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header {
  3263  	if c.header_ == nil {
  3264  		c.header_ = make(http.Header)
  3265  	}
  3266  	return c.header_
  3267  }
  3268  
  3269  func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3270  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3271  	if c.ifNoneMatch_ != "" {
  3272  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3273  	}
  3274  	var body io.Reader = nil
  3275  	c.urlParams_.Set("alt", alt)
  3276  	c.urlParams_.Set("prettyPrint", "false")
  3277  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3278  	urls += "?" + c.urlParams_.Encode()
  3279  	req, err := http.NewRequest("GET", urls, body)
  3280  	if err != nil {
  3281  		return nil, err
  3282  	}
  3283  	req.Header = reqHeaders
  3284  	googleapi.Expand(req.URL, map[string]string{
  3285  		"name": c.name,
  3286  	})
  3287  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3288  }
  3289  
  3290  // Do executes the "policysimulator.folders.locations.replays.operations.list" call.
  3291  // Any non-2xx status code is an error. Response headers are in either
  3292  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  3293  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3294  // googleapi.IsNotModified to check whether the returned error was because
  3295  // http.StatusNotModified was returned.
  3296  func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  3297  	gensupport.SetOptions(c.urlParams_, opts...)
  3298  	res, err := c.doRequest("json")
  3299  	if res != nil && res.StatusCode == http.StatusNotModified {
  3300  		if res.Body != nil {
  3301  			res.Body.Close()
  3302  		}
  3303  		return nil, gensupport.WrapError(&googleapi.Error{
  3304  			Code:   res.StatusCode,
  3305  			Header: res.Header,
  3306  		})
  3307  	}
  3308  	if err != nil {
  3309  		return nil, err
  3310  	}
  3311  	defer googleapi.CloseBody(res)
  3312  	if err := googleapi.CheckResponse(res); err != nil {
  3313  		return nil, gensupport.WrapError(err)
  3314  	}
  3315  	ret := &GoogleLongrunningListOperationsResponse{
  3316  		ServerResponse: googleapi.ServerResponse{
  3317  			Header:         res.Header,
  3318  			HTTPStatusCode: res.StatusCode,
  3319  		},
  3320  	}
  3321  	target := &ret
  3322  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3323  		return nil, err
  3324  	}
  3325  	return ret, nil
  3326  }
  3327  
  3328  // Pages invokes f for each page of results.
  3329  // A non-nil error returned from f will halt the iteration.
  3330  // The provided context supersedes any context provided to the Context method.
  3331  func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  3332  	c.ctx_ = ctx
  3333  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3334  	for {
  3335  		x, err := c.Do()
  3336  		if err != nil {
  3337  			return err
  3338  		}
  3339  		if err := f(x); err != nil {
  3340  			return err
  3341  		}
  3342  		if x.NextPageToken == "" {
  3343  			return nil
  3344  		}
  3345  		c.PageToken(x.NextPageToken)
  3346  	}
  3347  }
  3348  
  3349  type FoldersLocationsReplaysResultsListCall struct {
  3350  	s            *Service
  3351  	parent       string
  3352  	urlParams_   gensupport.URLParams
  3353  	ifNoneMatch_ string
  3354  	ctx_         context.Context
  3355  	header_      http.Header
  3356  }
  3357  
  3358  // List: Lists the results of running a Replay.
  3359  //
  3360  //   - parent: The Replay whose results are listed, in the following format:
  3361  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  3362  //     eplay-id}` Example:
  3363  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  3364  //     1833c36`.
  3365  func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall {
  3366  	c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3367  	c.parent = parent
  3368  	return c
  3369  }
  3370  
  3371  // PageSize sets the optional parameter "pageSize": The maximum number of
  3372  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  3373  // values above 5000 are rounded down to 5000.
  3374  func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall {
  3375  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3376  	return c
  3377  }
  3378  
  3379  // PageToken sets the optional parameter "pageToken": A page token, received
  3380  // from a previous Simulator.ListReplayResults call. Provide this token to
  3381  // retrieve the next page of results. When paginating, all other parameters
  3382  // provided to [Simulator.ListReplayResults[] must match the call that provided
  3383  // the page token.
  3384  func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall {
  3385  	c.urlParams_.Set("pageToken", pageToken)
  3386  	return c
  3387  }
  3388  
  3389  // Fields allows partial responses to be retrieved. See
  3390  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3391  // details.
  3392  func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall {
  3393  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3394  	return c
  3395  }
  3396  
  3397  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3398  // object's ETag matches the given value. This is useful for getting updates
  3399  // only after the object has changed since the last request.
  3400  func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall {
  3401  	c.ifNoneMatch_ = entityTag
  3402  	return c
  3403  }
  3404  
  3405  // Context sets the context to be used in this call's Do method.
  3406  func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall {
  3407  	c.ctx_ = ctx
  3408  	return c
  3409  }
  3410  
  3411  // Header returns a http.Header that can be modified by the caller to add
  3412  // headers to the request.
  3413  func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header {
  3414  	if c.header_ == nil {
  3415  		c.header_ = make(http.Header)
  3416  	}
  3417  	return c.header_
  3418  }
  3419  
  3420  func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  3421  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3422  	if c.ifNoneMatch_ != "" {
  3423  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3424  	}
  3425  	var body io.Reader = nil
  3426  	c.urlParams_.Set("alt", alt)
  3427  	c.urlParams_.Set("prettyPrint", "false")
  3428  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results")
  3429  	urls += "?" + c.urlParams_.Encode()
  3430  	req, err := http.NewRequest("GET", urls, body)
  3431  	if err != nil {
  3432  		return nil, err
  3433  	}
  3434  	req.Header = reqHeaders
  3435  	googleapi.Expand(req.URL, map[string]string{
  3436  		"parent": c.parent,
  3437  	})
  3438  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3439  }
  3440  
  3441  // Do executes the "policysimulator.folders.locations.replays.results.list" call.
  3442  // Any non-2xx status code is an error. Response headers are in either
  3443  // *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerResponse.Hea
  3444  // der or (if a response was returned at all) in
  3445  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3446  // whether the returned error was because http.StatusNotModified was returned.
  3447  func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) {
  3448  	gensupport.SetOptions(c.urlParams_, opts...)
  3449  	res, err := c.doRequest("json")
  3450  	if res != nil && res.StatusCode == http.StatusNotModified {
  3451  		if res.Body != nil {
  3452  			res.Body.Close()
  3453  		}
  3454  		return nil, gensupport.WrapError(&googleapi.Error{
  3455  			Code:   res.StatusCode,
  3456  			Header: res.Header,
  3457  		})
  3458  	}
  3459  	if err != nil {
  3460  		return nil, err
  3461  	}
  3462  	defer googleapi.CloseBody(res)
  3463  	if err := googleapi.CheckResponse(res); err != nil {
  3464  		return nil, gensupport.WrapError(err)
  3465  	}
  3466  	ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{
  3467  		ServerResponse: googleapi.ServerResponse{
  3468  			Header:         res.Header,
  3469  			HTTPStatusCode: res.StatusCode,
  3470  		},
  3471  	}
  3472  	target := &ret
  3473  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3474  		return nil, err
  3475  	}
  3476  	return ret, nil
  3477  }
  3478  
  3479  // Pages invokes f for each page of results.
  3480  // A non-nil error returned from f will halt the iteration.
  3481  // The provided context supersedes any context provided to the Context method.
  3482  func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error {
  3483  	c.ctx_ = ctx
  3484  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3485  	for {
  3486  		x, err := c.Do()
  3487  		if err != nil {
  3488  			return err
  3489  		}
  3490  		if err := f(x); err != nil {
  3491  			return err
  3492  		}
  3493  		if x.NextPageToken == "" {
  3494  			return nil
  3495  		}
  3496  		c.PageToken(x.NextPageToken)
  3497  	}
  3498  }
  3499  
  3500  type OperationsGetCall struct {
  3501  	s            *Service
  3502  	name         string
  3503  	urlParams_   gensupport.URLParams
  3504  	ifNoneMatch_ string
  3505  	ctx_         context.Context
  3506  	header_      http.Header
  3507  }
  3508  
  3509  // Get: Gets the latest state of a long-running operation. Clients can use this
  3510  // method to poll the operation result at intervals as recommended by the API
  3511  // service.
  3512  //
  3513  // - name: The name of the operation resource.
  3514  func (r *OperationsService) Get(name string) *OperationsGetCall {
  3515  	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3516  	c.name = name
  3517  	return c
  3518  }
  3519  
  3520  // Fields allows partial responses to be retrieved. See
  3521  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3522  // details.
  3523  func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  3524  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3525  	return c
  3526  }
  3527  
  3528  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3529  // object's ETag matches the given value. This is useful for getting updates
  3530  // only after the object has changed since the last request.
  3531  func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  3532  	c.ifNoneMatch_ = entityTag
  3533  	return c
  3534  }
  3535  
  3536  // Context sets the context to be used in this call's Do method.
  3537  func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  3538  	c.ctx_ = ctx
  3539  	return c
  3540  }
  3541  
  3542  // Header returns a http.Header that can be modified by the caller to add
  3543  // headers to the request.
  3544  func (c *OperationsGetCall) Header() http.Header {
  3545  	if c.header_ == nil {
  3546  		c.header_ = make(http.Header)
  3547  	}
  3548  	return c.header_
  3549  }
  3550  
  3551  func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3552  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3553  	if c.ifNoneMatch_ != "" {
  3554  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3555  	}
  3556  	var body io.Reader = nil
  3557  	c.urlParams_.Set("alt", alt)
  3558  	c.urlParams_.Set("prettyPrint", "false")
  3559  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3560  	urls += "?" + c.urlParams_.Encode()
  3561  	req, err := http.NewRequest("GET", urls, body)
  3562  	if err != nil {
  3563  		return nil, err
  3564  	}
  3565  	req.Header = reqHeaders
  3566  	googleapi.Expand(req.URL, map[string]string{
  3567  		"name": c.name,
  3568  	})
  3569  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3570  }
  3571  
  3572  // Do executes the "policysimulator.operations.get" call.
  3573  // Any non-2xx status code is an error. Response headers are in either
  3574  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3575  // returned at all) in error.(*googleapi.Error).Header. Use
  3576  // googleapi.IsNotModified to check whether the returned error was because
  3577  // http.StatusNotModified was returned.
  3578  func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3579  	gensupport.SetOptions(c.urlParams_, opts...)
  3580  	res, err := c.doRequest("json")
  3581  	if res != nil && res.StatusCode == http.StatusNotModified {
  3582  		if res.Body != nil {
  3583  			res.Body.Close()
  3584  		}
  3585  		return nil, gensupport.WrapError(&googleapi.Error{
  3586  			Code:   res.StatusCode,
  3587  			Header: res.Header,
  3588  		})
  3589  	}
  3590  	if err != nil {
  3591  		return nil, err
  3592  	}
  3593  	defer googleapi.CloseBody(res)
  3594  	if err := googleapi.CheckResponse(res); err != nil {
  3595  		return nil, gensupport.WrapError(err)
  3596  	}
  3597  	ret := &GoogleLongrunningOperation{
  3598  		ServerResponse: googleapi.ServerResponse{
  3599  			Header:         res.Header,
  3600  			HTTPStatusCode: res.StatusCode,
  3601  		},
  3602  	}
  3603  	target := &ret
  3604  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3605  		return nil, err
  3606  	}
  3607  	return ret, nil
  3608  }
  3609  
  3610  type OperationsListCall struct {
  3611  	s            *Service
  3612  	name         string
  3613  	urlParams_   gensupport.URLParams
  3614  	ifNoneMatch_ string
  3615  	ctx_         context.Context
  3616  	header_      http.Header
  3617  }
  3618  
  3619  // List: Lists operations that match the specified filter in the request. If
  3620  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3621  //
  3622  // - name: The name of the operation's parent resource.
  3623  func (r *OperationsService) List(name string) *OperationsListCall {
  3624  	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3625  	c.name = name
  3626  	return c
  3627  }
  3628  
  3629  // Filter sets the optional parameter "filter": The standard list filter.
  3630  func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  3631  	c.urlParams_.Set("filter", filter)
  3632  	return c
  3633  }
  3634  
  3635  // PageSize sets the optional parameter "pageSize": The standard list page
  3636  // size.
  3637  func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  3638  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3639  	return c
  3640  }
  3641  
  3642  // PageToken sets the optional parameter "pageToken": The standard list page
  3643  // token.
  3644  func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  3645  	c.urlParams_.Set("pageToken", pageToken)
  3646  	return c
  3647  }
  3648  
  3649  // Fields allows partial responses to be retrieved. See
  3650  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3651  // details.
  3652  func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  3653  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3654  	return c
  3655  }
  3656  
  3657  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3658  // object's ETag matches the given value. This is useful for getting updates
  3659  // only after the object has changed since the last request.
  3660  func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  3661  	c.ifNoneMatch_ = entityTag
  3662  	return c
  3663  }
  3664  
  3665  // Context sets the context to be used in this call's Do method.
  3666  func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  3667  	c.ctx_ = ctx
  3668  	return c
  3669  }
  3670  
  3671  // Header returns a http.Header that can be modified by the caller to add
  3672  // headers to the request.
  3673  func (c *OperationsListCall) Header() http.Header {
  3674  	if c.header_ == nil {
  3675  		c.header_ = make(http.Header)
  3676  	}
  3677  	return c.header_
  3678  }
  3679  
  3680  func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  3681  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3682  	if c.ifNoneMatch_ != "" {
  3683  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3684  	}
  3685  	var body io.Reader = nil
  3686  	c.urlParams_.Set("alt", alt)
  3687  	c.urlParams_.Set("prettyPrint", "false")
  3688  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3689  	urls += "?" + c.urlParams_.Encode()
  3690  	req, err := http.NewRequest("GET", urls, body)
  3691  	if err != nil {
  3692  		return nil, err
  3693  	}
  3694  	req.Header = reqHeaders
  3695  	googleapi.Expand(req.URL, map[string]string{
  3696  		"name": c.name,
  3697  	})
  3698  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3699  }
  3700  
  3701  // Do executes the "policysimulator.operations.list" call.
  3702  // Any non-2xx status code is an error. Response headers are in either
  3703  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  3704  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3705  // googleapi.IsNotModified to check whether the returned error was because
  3706  // http.StatusNotModified was returned.
  3707  func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  3708  	gensupport.SetOptions(c.urlParams_, opts...)
  3709  	res, err := c.doRequest("json")
  3710  	if res != nil && res.StatusCode == http.StatusNotModified {
  3711  		if res.Body != nil {
  3712  			res.Body.Close()
  3713  		}
  3714  		return nil, gensupport.WrapError(&googleapi.Error{
  3715  			Code:   res.StatusCode,
  3716  			Header: res.Header,
  3717  		})
  3718  	}
  3719  	if err != nil {
  3720  		return nil, err
  3721  	}
  3722  	defer googleapi.CloseBody(res)
  3723  	if err := googleapi.CheckResponse(res); err != nil {
  3724  		return nil, gensupport.WrapError(err)
  3725  	}
  3726  	ret := &GoogleLongrunningListOperationsResponse{
  3727  		ServerResponse: googleapi.ServerResponse{
  3728  			Header:         res.Header,
  3729  			HTTPStatusCode: res.StatusCode,
  3730  		},
  3731  	}
  3732  	target := &ret
  3733  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3734  		return nil, err
  3735  	}
  3736  	return ret, nil
  3737  }
  3738  
  3739  // Pages invokes f for each page of results.
  3740  // A non-nil error returned from f will halt the iteration.
  3741  // The provided context supersedes any context provided to the Context method.
  3742  func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  3743  	c.ctx_ = ctx
  3744  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3745  	for {
  3746  		x, err := c.Do()
  3747  		if err != nil {
  3748  			return err
  3749  		}
  3750  		if err := f(x); err != nil {
  3751  			return err
  3752  		}
  3753  		if x.NextPageToken == "" {
  3754  			return nil
  3755  		}
  3756  		c.PageToken(x.NextPageToken)
  3757  	}
  3758  }
  3759  
  3760  type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct {
  3761  	s                                                          *Service
  3762  	parent                                                     string
  3763  	googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
  3764  	urlParams_                                                 gensupport.URLParams
  3765  	ctx_                                                       context.Context
  3766  	header_                                                    http.Header
  3767  }
  3768  
  3769  // Create: CreateOrgPolicyViolationsPreview creates an
  3770  // OrgPolicyViolationsPreview for the proposed changes in the provided
  3771  // OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are
  3772  // specified by this `OrgPolicyOverlay`. The resources to scan are inferred
  3773  // from these specified changes.
  3774  //
  3775  //   - parent: The organization under which this OrgPolicyViolationsPreview will
  3776  //     be created. Example: `organizations/my-example-org/locations/global`.
  3777  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3778  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3779  	c.parent = parent
  3780  	c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview
  3781  	return c
  3782  }
  3783  
  3784  // OrgPolicyViolationsPreviewId sets the optional parameter
  3785  // "orgPolicyViolationsPreviewId": An optional user-specified ID for the
  3786  // OrgPolicyViolationsPreview. If not provided, a random ID will be generated.
  3787  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3788  	c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId)
  3789  	return c
  3790  }
  3791  
  3792  // Fields allows partial responses to be retrieved. See
  3793  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3794  // details.
  3795  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3796  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3797  	return c
  3798  }
  3799  
  3800  // Context sets the context to be used in this call's Do method.
  3801  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall {
  3802  	c.ctx_ = ctx
  3803  	return c
  3804  }
  3805  
  3806  // Header returns a http.Header that can be modified by the caller to add
  3807  // headers to the request.
  3808  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header {
  3809  	if c.header_ == nil {
  3810  		c.header_ = make(http.Header)
  3811  	}
  3812  	return c.header_
  3813  }
  3814  
  3815  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) {
  3816  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3817  	var body io.Reader = nil
  3818  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview)
  3819  	if err != nil {
  3820  		return nil, err
  3821  	}
  3822  	c.urlParams_.Set("alt", alt)
  3823  	c.urlParams_.Set("prettyPrint", "false")
  3824  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews")
  3825  	urls += "?" + c.urlParams_.Encode()
  3826  	req, err := http.NewRequest("POST", urls, body)
  3827  	if err != nil {
  3828  		return nil, err
  3829  	}
  3830  	req.Header = reqHeaders
  3831  	googleapi.Expand(req.URL, map[string]string{
  3832  		"parent": c.parent,
  3833  	})
  3834  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3835  }
  3836  
  3837  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call.
  3838  // Any non-2xx status code is an error. Response headers are in either
  3839  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3840  // returned at all) in error.(*googleapi.Error).Header. Use
  3841  // googleapi.IsNotModified to check whether the returned error was because
  3842  // http.StatusNotModified was returned.
  3843  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3844  	gensupport.SetOptions(c.urlParams_, opts...)
  3845  	res, err := c.doRequest("json")
  3846  	if res != nil && res.StatusCode == http.StatusNotModified {
  3847  		if res.Body != nil {
  3848  			res.Body.Close()
  3849  		}
  3850  		return nil, gensupport.WrapError(&googleapi.Error{
  3851  			Code:   res.StatusCode,
  3852  			Header: res.Header,
  3853  		})
  3854  	}
  3855  	if err != nil {
  3856  		return nil, err
  3857  	}
  3858  	defer googleapi.CloseBody(res)
  3859  	if err := googleapi.CheckResponse(res); err != nil {
  3860  		return nil, gensupport.WrapError(err)
  3861  	}
  3862  	ret := &GoogleLongrunningOperation{
  3863  		ServerResponse: googleapi.ServerResponse{
  3864  			Header:         res.Header,
  3865  			HTTPStatusCode: res.StatusCode,
  3866  		},
  3867  	}
  3868  	target := &ret
  3869  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3870  		return nil, err
  3871  	}
  3872  	return ret, nil
  3873  }
  3874  
  3875  type OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall struct {
  3876  	s                                                          *Service
  3877  	parent                                                     string
  3878  	googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
  3879  	urlParams_                                                 gensupport.URLParams
  3880  	ctx_                                                       context.Context
  3881  	header_                                                    http.Header
  3882  }
  3883  
  3884  // Generate: GenerateOrgPolicyViolationsPreview generates an
  3885  // OrgPolicyViolationsPreview for the proposed changes in the provided
  3886  // OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are
  3887  // specified by this `OrgPolicyOverlay`. The resources to scan are inferred
  3888  // from these specified changes.
  3889  //
  3890  //   - parent: The organization under which this OrgPolicyViolationsPreview will
  3891  //     be created. Example: `organizations/my-example-org/locations/global`.
  3892  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Generate(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall {
  3893  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3894  	c.parent = parent
  3895  	c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview
  3896  	return c
  3897  }
  3898  
  3899  // Fields allows partial responses to be retrieved. See
  3900  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3901  // details.
  3902  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall {
  3903  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3904  	return c
  3905  }
  3906  
  3907  // Context sets the context to be used in this call's Do method.
  3908  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall {
  3909  	c.ctx_ = ctx
  3910  	return c
  3911  }
  3912  
  3913  // Header returns a http.Header that can be modified by the caller to add
  3914  // headers to the request.
  3915  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall) Header() http.Header {
  3916  	if c.header_ == nil {
  3917  		c.header_ = make(http.Header)
  3918  	}
  3919  	return c.header_
  3920  }
  3921  
  3922  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall) doRequest(alt string) (*http.Response, error) {
  3923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3924  	var body io.Reader = nil
  3925  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview)
  3926  	if err != nil {
  3927  		return nil, err
  3928  	}
  3929  	c.urlParams_.Set("alt", alt)
  3930  	c.urlParams_.Set("prettyPrint", "false")
  3931  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews:generate")
  3932  	urls += "?" + c.urlParams_.Encode()
  3933  	req, err := http.NewRequest("POST", urls, body)
  3934  	if err != nil {
  3935  		return nil, err
  3936  	}
  3937  	req.Header = reqHeaders
  3938  	googleapi.Expand(req.URL, map[string]string{
  3939  		"parent": c.parent,
  3940  	})
  3941  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3942  }
  3943  
  3944  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.generate" call.
  3945  // Any non-2xx status code is an error. Response headers are in either
  3946  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3947  // returned at all) in error.(*googleapi.Error).Header. Use
  3948  // googleapi.IsNotModified to check whether the returned error was because
  3949  // http.StatusNotModified was returned.
  3950  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGenerateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3951  	gensupport.SetOptions(c.urlParams_, opts...)
  3952  	res, err := c.doRequest("json")
  3953  	if res != nil && res.StatusCode == http.StatusNotModified {
  3954  		if res.Body != nil {
  3955  			res.Body.Close()
  3956  		}
  3957  		return nil, gensupport.WrapError(&googleapi.Error{
  3958  			Code:   res.StatusCode,
  3959  			Header: res.Header,
  3960  		})
  3961  	}
  3962  	if err != nil {
  3963  		return nil, err
  3964  	}
  3965  	defer googleapi.CloseBody(res)
  3966  	if err := googleapi.CheckResponse(res); err != nil {
  3967  		return nil, gensupport.WrapError(err)
  3968  	}
  3969  	ret := &GoogleLongrunningOperation{
  3970  		ServerResponse: googleapi.ServerResponse{
  3971  			Header:         res.Header,
  3972  			HTTPStatusCode: res.StatusCode,
  3973  		},
  3974  	}
  3975  	target := &ret
  3976  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3977  		return nil, err
  3978  	}
  3979  	return ret, nil
  3980  }
  3981  
  3982  type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct {
  3983  	s            *Service
  3984  	name         string
  3985  	urlParams_   gensupport.URLParams
  3986  	ifNoneMatch_ string
  3987  	ctx_         context.Context
  3988  	header_      http.Header
  3989  }
  3990  
  3991  // Get: GetOrgPolicyViolationsPreview gets the specified
  3992  // OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for
  3993  // at least 7 days.
  3994  //
  3995  // - name: The name of the OrgPolicyViolationsPreview to get.
  3996  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  3997  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3998  	c.name = name
  3999  	return c
  4000  }
  4001  
  4002  // Fields allows partial responses to be retrieved. See
  4003  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4004  // details.
  4005  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  4006  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4007  	return c
  4008  }
  4009  
  4010  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4011  // object's ETag matches the given value. This is useful for getting updates
  4012  // only after the object has changed since the last request.
  4013  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  4014  	c.ifNoneMatch_ = entityTag
  4015  	return c
  4016  }
  4017  
  4018  // Context sets the context to be used in this call's Do method.
  4019  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall {
  4020  	c.ctx_ = ctx
  4021  	return c
  4022  }
  4023  
  4024  // Header returns a http.Header that can be modified by the caller to add
  4025  // headers to the request.
  4026  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header {
  4027  	if c.header_ == nil {
  4028  		c.header_ = make(http.Header)
  4029  	}
  4030  	return c.header_
  4031  }
  4032  
  4033  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) {
  4034  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4035  	if c.ifNoneMatch_ != "" {
  4036  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4037  	}
  4038  	var body io.Reader = nil
  4039  	c.urlParams_.Set("alt", alt)
  4040  	c.urlParams_.Set("prettyPrint", "false")
  4041  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4042  	urls += "?" + c.urlParams_.Encode()
  4043  	req, err := http.NewRequest("GET", urls, body)
  4044  	if err != nil {
  4045  		return nil, err
  4046  	}
  4047  	req.Header = reqHeaders
  4048  	googleapi.Expand(req.URL, map[string]string{
  4049  		"name": c.name,
  4050  	})
  4051  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4052  }
  4053  
  4054  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call.
  4055  // Any non-2xx status code is an error. Response headers are in either
  4056  // *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.ServerResponse.He
  4057  // ader or (if a response was returned at all) in
  4058  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4059  // whether the returned error was because http.StatusNotModified was returned.
  4060  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview, error) {
  4061  	gensupport.SetOptions(c.urlParams_, opts...)
  4062  	res, err := c.doRequest("json")
  4063  	if res != nil && res.StatusCode == http.StatusNotModified {
  4064  		if res.Body != nil {
  4065  			res.Body.Close()
  4066  		}
  4067  		return nil, gensupport.WrapError(&googleapi.Error{
  4068  			Code:   res.StatusCode,
  4069  			Header: res.Header,
  4070  		})
  4071  	}
  4072  	if err != nil {
  4073  		return nil, err
  4074  	}
  4075  	defer googleapi.CloseBody(res)
  4076  	if err := googleapi.CheckResponse(res); err != nil {
  4077  		return nil, gensupport.WrapError(err)
  4078  	}
  4079  	ret := &GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview{
  4080  		ServerResponse: googleapi.ServerResponse{
  4081  			Header:         res.Header,
  4082  			HTTPStatusCode: res.StatusCode,
  4083  		},
  4084  	}
  4085  	target := &ret
  4086  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4087  		return nil, err
  4088  	}
  4089  	return ret, nil
  4090  }
  4091  
  4092  type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct {
  4093  	s            *Service
  4094  	parent       string
  4095  	urlParams_   gensupport.URLParams
  4096  	ifNoneMatch_ string
  4097  	ctx_         context.Context
  4098  	header_      http.Header
  4099  }
  4100  
  4101  // List: ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview
  4102  // in an organization. Each OrgPolicyViolationsPreview is available for at
  4103  // least 7 days.
  4104  //
  4105  //   - parent: The parent the violations are scoped to. Format:
  4106  //     `organizations/{organization}/locations/{location}` Example:
  4107  //     `organizations/my-example-org/locations/global`.
  4108  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4109  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4110  	c.parent = parent
  4111  	return c
  4112  }
  4113  
  4114  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4115  // to return. The service may return fewer than this value. If unspecified, at
  4116  // most 5 items will be returned. The maximum value is 10; values above 10 will
  4117  // be coerced to 10.
  4118  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4119  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4120  	return c
  4121  }
  4122  
  4123  // PageToken sets the optional parameter "pageToken": A page token, received
  4124  // from a previous call. Provide this to retrieve the subsequent page. When
  4125  // paginating, all other parameters must match the call that provided the page
  4126  // token.
  4127  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4128  	c.urlParams_.Set("pageToken", pageToken)
  4129  	return c
  4130  }
  4131  
  4132  // Fields allows partial responses to be retrieved. See
  4133  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4134  // details.
  4135  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4136  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4137  	return c
  4138  }
  4139  
  4140  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4141  // object's ETag matches the given value. This is useful for getting updates
  4142  // only after the object has changed since the last request.
  4143  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4144  	c.ifNoneMatch_ = entityTag
  4145  	return c
  4146  }
  4147  
  4148  // Context sets the context to be used in this call's Do method.
  4149  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall {
  4150  	c.ctx_ = ctx
  4151  	return c
  4152  }
  4153  
  4154  // Header returns a http.Header that can be modified by the caller to add
  4155  // headers to the request.
  4156  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header {
  4157  	if c.header_ == nil {
  4158  		c.header_ = make(http.Header)
  4159  	}
  4160  	return c.header_
  4161  }
  4162  
  4163  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) {
  4164  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4165  	if c.ifNoneMatch_ != "" {
  4166  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4167  	}
  4168  	var body io.Reader = nil
  4169  	c.urlParams_.Set("alt", alt)
  4170  	c.urlParams_.Set("prettyPrint", "false")
  4171  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews")
  4172  	urls += "?" + c.urlParams_.Encode()
  4173  	req, err := http.NewRequest("GET", urls, body)
  4174  	if err != nil {
  4175  		return nil, err
  4176  	}
  4177  	req.Header = reqHeaders
  4178  	googleapi.Expand(req.URL, map[string]string{
  4179  		"parent": c.parent,
  4180  	})
  4181  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4182  }
  4183  
  4184  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call.
  4185  // Any non-2xx status code is an error. Response headers are in either
  4186  // *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse.Serv
  4187  // erResponse.Header or (if a response was returned at all) in
  4188  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4189  // whether the returned error was because http.StatusNotModified was returned.
  4190  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse, error) {
  4191  	gensupport.SetOptions(c.urlParams_, opts...)
  4192  	res, err := c.doRequest("json")
  4193  	if res != nil && res.StatusCode == http.StatusNotModified {
  4194  		if res.Body != nil {
  4195  			res.Body.Close()
  4196  		}
  4197  		return nil, gensupport.WrapError(&googleapi.Error{
  4198  			Code:   res.StatusCode,
  4199  			Header: res.Header,
  4200  		})
  4201  	}
  4202  	if err != nil {
  4203  		return nil, err
  4204  	}
  4205  	defer googleapi.CloseBody(res)
  4206  	if err := googleapi.CheckResponse(res); err != nil {
  4207  		return nil, gensupport.WrapError(err)
  4208  	}
  4209  	ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse{
  4210  		ServerResponse: googleapi.ServerResponse{
  4211  			Header:         res.Header,
  4212  			HTTPStatusCode: res.StatusCode,
  4213  		},
  4214  	}
  4215  	target := &ret
  4216  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4217  		return nil, err
  4218  	}
  4219  	return ret, nil
  4220  }
  4221  
  4222  // Pages invokes f for each page of results.
  4223  // A non-nil error returned from f will halt the iteration.
  4224  // The provided context supersedes any context provided to the Context method.
  4225  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) error) error {
  4226  	c.ctx_ = ctx
  4227  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4228  	for {
  4229  		x, err := c.Do()
  4230  		if err != nil {
  4231  			return err
  4232  		}
  4233  		if err := f(x); err != nil {
  4234  			return err
  4235  		}
  4236  		if x.NextPageToken == "" {
  4237  			return nil
  4238  		}
  4239  		c.PageToken(x.NextPageToken)
  4240  	}
  4241  }
  4242  
  4243  type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  4244  	s            *Service
  4245  	name         string
  4246  	urlParams_   gensupport.URLParams
  4247  	ifNoneMatch_ string
  4248  	ctx_         context.Context
  4249  	header_      http.Header
  4250  }
  4251  
  4252  // Get: Gets the latest state of a long-running operation. Clients can use this
  4253  // method to poll the operation result at intervals as recommended by the API
  4254  // service.
  4255  //
  4256  // - name: The name of the operation resource.
  4257  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4258  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4259  	c.name = name
  4260  	return c
  4261  }
  4262  
  4263  // Fields allows partial responses to be retrieved. See
  4264  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4265  // details.
  4266  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4267  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4268  	return c
  4269  }
  4270  
  4271  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4272  // object's ETag matches the given value. This is useful for getting updates
  4273  // only after the object has changed since the last request.
  4274  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4275  	c.ifNoneMatch_ = entityTag
  4276  	return c
  4277  }
  4278  
  4279  // Context sets the context to be used in this call's Do method.
  4280  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  4281  	c.ctx_ = ctx
  4282  	return c
  4283  }
  4284  
  4285  // Header returns a http.Header that can be modified by the caller to add
  4286  // headers to the request.
  4287  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  4288  	if c.header_ == nil {
  4289  		c.header_ = make(http.Header)
  4290  	}
  4291  	return c.header_
  4292  }
  4293  
  4294  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4295  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4296  	if c.ifNoneMatch_ != "" {
  4297  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4298  	}
  4299  	var body io.Reader = nil
  4300  	c.urlParams_.Set("alt", alt)
  4301  	c.urlParams_.Set("prettyPrint", "false")
  4302  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4303  	urls += "?" + c.urlParams_.Encode()
  4304  	req, err := http.NewRequest("GET", urls, body)
  4305  	if err != nil {
  4306  		return nil, err
  4307  	}
  4308  	req.Header = reqHeaders
  4309  	googleapi.Expand(req.URL, map[string]string{
  4310  		"name": c.name,
  4311  	})
  4312  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4313  }
  4314  
  4315  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call.
  4316  // Any non-2xx status code is an error. Response headers are in either
  4317  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4318  // returned at all) in error.(*googleapi.Error).Header. Use
  4319  // googleapi.IsNotModified to check whether the returned error was because
  4320  // http.StatusNotModified was returned.
  4321  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4322  	gensupport.SetOptions(c.urlParams_, opts...)
  4323  	res, err := c.doRequest("json")
  4324  	if res != nil && res.StatusCode == http.StatusNotModified {
  4325  		if res.Body != nil {
  4326  			res.Body.Close()
  4327  		}
  4328  		return nil, gensupport.WrapError(&googleapi.Error{
  4329  			Code:   res.StatusCode,
  4330  			Header: res.Header,
  4331  		})
  4332  	}
  4333  	if err != nil {
  4334  		return nil, err
  4335  	}
  4336  	defer googleapi.CloseBody(res)
  4337  	if err := googleapi.CheckResponse(res); err != nil {
  4338  		return nil, gensupport.WrapError(err)
  4339  	}
  4340  	ret := &GoogleLongrunningOperation{
  4341  		ServerResponse: googleapi.ServerResponse{
  4342  			Header:         res.Header,
  4343  			HTTPStatusCode: res.StatusCode,
  4344  		},
  4345  	}
  4346  	target := &ret
  4347  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4348  		return nil, err
  4349  	}
  4350  	return ret, nil
  4351  }
  4352  
  4353  type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct {
  4354  	s            *Service
  4355  	parent       string
  4356  	urlParams_   gensupport.URLParams
  4357  	ifNoneMatch_ string
  4358  	ctx_         context.Context
  4359  	header_      http.Header
  4360  }
  4361  
  4362  // List: ListOrgPolicyViolations lists the OrgPolicyViolations that are present
  4363  // in an OrgPolicyViolationsPreview.
  4364  //
  4365  //   - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations from.
  4366  //     Format:
  4367  //     organizations/{organization}/locations/{location}/orgPolicyViolationsPrevie
  4368  //     ws/{orgPolicyViolationsPreview}.
  4369  func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4370  	c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4371  	c.parent = parent
  4372  	return c
  4373  }
  4374  
  4375  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4376  // to return. The service may return fewer than this value. If unspecified, at
  4377  // most 50 items will be returned. The maximum value is 1000; values above 1000
  4378  // will be coerced to 1000.
  4379  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4380  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4381  	return c
  4382  }
  4383  
  4384  // PageToken sets the optional parameter "pageToken": A page token, received
  4385  // from a previous call. Provide this to retrieve the subsequent page. When
  4386  // paginating, all other parameters must match the call that provided the page
  4387  // token.
  4388  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4389  	c.urlParams_.Set("pageToken", pageToken)
  4390  	return c
  4391  }
  4392  
  4393  // Fields allows partial responses to be retrieved. See
  4394  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4395  // details.
  4396  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4397  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4398  	return c
  4399  }
  4400  
  4401  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4402  // object's ETag matches the given value. This is useful for getting updates
  4403  // only after the object has changed since the last request.
  4404  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4405  	c.ifNoneMatch_ = entityTag
  4406  	return c
  4407  }
  4408  
  4409  // Context sets the context to be used in this call's Do method.
  4410  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall {
  4411  	c.ctx_ = ctx
  4412  	return c
  4413  }
  4414  
  4415  // Header returns a http.Header that can be modified by the caller to add
  4416  // headers to the request.
  4417  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header {
  4418  	if c.header_ == nil {
  4419  		c.header_ = make(http.Header)
  4420  	}
  4421  	return c.header_
  4422  }
  4423  
  4424  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) {
  4425  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4426  	if c.ifNoneMatch_ != "" {
  4427  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4428  	}
  4429  	var body io.Reader = nil
  4430  	c.urlParams_.Set("alt", alt)
  4431  	c.urlParams_.Set("prettyPrint", "false")
  4432  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolations")
  4433  	urls += "?" + c.urlParams_.Encode()
  4434  	req, err := http.NewRequest("GET", urls, body)
  4435  	if err != nil {
  4436  		return nil, err
  4437  	}
  4438  	req.Header = reqHeaders
  4439  	googleapi.Expand(req.URL, map[string]string{
  4440  		"parent": c.parent,
  4441  	})
  4442  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4443  }
  4444  
  4445  // Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call.
  4446  // Any non-2xx status code is an error. Response headers are in either
  4447  // *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse.ServerRespon
  4448  // se.Header or (if a response was returned at all) in
  4449  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4450  // whether the returned error was because http.StatusNotModified was returned.
  4451  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse, error) {
  4452  	gensupport.SetOptions(c.urlParams_, opts...)
  4453  	res, err := c.doRequest("json")
  4454  	if res != nil && res.StatusCode == http.StatusNotModified {
  4455  		if res.Body != nil {
  4456  			res.Body.Close()
  4457  		}
  4458  		return nil, gensupport.WrapError(&googleapi.Error{
  4459  			Code:   res.StatusCode,
  4460  			Header: res.Header,
  4461  		})
  4462  	}
  4463  	if err != nil {
  4464  		return nil, err
  4465  	}
  4466  	defer googleapi.CloseBody(res)
  4467  	if err := googleapi.CheckResponse(res); err != nil {
  4468  		return nil, gensupport.WrapError(err)
  4469  	}
  4470  	ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse{
  4471  		ServerResponse: googleapi.ServerResponse{
  4472  			Header:         res.Header,
  4473  			HTTPStatusCode: res.StatusCode,
  4474  		},
  4475  	}
  4476  	target := &ret
  4477  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4478  		return nil, err
  4479  	}
  4480  	return ret, nil
  4481  }
  4482  
  4483  // Pages invokes f for each page of results.
  4484  // A non-nil error returned from f will halt the iteration.
  4485  // The provided context supersedes any context provided to the Context method.
  4486  func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) error) error {
  4487  	c.ctx_ = ctx
  4488  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4489  	for {
  4490  		x, err := c.Do()
  4491  		if err != nil {
  4492  			return err
  4493  		}
  4494  		if err := f(x); err != nil {
  4495  			return err
  4496  		}
  4497  		if x.NextPageToken == "" {
  4498  			return nil
  4499  		}
  4500  		c.PageToken(x.NextPageToken)
  4501  	}
  4502  }
  4503  
  4504  type OrganizationsLocationsReplaysCreateCall struct {
  4505  	s                                      *Service
  4506  	parent                                 string
  4507  	googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay
  4508  	urlParams_                             gensupport.URLParams
  4509  	ctx_                                   context.Context
  4510  	header_                                http.Header
  4511  }
  4512  
  4513  // Create: Creates and starts a Replay using the given ReplayConfig.
  4514  //
  4515  //   - parent: The parent resource where this Replay will be created. This
  4516  //     resource must be a project, folder, or organization with a location.
  4517  //     Example: `projects/my-example-project/locations/global`.
  4518  func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *OrganizationsLocationsReplaysCreateCall {
  4519  	c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4520  	c.parent = parent
  4521  	c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay
  4522  	return c
  4523  }
  4524  
  4525  // Fields allows partial responses to be retrieved. See
  4526  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4527  // details.
  4528  func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall {
  4529  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4530  	return c
  4531  }
  4532  
  4533  // Context sets the context to be used in this call's Do method.
  4534  func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall {
  4535  	c.ctx_ = ctx
  4536  	return c
  4537  }
  4538  
  4539  // Header returns a http.Header that can be modified by the caller to add
  4540  // headers to the request.
  4541  func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header {
  4542  	if c.header_ == nil {
  4543  		c.header_ = make(http.Header)
  4544  	}
  4545  	return c.header_
  4546  }
  4547  
  4548  func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  4549  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4550  	var body io.Reader = nil
  4551  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay)
  4552  	if err != nil {
  4553  		return nil, err
  4554  	}
  4555  	c.urlParams_.Set("alt", alt)
  4556  	c.urlParams_.Set("prettyPrint", "false")
  4557  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  4558  	urls += "?" + c.urlParams_.Encode()
  4559  	req, err := http.NewRequest("POST", urls, body)
  4560  	if err != nil {
  4561  		return nil, err
  4562  	}
  4563  	req.Header = reqHeaders
  4564  	googleapi.Expand(req.URL, map[string]string{
  4565  		"parent": c.parent,
  4566  	})
  4567  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4568  }
  4569  
  4570  // Do executes the "policysimulator.organizations.locations.replays.create" call.
  4571  // Any non-2xx status code is an error. Response headers are in either
  4572  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4573  // returned at all) in error.(*googleapi.Error).Header. Use
  4574  // googleapi.IsNotModified to check whether the returned error was because
  4575  // http.StatusNotModified was returned.
  4576  func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4577  	gensupport.SetOptions(c.urlParams_, opts...)
  4578  	res, err := c.doRequest("json")
  4579  	if res != nil && res.StatusCode == http.StatusNotModified {
  4580  		if res.Body != nil {
  4581  			res.Body.Close()
  4582  		}
  4583  		return nil, gensupport.WrapError(&googleapi.Error{
  4584  			Code:   res.StatusCode,
  4585  			Header: res.Header,
  4586  		})
  4587  	}
  4588  	if err != nil {
  4589  		return nil, err
  4590  	}
  4591  	defer googleapi.CloseBody(res)
  4592  	if err := googleapi.CheckResponse(res); err != nil {
  4593  		return nil, gensupport.WrapError(err)
  4594  	}
  4595  	ret := &GoogleLongrunningOperation{
  4596  		ServerResponse: googleapi.ServerResponse{
  4597  			Header:         res.Header,
  4598  			HTTPStatusCode: res.StatusCode,
  4599  		},
  4600  	}
  4601  	target := &ret
  4602  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4603  		return nil, err
  4604  	}
  4605  	return ret, nil
  4606  }
  4607  
  4608  type OrganizationsLocationsReplaysGetCall struct {
  4609  	s            *Service
  4610  	name         string
  4611  	urlParams_   gensupport.URLParams
  4612  	ifNoneMatch_ string
  4613  	ctx_         context.Context
  4614  	header_      http.Header
  4615  }
  4616  
  4617  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  4618  // days.
  4619  //
  4620  //   - name: The name of the Replay to retrieve, in the following format:
  4621  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  4622  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  4623  //     organization that owns the `Replay`. Example:
  4624  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  4625  //     03-479ce1833c36`.
  4626  func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall {
  4627  	c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4628  	c.name = name
  4629  	return c
  4630  }
  4631  
  4632  // Fields allows partial responses to be retrieved. See
  4633  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4634  // details.
  4635  func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall {
  4636  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4637  	return c
  4638  }
  4639  
  4640  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4641  // object's ETag matches the given value. This is useful for getting updates
  4642  // only after the object has changed since the last request.
  4643  func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall {
  4644  	c.ifNoneMatch_ = entityTag
  4645  	return c
  4646  }
  4647  
  4648  // Context sets the context to be used in this call's Do method.
  4649  func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall {
  4650  	c.ctx_ = ctx
  4651  	return c
  4652  }
  4653  
  4654  // Header returns a http.Header that can be modified by the caller to add
  4655  // headers to the request.
  4656  func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header {
  4657  	if c.header_ == nil {
  4658  		c.header_ = make(http.Header)
  4659  	}
  4660  	return c.header_
  4661  }
  4662  
  4663  func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  4664  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4665  	if c.ifNoneMatch_ != "" {
  4666  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4667  	}
  4668  	var body io.Reader = nil
  4669  	c.urlParams_.Set("alt", alt)
  4670  	c.urlParams_.Set("prettyPrint", "false")
  4671  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4672  	urls += "?" + c.urlParams_.Encode()
  4673  	req, err := http.NewRequest("GET", urls, body)
  4674  	if err != nil {
  4675  		return nil, err
  4676  	}
  4677  	req.Header = reqHeaders
  4678  	googleapi.Expand(req.URL, map[string]string{
  4679  		"name": c.name,
  4680  	})
  4681  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4682  }
  4683  
  4684  // Do executes the "policysimulator.organizations.locations.replays.get" call.
  4685  // Any non-2xx status code is an error. Response headers are in either
  4686  // *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if a
  4687  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4688  // googleapi.IsNotModified to check whether the returned error was because
  4689  // http.StatusNotModified was returned.
  4690  func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) {
  4691  	gensupport.SetOptions(c.urlParams_, opts...)
  4692  	res, err := c.doRequest("json")
  4693  	if res != nil && res.StatusCode == http.StatusNotModified {
  4694  		if res.Body != nil {
  4695  			res.Body.Close()
  4696  		}
  4697  		return nil, gensupport.WrapError(&googleapi.Error{
  4698  			Code:   res.StatusCode,
  4699  			Header: res.Header,
  4700  		})
  4701  	}
  4702  	if err != nil {
  4703  		return nil, err
  4704  	}
  4705  	defer googleapi.CloseBody(res)
  4706  	if err := googleapi.CheckResponse(res); err != nil {
  4707  		return nil, gensupport.WrapError(err)
  4708  	}
  4709  	ret := &GoogleCloudPolicysimulatorV1betaReplay{
  4710  		ServerResponse: googleapi.ServerResponse{
  4711  			Header:         res.Header,
  4712  			HTTPStatusCode: res.StatusCode,
  4713  		},
  4714  	}
  4715  	target := &ret
  4716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4717  		return nil, err
  4718  	}
  4719  	return ret, nil
  4720  }
  4721  
  4722  type OrganizationsLocationsReplaysListCall struct {
  4723  	s            *Service
  4724  	parent       string
  4725  	urlParams_   gensupport.URLParams
  4726  	ifNoneMatch_ string
  4727  	ctx_         context.Context
  4728  	header_      http.Header
  4729  }
  4730  
  4731  // List: Lists each Replay in a project, folder, or organization. Each `Replay`
  4732  // is available for at least 7 days.
  4733  //
  4734  //   - parent: The parent resource, in the following format:
  4735  //     `{projects|folders|organizations}/{resource-id}/locations/global`, where
  4736  //     `{resource-id}` is the ID of the project, folder, or organization that
  4737  //     owns the Replay. Example: `projects/my-example-project/locations/global`
  4738  //     Only `Replay` objects that are direct children of the provided parent are
  4739  //     listed. In other words, `Replay` objects that are children of a project
  4740  //     will not be included when the parent is a folder of that project.
  4741  func (r *OrganizationsLocationsReplaysService) List(parent string) *OrganizationsLocationsReplaysListCall {
  4742  	c := &OrganizationsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4743  	c.parent = parent
  4744  	return c
  4745  }
  4746  
  4747  // PageSize sets the optional parameter "pageSize": The maximum number of
  4748  // Replay objects to return. Defaults to 50. The maximum value is 1000; values
  4749  // above 1000 are rounded down to 1000.
  4750  func (c *OrganizationsLocationsReplaysListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysListCall {
  4751  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4752  	return c
  4753  }
  4754  
  4755  // PageToken sets the optional parameter "pageToken": A page token, received
  4756  // from a previous Simulator.ListReplays call. Provide this to retrieve the
  4757  // subsequent page. When paginating, all other parameters provided to
  4758  // Simulator.ListReplays must match the call that provided the page token.
  4759  func (c *OrganizationsLocationsReplaysListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysListCall {
  4760  	c.urlParams_.Set("pageToken", pageToken)
  4761  	return c
  4762  }
  4763  
  4764  // Fields allows partial responses to be retrieved. See
  4765  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4766  // details.
  4767  func (c *OrganizationsLocationsReplaysListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysListCall {
  4768  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4769  	return c
  4770  }
  4771  
  4772  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4773  // object's ETag matches the given value. This is useful for getting updates
  4774  // only after the object has changed since the last request.
  4775  func (c *OrganizationsLocationsReplaysListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysListCall {
  4776  	c.ifNoneMatch_ = entityTag
  4777  	return c
  4778  }
  4779  
  4780  // Context sets the context to be used in this call's Do method.
  4781  func (c *OrganizationsLocationsReplaysListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysListCall {
  4782  	c.ctx_ = ctx
  4783  	return c
  4784  }
  4785  
  4786  // Header returns a http.Header that can be modified by the caller to add
  4787  // headers to the request.
  4788  func (c *OrganizationsLocationsReplaysListCall) Header() http.Header {
  4789  	if c.header_ == nil {
  4790  		c.header_ = make(http.Header)
  4791  	}
  4792  	return c.header_
  4793  }
  4794  
  4795  func (c *OrganizationsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) {
  4796  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4797  	if c.ifNoneMatch_ != "" {
  4798  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4799  	}
  4800  	var body io.Reader = nil
  4801  	c.urlParams_.Set("alt", alt)
  4802  	c.urlParams_.Set("prettyPrint", "false")
  4803  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  4804  	urls += "?" + c.urlParams_.Encode()
  4805  	req, err := http.NewRequest("GET", urls, body)
  4806  	if err != nil {
  4807  		return nil, err
  4808  	}
  4809  	req.Header = reqHeaders
  4810  	googleapi.Expand(req.URL, map[string]string{
  4811  		"parent": c.parent,
  4812  	})
  4813  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4814  }
  4815  
  4816  // Do executes the "policysimulator.organizations.locations.replays.list" call.
  4817  // Any non-2xx status code is an error. Response headers are in either
  4818  // *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.Header
  4819  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  4820  // Use googleapi.IsNotModified to check whether the returned error was because
  4821  // http.StatusNotModified was returned.
  4822  func (c *OrganizationsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) {
  4823  	gensupport.SetOptions(c.urlParams_, opts...)
  4824  	res, err := c.doRequest("json")
  4825  	if res != nil && res.StatusCode == http.StatusNotModified {
  4826  		if res.Body != nil {
  4827  			res.Body.Close()
  4828  		}
  4829  		return nil, gensupport.WrapError(&googleapi.Error{
  4830  			Code:   res.StatusCode,
  4831  			Header: res.Header,
  4832  		})
  4833  	}
  4834  	if err != nil {
  4835  		return nil, err
  4836  	}
  4837  	defer googleapi.CloseBody(res)
  4838  	if err := googleapi.CheckResponse(res); err != nil {
  4839  		return nil, gensupport.WrapError(err)
  4840  	}
  4841  	ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{
  4842  		ServerResponse: googleapi.ServerResponse{
  4843  			Header:         res.Header,
  4844  			HTTPStatusCode: res.StatusCode,
  4845  		},
  4846  	}
  4847  	target := &ret
  4848  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4849  		return nil, err
  4850  	}
  4851  	return ret, nil
  4852  }
  4853  
  4854  // Pages invokes f for each page of results.
  4855  // A non-nil error returned from f will halt the iteration.
  4856  // The provided context supersedes any context provided to the Context method.
  4857  func (c *OrganizationsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error {
  4858  	c.ctx_ = ctx
  4859  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4860  	for {
  4861  		x, err := c.Do()
  4862  		if err != nil {
  4863  			return err
  4864  		}
  4865  		if err := f(x); err != nil {
  4866  			return err
  4867  		}
  4868  		if x.NextPageToken == "" {
  4869  			return nil
  4870  		}
  4871  		c.PageToken(x.NextPageToken)
  4872  	}
  4873  }
  4874  
  4875  type OrganizationsLocationsReplaysOperationsGetCall struct {
  4876  	s            *Service
  4877  	name         string
  4878  	urlParams_   gensupport.URLParams
  4879  	ifNoneMatch_ string
  4880  	ctx_         context.Context
  4881  	header_      http.Header
  4882  }
  4883  
  4884  // Get: Gets the latest state of a long-running operation. Clients can use this
  4885  // method to poll the operation result at intervals as recommended by the API
  4886  // service.
  4887  //
  4888  // - name: The name of the operation resource.
  4889  func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall {
  4890  	c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4891  	c.name = name
  4892  	return c
  4893  }
  4894  
  4895  // Fields allows partial responses to be retrieved. See
  4896  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4897  // details.
  4898  func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall {
  4899  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4900  	return c
  4901  }
  4902  
  4903  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4904  // object's ETag matches the given value. This is useful for getting updates
  4905  // only after the object has changed since the last request.
  4906  func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall {
  4907  	c.ifNoneMatch_ = entityTag
  4908  	return c
  4909  }
  4910  
  4911  // Context sets the context to be used in this call's Do method.
  4912  func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall {
  4913  	c.ctx_ = ctx
  4914  	return c
  4915  }
  4916  
  4917  // Header returns a http.Header that can be modified by the caller to add
  4918  // headers to the request.
  4919  func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header {
  4920  	if c.header_ == nil {
  4921  		c.header_ = make(http.Header)
  4922  	}
  4923  	return c.header_
  4924  }
  4925  
  4926  func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4927  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4928  	if c.ifNoneMatch_ != "" {
  4929  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4930  	}
  4931  	var body io.Reader = nil
  4932  	c.urlParams_.Set("alt", alt)
  4933  	c.urlParams_.Set("prettyPrint", "false")
  4934  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4935  	urls += "?" + c.urlParams_.Encode()
  4936  	req, err := http.NewRequest("GET", urls, body)
  4937  	if err != nil {
  4938  		return nil, err
  4939  	}
  4940  	req.Header = reqHeaders
  4941  	googleapi.Expand(req.URL, map[string]string{
  4942  		"name": c.name,
  4943  	})
  4944  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4945  }
  4946  
  4947  // Do executes the "policysimulator.organizations.locations.replays.operations.get" call.
  4948  // Any non-2xx status code is an error. Response headers are in either
  4949  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4950  // returned at all) in error.(*googleapi.Error).Header. Use
  4951  // googleapi.IsNotModified to check whether the returned error was because
  4952  // http.StatusNotModified was returned.
  4953  func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4954  	gensupport.SetOptions(c.urlParams_, opts...)
  4955  	res, err := c.doRequest("json")
  4956  	if res != nil && res.StatusCode == http.StatusNotModified {
  4957  		if res.Body != nil {
  4958  			res.Body.Close()
  4959  		}
  4960  		return nil, gensupport.WrapError(&googleapi.Error{
  4961  			Code:   res.StatusCode,
  4962  			Header: res.Header,
  4963  		})
  4964  	}
  4965  	if err != nil {
  4966  		return nil, err
  4967  	}
  4968  	defer googleapi.CloseBody(res)
  4969  	if err := googleapi.CheckResponse(res); err != nil {
  4970  		return nil, gensupport.WrapError(err)
  4971  	}
  4972  	ret := &GoogleLongrunningOperation{
  4973  		ServerResponse: googleapi.ServerResponse{
  4974  			Header:         res.Header,
  4975  			HTTPStatusCode: res.StatusCode,
  4976  		},
  4977  	}
  4978  	target := &ret
  4979  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4980  		return nil, err
  4981  	}
  4982  	return ret, nil
  4983  }
  4984  
  4985  type OrganizationsLocationsReplaysOperationsListCall struct {
  4986  	s            *Service
  4987  	name         string
  4988  	urlParams_   gensupport.URLParams
  4989  	ifNoneMatch_ string
  4990  	ctx_         context.Context
  4991  	header_      http.Header
  4992  }
  4993  
  4994  // List: Lists operations that match the specified filter in the request. If
  4995  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4996  //
  4997  // - name: The name of the operation's parent resource.
  4998  func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall {
  4999  	c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5000  	c.name = name
  5001  	return c
  5002  }
  5003  
  5004  // Filter sets the optional parameter "filter": The standard list filter.
  5005  func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall {
  5006  	c.urlParams_.Set("filter", filter)
  5007  	return c
  5008  }
  5009  
  5010  // PageSize sets the optional parameter "pageSize": The standard list page
  5011  // size.
  5012  func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall {
  5013  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5014  	return c
  5015  }
  5016  
  5017  // PageToken sets the optional parameter "pageToken": The standard list page
  5018  // token.
  5019  func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall {
  5020  	c.urlParams_.Set("pageToken", pageToken)
  5021  	return c
  5022  }
  5023  
  5024  // Fields allows partial responses to be retrieved. See
  5025  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5026  // details.
  5027  func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall {
  5028  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5029  	return c
  5030  }
  5031  
  5032  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5033  // object's ETag matches the given value. This is useful for getting updates
  5034  // only after the object has changed since the last request.
  5035  func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall {
  5036  	c.ifNoneMatch_ = entityTag
  5037  	return c
  5038  }
  5039  
  5040  // Context sets the context to be used in this call's Do method.
  5041  func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall {
  5042  	c.ctx_ = ctx
  5043  	return c
  5044  }
  5045  
  5046  // Header returns a http.Header that can be modified by the caller to add
  5047  // headers to the request.
  5048  func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header {
  5049  	if c.header_ == nil {
  5050  		c.header_ = make(http.Header)
  5051  	}
  5052  	return c.header_
  5053  }
  5054  
  5055  func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5056  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5057  	if c.ifNoneMatch_ != "" {
  5058  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5059  	}
  5060  	var body io.Reader = nil
  5061  	c.urlParams_.Set("alt", alt)
  5062  	c.urlParams_.Set("prettyPrint", "false")
  5063  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5064  	urls += "?" + c.urlParams_.Encode()
  5065  	req, err := http.NewRequest("GET", urls, body)
  5066  	if err != nil {
  5067  		return nil, err
  5068  	}
  5069  	req.Header = reqHeaders
  5070  	googleapi.Expand(req.URL, map[string]string{
  5071  		"name": c.name,
  5072  	})
  5073  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5074  }
  5075  
  5076  // Do executes the "policysimulator.organizations.locations.replays.operations.list" call.
  5077  // Any non-2xx status code is an error. Response headers are in either
  5078  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  5079  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5080  // googleapi.IsNotModified to check whether the returned error was because
  5081  // http.StatusNotModified was returned.
  5082  func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  5083  	gensupport.SetOptions(c.urlParams_, opts...)
  5084  	res, err := c.doRequest("json")
  5085  	if res != nil && res.StatusCode == http.StatusNotModified {
  5086  		if res.Body != nil {
  5087  			res.Body.Close()
  5088  		}
  5089  		return nil, gensupport.WrapError(&googleapi.Error{
  5090  			Code:   res.StatusCode,
  5091  			Header: res.Header,
  5092  		})
  5093  	}
  5094  	if err != nil {
  5095  		return nil, err
  5096  	}
  5097  	defer googleapi.CloseBody(res)
  5098  	if err := googleapi.CheckResponse(res); err != nil {
  5099  		return nil, gensupport.WrapError(err)
  5100  	}
  5101  	ret := &GoogleLongrunningListOperationsResponse{
  5102  		ServerResponse: googleapi.ServerResponse{
  5103  			Header:         res.Header,
  5104  			HTTPStatusCode: res.StatusCode,
  5105  		},
  5106  	}
  5107  	target := &ret
  5108  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5109  		return nil, err
  5110  	}
  5111  	return ret, nil
  5112  }
  5113  
  5114  // Pages invokes f for each page of results.
  5115  // A non-nil error returned from f will halt the iteration.
  5116  // The provided context supersedes any context provided to the Context method.
  5117  func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  5118  	c.ctx_ = ctx
  5119  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5120  	for {
  5121  		x, err := c.Do()
  5122  		if err != nil {
  5123  			return err
  5124  		}
  5125  		if err := f(x); err != nil {
  5126  			return err
  5127  		}
  5128  		if x.NextPageToken == "" {
  5129  			return nil
  5130  		}
  5131  		c.PageToken(x.NextPageToken)
  5132  	}
  5133  }
  5134  
  5135  type OrganizationsLocationsReplaysResultsListCall struct {
  5136  	s            *Service
  5137  	parent       string
  5138  	urlParams_   gensupport.URLParams
  5139  	ifNoneMatch_ string
  5140  	ctx_         context.Context
  5141  	header_      http.Header
  5142  }
  5143  
  5144  // List: Lists the results of running a Replay.
  5145  //
  5146  //   - parent: The Replay whose results are listed, in the following format:
  5147  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  5148  //     eplay-id}` Example:
  5149  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  5150  //     1833c36`.
  5151  func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall {
  5152  	c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5153  	c.parent = parent
  5154  	return c
  5155  }
  5156  
  5157  // PageSize sets the optional parameter "pageSize": The maximum number of
  5158  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  5159  // values above 5000 are rounded down to 5000.
  5160  func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall {
  5161  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5162  	return c
  5163  }
  5164  
  5165  // PageToken sets the optional parameter "pageToken": A page token, received
  5166  // from a previous Simulator.ListReplayResults call. Provide this token to
  5167  // retrieve the next page of results. When paginating, all other parameters
  5168  // provided to [Simulator.ListReplayResults[] must match the call that provided
  5169  // the page token.
  5170  func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall {
  5171  	c.urlParams_.Set("pageToken", pageToken)
  5172  	return c
  5173  }
  5174  
  5175  // Fields allows partial responses to be retrieved. See
  5176  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5177  // details.
  5178  func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall {
  5179  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5180  	return c
  5181  }
  5182  
  5183  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5184  // object's ETag matches the given value. This is useful for getting updates
  5185  // only after the object has changed since the last request.
  5186  func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall {
  5187  	c.ifNoneMatch_ = entityTag
  5188  	return c
  5189  }
  5190  
  5191  // Context sets the context to be used in this call's Do method.
  5192  func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall {
  5193  	c.ctx_ = ctx
  5194  	return c
  5195  }
  5196  
  5197  // Header returns a http.Header that can be modified by the caller to add
  5198  // headers to the request.
  5199  func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header {
  5200  	if c.header_ == nil {
  5201  		c.header_ = make(http.Header)
  5202  	}
  5203  	return c.header_
  5204  }
  5205  
  5206  func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  5207  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5208  	if c.ifNoneMatch_ != "" {
  5209  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5210  	}
  5211  	var body io.Reader = nil
  5212  	c.urlParams_.Set("alt", alt)
  5213  	c.urlParams_.Set("prettyPrint", "false")
  5214  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results")
  5215  	urls += "?" + c.urlParams_.Encode()
  5216  	req, err := http.NewRequest("GET", urls, body)
  5217  	if err != nil {
  5218  		return nil, err
  5219  	}
  5220  	req.Header = reqHeaders
  5221  	googleapi.Expand(req.URL, map[string]string{
  5222  		"parent": c.parent,
  5223  	})
  5224  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5225  }
  5226  
  5227  // Do executes the "policysimulator.organizations.locations.replays.results.list" call.
  5228  // Any non-2xx status code is an error. Response headers are in either
  5229  // *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerResponse.Hea
  5230  // der or (if a response was returned at all) in
  5231  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5232  // whether the returned error was because http.StatusNotModified was returned.
  5233  func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) {
  5234  	gensupport.SetOptions(c.urlParams_, opts...)
  5235  	res, err := c.doRequest("json")
  5236  	if res != nil && res.StatusCode == http.StatusNotModified {
  5237  		if res.Body != nil {
  5238  			res.Body.Close()
  5239  		}
  5240  		return nil, gensupport.WrapError(&googleapi.Error{
  5241  			Code:   res.StatusCode,
  5242  			Header: res.Header,
  5243  		})
  5244  	}
  5245  	if err != nil {
  5246  		return nil, err
  5247  	}
  5248  	defer googleapi.CloseBody(res)
  5249  	if err := googleapi.CheckResponse(res); err != nil {
  5250  		return nil, gensupport.WrapError(err)
  5251  	}
  5252  	ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{
  5253  		ServerResponse: googleapi.ServerResponse{
  5254  			Header:         res.Header,
  5255  			HTTPStatusCode: res.StatusCode,
  5256  		},
  5257  	}
  5258  	target := &ret
  5259  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5260  		return nil, err
  5261  	}
  5262  	return ret, nil
  5263  }
  5264  
  5265  // Pages invokes f for each page of results.
  5266  // A non-nil error returned from f will halt the iteration.
  5267  // The provided context supersedes any context provided to the Context method.
  5268  func (c *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error {
  5269  	c.ctx_ = ctx
  5270  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5271  	for {
  5272  		x, err := c.Do()
  5273  		if err != nil {
  5274  			return err
  5275  		}
  5276  		if err := f(x); err != nil {
  5277  			return err
  5278  		}
  5279  		if x.NextPageToken == "" {
  5280  			return nil
  5281  		}
  5282  		c.PageToken(x.NextPageToken)
  5283  	}
  5284  }
  5285  
  5286  type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct {
  5287  	s            *Service
  5288  	name         string
  5289  	urlParams_   gensupport.URLParams
  5290  	ifNoneMatch_ string
  5291  	ctx_         context.Context
  5292  	header_      http.Header
  5293  }
  5294  
  5295  // Get: Gets the latest state of a long-running operation. Clients can use this
  5296  // method to poll the operation result at intervals as recommended by the API
  5297  // service.
  5298  //
  5299  // - name: The name of the operation resource.
  5300  func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  5301  	c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5302  	c.name = name
  5303  	return c
  5304  }
  5305  
  5306  // Fields allows partial responses to be retrieved. See
  5307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5308  // details.
  5309  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  5310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5311  	return c
  5312  }
  5313  
  5314  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5315  // object's ETag matches the given value. This is useful for getting updates
  5316  // only after the object has changed since the last request.
  5317  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  5318  	c.ifNoneMatch_ = entityTag
  5319  	return c
  5320  }
  5321  
  5322  // Context sets the context to be used in this call's Do method.
  5323  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall {
  5324  	c.ctx_ = ctx
  5325  	return c
  5326  }
  5327  
  5328  // Header returns a http.Header that can be modified by the caller to add
  5329  // headers to the request.
  5330  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header {
  5331  	if c.header_ == nil {
  5332  		c.header_ = make(http.Header)
  5333  	}
  5334  	return c.header_
  5335  }
  5336  
  5337  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5338  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5339  	if c.ifNoneMatch_ != "" {
  5340  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5341  	}
  5342  	var body io.Reader = nil
  5343  	c.urlParams_.Set("alt", alt)
  5344  	c.urlParams_.Set("prettyPrint", "false")
  5345  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5346  	urls += "?" + c.urlParams_.Encode()
  5347  	req, err := http.NewRequest("GET", urls, body)
  5348  	if err != nil {
  5349  		return nil, err
  5350  	}
  5351  	req.Header = reqHeaders
  5352  	googleapi.Expand(req.URL, map[string]string{
  5353  		"name": c.name,
  5354  	})
  5355  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5356  }
  5357  
  5358  // Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call.
  5359  // Any non-2xx status code is an error. Response headers are in either
  5360  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5361  // returned at all) in error.(*googleapi.Error).Header. Use
  5362  // googleapi.IsNotModified to check whether the returned error was because
  5363  // http.StatusNotModified was returned.
  5364  func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5365  	gensupport.SetOptions(c.urlParams_, opts...)
  5366  	res, err := c.doRequest("json")
  5367  	if res != nil && res.StatusCode == http.StatusNotModified {
  5368  		if res.Body != nil {
  5369  			res.Body.Close()
  5370  		}
  5371  		return nil, gensupport.WrapError(&googleapi.Error{
  5372  			Code:   res.StatusCode,
  5373  			Header: res.Header,
  5374  		})
  5375  	}
  5376  	if err != nil {
  5377  		return nil, err
  5378  	}
  5379  	defer googleapi.CloseBody(res)
  5380  	if err := googleapi.CheckResponse(res); err != nil {
  5381  		return nil, gensupport.WrapError(err)
  5382  	}
  5383  	ret := &GoogleLongrunningOperation{
  5384  		ServerResponse: googleapi.ServerResponse{
  5385  			Header:         res.Header,
  5386  			HTTPStatusCode: res.StatusCode,
  5387  		},
  5388  	}
  5389  	target := &ret
  5390  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5391  		return nil, err
  5392  	}
  5393  	return ret, nil
  5394  }
  5395  
  5396  type ProjectsLocationsReplaysCreateCall struct {
  5397  	s                                      *Service
  5398  	parent                                 string
  5399  	googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay
  5400  	urlParams_                             gensupport.URLParams
  5401  	ctx_                                   context.Context
  5402  	header_                                http.Header
  5403  }
  5404  
  5405  // Create: Creates and starts a Replay using the given ReplayConfig.
  5406  //
  5407  //   - parent: The parent resource where this Replay will be created. This
  5408  //     resource must be a project, folder, or organization with a location.
  5409  //     Example: `projects/my-example-project/locations/global`.
  5410  func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *ProjectsLocationsReplaysCreateCall {
  5411  	c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5412  	c.parent = parent
  5413  	c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay
  5414  	return c
  5415  }
  5416  
  5417  // Fields allows partial responses to be retrieved. See
  5418  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5419  // details.
  5420  func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall {
  5421  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5422  	return c
  5423  }
  5424  
  5425  // Context sets the context to be used in this call's Do method.
  5426  func (c *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall {
  5427  	c.ctx_ = ctx
  5428  	return c
  5429  }
  5430  
  5431  // Header returns a http.Header that can be modified by the caller to add
  5432  // headers to the request.
  5433  func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header {
  5434  	if c.header_ == nil {
  5435  		c.header_ = make(http.Header)
  5436  	}
  5437  	return c.header_
  5438  }
  5439  
  5440  func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) {
  5441  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5442  	var body io.Reader = nil
  5443  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay)
  5444  	if err != nil {
  5445  		return nil, err
  5446  	}
  5447  	c.urlParams_.Set("alt", alt)
  5448  	c.urlParams_.Set("prettyPrint", "false")
  5449  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  5450  	urls += "?" + c.urlParams_.Encode()
  5451  	req, err := http.NewRequest("POST", urls, body)
  5452  	if err != nil {
  5453  		return nil, err
  5454  	}
  5455  	req.Header = reqHeaders
  5456  	googleapi.Expand(req.URL, map[string]string{
  5457  		"parent": c.parent,
  5458  	})
  5459  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5460  }
  5461  
  5462  // Do executes the "policysimulator.projects.locations.replays.create" call.
  5463  // Any non-2xx status code is an error. Response headers are in either
  5464  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5465  // returned at all) in error.(*googleapi.Error).Header. Use
  5466  // googleapi.IsNotModified to check whether the returned error was because
  5467  // http.StatusNotModified was returned.
  5468  func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5469  	gensupport.SetOptions(c.urlParams_, opts...)
  5470  	res, err := c.doRequest("json")
  5471  	if res != nil && res.StatusCode == http.StatusNotModified {
  5472  		if res.Body != nil {
  5473  			res.Body.Close()
  5474  		}
  5475  		return nil, gensupport.WrapError(&googleapi.Error{
  5476  			Code:   res.StatusCode,
  5477  			Header: res.Header,
  5478  		})
  5479  	}
  5480  	if err != nil {
  5481  		return nil, err
  5482  	}
  5483  	defer googleapi.CloseBody(res)
  5484  	if err := googleapi.CheckResponse(res); err != nil {
  5485  		return nil, gensupport.WrapError(err)
  5486  	}
  5487  	ret := &GoogleLongrunningOperation{
  5488  		ServerResponse: googleapi.ServerResponse{
  5489  			Header:         res.Header,
  5490  			HTTPStatusCode: res.StatusCode,
  5491  		},
  5492  	}
  5493  	target := &ret
  5494  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5495  		return nil, err
  5496  	}
  5497  	return ret, nil
  5498  }
  5499  
  5500  type ProjectsLocationsReplaysGetCall struct {
  5501  	s            *Service
  5502  	name         string
  5503  	urlParams_   gensupport.URLParams
  5504  	ifNoneMatch_ string
  5505  	ctx_         context.Context
  5506  	header_      http.Header
  5507  }
  5508  
  5509  // Get: Gets the specified Replay. Each `Replay` is available for at least 7
  5510  // days.
  5511  //
  5512  //   - name: The name of the Replay to retrieve, in the following format:
  5513  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  5514  //     eplay-id}`, where `{resource-id}` is the ID of the project, folder, or
  5515  //     organization that owns the `Replay`. Example:
  5516  //     `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e
  5517  //     03-479ce1833c36`.
  5518  func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall {
  5519  	c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5520  	c.name = name
  5521  	return c
  5522  }
  5523  
  5524  // Fields allows partial responses to be retrieved. See
  5525  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5526  // details.
  5527  func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall {
  5528  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5529  	return c
  5530  }
  5531  
  5532  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5533  // object's ETag matches the given value. This is useful for getting updates
  5534  // only after the object has changed since the last request.
  5535  func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall {
  5536  	c.ifNoneMatch_ = entityTag
  5537  	return c
  5538  }
  5539  
  5540  // Context sets the context to be used in this call's Do method.
  5541  func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall {
  5542  	c.ctx_ = ctx
  5543  	return c
  5544  }
  5545  
  5546  // Header returns a http.Header that can be modified by the caller to add
  5547  // headers to the request.
  5548  func (c *ProjectsLocationsReplaysGetCall) Header() http.Header {
  5549  	if c.header_ == nil {
  5550  		c.header_ = make(http.Header)
  5551  	}
  5552  	return c.header_
  5553  }
  5554  
  5555  func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) {
  5556  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5557  	if c.ifNoneMatch_ != "" {
  5558  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5559  	}
  5560  	var body io.Reader = nil
  5561  	c.urlParams_.Set("alt", alt)
  5562  	c.urlParams_.Set("prettyPrint", "false")
  5563  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5564  	urls += "?" + c.urlParams_.Encode()
  5565  	req, err := http.NewRequest("GET", urls, body)
  5566  	if err != nil {
  5567  		return nil, err
  5568  	}
  5569  	req.Header = reqHeaders
  5570  	googleapi.Expand(req.URL, map[string]string{
  5571  		"name": c.name,
  5572  	})
  5573  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5574  }
  5575  
  5576  // Do executes the "policysimulator.projects.locations.replays.get" call.
  5577  // Any non-2xx status code is an error. Response headers are in either
  5578  // *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if a
  5579  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5580  // googleapi.IsNotModified to check whether the returned error was because
  5581  // http.StatusNotModified was returned.
  5582  func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) {
  5583  	gensupport.SetOptions(c.urlParams_, opts...)
  5584  	res, err := c.doRequest("json")
  5585  	if res != nil && res.StatusCode == http.StatusNotModified {
  5586  		if res.Body != nil {
  5587  			res.Body.Close()
  5588  		}
  5589  		return nil, gensupport.WrapError(&googleapi.Error{
  5590  			Code:   res.StatusCode,
  5591  			Header: res.Header,
  5592  		})
  5593  	}
  5594  	if err != nil {
  5595  		return nil, err
  5596  	}
  5597  	defer googleapi.CloseBody(res)
  5598  	if err := googleapi.CheckResponse(res); err != nil {
  5599  		return nil, gensupport.WrapError(err)
  5600  	}
  5601  	ret := &GoogleCloudPolicysimulatorV1betaReplay{
  5602  		ServerResponse: googleapi.ServerResponse{
  5603  			Header:         res.Header,
  5604  			HTTPStatusCode: res.StatusCode,
  5605  		},
  5606  	}
  5607  	target := &ret
  5608  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5609  		return nil, err
  5610  	}
  5611  	return ret, nil
  5612  }
  5613  
  5614  type ProjectsLocationsReplaysListCall struct {
  5615  	s            *Service
  5616  	parent       string
  5617  	urlParams_   gensupport.URLParams
  5618  	ifNoneMatch_ string
  5619  	ctx_         context.Context
  5620  	header_      http.Header
  5621  }
  5622  
  5623  // List: Lists each Replay in a project, folder, or organization. Each `Replay`
  5624  // is available for at least 7 days.
  5625  //
  5626  //   - parent: The parent resource, in the following format:
  5627  //     `{projects|folders|organizations}/{resource-id}/locations/global`, where
  5628  //     `{resource-id}` is the ID of the project, folder, or organization that
  5629  //     owns the Replay. Example: `projects/my-example-project/locations/global`
  5630  //     Only `Replay` objects that are direct children of the provided parent are
  5631  //     listed. In other words, `Replay` objects that are children of a project
  5632  //     will not be included when the parent is a folder of that project.
  5633  func (r *ProjectsLocationsReplaysService) List(parent string) *ProjectsLocationsReplaysListCall {
  5634  	c := &ProjectsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5635  	c.parent = parent
  5636  	return c
  5637  }
  5638  
  5639  // PageSize sets the optional parameter "pageSize": The maximum number of
  5640  // Replay objects to return. Defaults to 50. The maximum value is 1000; values
  5641  // above 1000 are rounded down to 1000.
  5642  func (c *ProjectsLocationsReplaysListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysListCall {
  5643  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5644  	return c
  5645  }
  5646  
  5647  // PageToken sets the optional parameter "pageToken": A page token, received
  5648  // from a previous Simulator.ListReplays call. Provide this to retrieve the
  5649  // subsequent page. When paginating, all other parameters provided to
  5650  // Simulator.ListReplays must match the call that provided the page token.
  5651  func (c *ProjectsLocationsReplaysListCall) PageToken(pageToken string) *ProjectsLocationsReplaysListCall {
  5652  	c.urlParams_.Set("pageToken", pageToken)
  5653  	return c
  5654  }
  5655  
  5656  // Fields allows partial responses to be retrieved. See
  5657  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5658  // details.
  5659  func (c *ProjectsLocationsReplaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysListCall {
  5660  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5661  	return c
  5662  }
  5663  
  5664  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5665  // object's ETag matches the given value. This is useful for getting updates
  5666  // only after the object has changed since the last request.
  5667  func (c *ProjectsLocationsReplaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysListCall {
  5668  	c.ifNoneMatch_ = entityTag
  5669  	return c
  5670  }
  5671  
  5672  // Context sets the context to be used in this call's Do method.
  5673  func (c *ProjectsLocationsReplaysListCall) Context(ctx context.Context) *ProjectsLocationsReplaysListCall {
  5674  	c.ctx_ = ctx
  5675  	return c
  5676  }
  5677  
  5678  // Header returns a http.Header that can be modified by the caller to add
  5679  // headers to the request.
  5680  func (c *ProjectsLocationsReplaysListCall) Header() http.Header {
  5681  	if c.header_ == nil {
  5682  		c.header_ = make(http.Header)
  5683  	}
  5684  	return c.header_
  5685  }
  5686  
  5687  func (c *ProjectsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) {
  5688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5689  	if c.ifNoneMatch_ != "" {
  5690  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5691  	}
  5692  	var body io.Reader = nil
  5693  	c.urlParams_.Set("alt", alt)
  5694  	c.urlParams_.Set("prettyPrint", "false")
  5695  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays")
  5696  	urls += "?" + c.urlParams_.Encode()
  5697  	req, err := http.NewRequest("GET", urls, body)
  5698  	if err != nil {
  5699  		return nil, err
  5700  	}
  5701  	req.Header = reqHeaders
  5702  	googleapi.Expand(req.URL, map[string]string{
  5703  		"parent": c.parent,
  5704  	})
  5705  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5706  }
  5707  
  5708  // Do executes the "policysimulator.projects.locations.replays.list" call.
  5709  // Any non-2xx status code is an error. Response headers are in either
  5710  // *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.Header
  5711  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  5712  // Use googleapi.IsNotModified to check whether the returned error was because
  5713  // http.StatusNotModified was returned.
  5714  func (c *ProjectsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) {
  5715  	gensupport.SetOptions(c.urlParams_, opts...)
  5716  	res, err := c.doRequest("json")
  5717  	if res != nil && res.StatusCode == http.StatusNotModified {
  5718  		if res.Body != nil {
  5719  			res.Body.Close()
  5720  		}
  5721  		return nil, gensupport.WrapError(&googleapi.Error{
  5722  			Code:   res.StatusCode,
  5723  			Header: res.Header,
  5724  		})
  5725  	}
  5726  	if err != nil {
  5727  		return nil, err
  5728  	}
  5729  	defer googleapi.CloseBody(res)
  5730  	if err := googleapi.CheckResponse(res); err != nil {
  5731  		return nil, gensupport.WrapError(err)
  5732  	}
  5733  	ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{
  5734  		ServerResponse: googleapi.ServerResponse{
  5735  			Header:         res.Header,
  5736  			HTTPStatusCode: res.StatusCode,
  5737  		},
  5738  	}
  5739  	target := &ret
  5740  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5741  		return nil, err
  5742  	}
  5743  	return ret, nil
  5744  }
  5745  
  5746  // Pages invokes f for each page of results.
  5747  // A non-nil error returned from f will halt the iteration.
  5748  // The provided context supersedes any context provided to the Context method.
  5749  func (c *ProjectsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error {
  5750  	c.ctx_ = ctx
  5751  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5752  	for {
  5753  		x, err := c.Do()
  5754  		if err != nil {
  5755  			return err
  5756  		}
  5757  		if err := f(x); err != nil {
  5758  			return err
  5759  		}
  5760  		if x.NextPageToken == "" {
  5761  			return nil
  5762  		}
  5763  		c.PageToken(x.NextPageToken)
  5764  	}
  5765  }
  5766  
  5767  type ProjectsLocationsReplaysOperationsGetCall struct {
  5768  	s            *Service
  5769  	name         string
  5770  	urlParams_   gensupport.URLParams
  5771  	ifNoneMatch_ string
  5772  	ctx_         context.Context
  5773  	header_      http.Header
  5774  }
  5775  
  5776  // Get: Gets the latest state of a long-running operation. Clients can use this
  5777  // method to poll the operation result at intervals as recommended by the API
  5778  // service.
  5779  //
  5780  // - name: The name of the operation resource.
  5781  func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall {
  5782  	c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5783  	c.name = name
  5784  	return c
  5785  }
  5786  
  5787  // Fields allows partial responses to be retrieved. See
  5788  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5789  // details.
  5790  func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall {
  5791  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5792  	return c
  5793  }
  5794  
  5795  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5796  // object's ETag matches the given value. This is useful for getting updates
  5797  // only after the object has changed since the last request.
  5798  func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall {
  5799  	c.ifNoneMatch_ = entityTag
  5800  	return c
  5801  }
  5802  
  5803  // Context sets the context to be used in this call's Do method.
  5804  func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall {
  5805  	c.ctx_ = ctx
  5806  	return c
  5807  }
  5808  
  5809  // Header returns a http.Header that can be modified by the caller to add
  5810  // headers to the request.
  5811  func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header {
  5812  	if c.header_ == nil {
  5813  		c.header_ = make(http.Header)
  5814  	}
  5815  	return c.header_
  5816  }
  5817  
  5818  func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5819  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5820  	if c.ifNoneMatch_ != "" {
  5821  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5822  	}
  5823  	var body io.Reader = nil
  5824  	c.urlParams_.Set("alt", alt)
  5825  	c.urlParams_.Set("prettyPrint", "false")
  5826  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5827  	urls += "?" + c.urlParams_.Encode()
  5828  	req, err := http.NewRequest("GET", urls, body)
  5829  	if err != nil {
  5830  		return nil, err
  5831  	}
  5832  	req.Header = reqHeaders
  5833  	googleapi.Expand(req.URL, map[string]string{
  5834  		"name": c.name,
  5835  	})
  5836  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5837  }
  5838  
  5839  // Do executes the "policysimulator.projects.locations.replays.operations.get" call.
  5840  // Any non-2xx status code is an error. Response headers are in either
  5841  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5842  // returned at all) in error.(*googleapi.Error).Header. Use
  5843  // googleapi.IsNotModified to check whether the returned error was because
  5844  // http.StatusNotModified was returned.
  5845  func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5846  	gensupport.SetOptions(c.urlParams_, opts...)
  5847  	res, err := c.doRequest("json")
  5848  	if res != nil && res.StatusCode == http.StatusNotModified {
  5849  		if res.Body != nil {
  5850  			res.Body.Close()
  5851  		}
  5852  		return nil, gensupport.WrapError(&googleapi.Error{
  5853  			Code:   res.StatusCode,
  5854  			Header: res.Header,
  5855  		})
  5856  	}
  5857  	if err != nil {
  5858  		return nil, err
  5859  	}
  5860  	defer googleapi.CloseBody(res)
  5861  	if err := googleapi.CheckResponse(res); err != nil {
  5862  		return nil, gensupport.WrapError(err)
  5863  	}
  5864  	ret := &GoogleLongrunningOperation{
  5865  		ServerResponse: googleapi.ServerResponse{
  5866  			Header:         res.Header,
  5867  			HTTPStatusCode: res.StatusCode,
  5868  		},
  5869  	}
  5870  	target := &ret
  5871  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5872  		return nil, err
  5873  	}
  5874  	return ret, nil
  5875  }
  5876  
  5877  type ProjectsLocationsReplaysOperationsListCall struct {
  5878  	s            *Service
  5879  	name         string
  5880  	urlParams_   gensupport.URLParams
  5881  	ifNoneMatch_ string
  5882  	ctx_         context.Context
  5883  	header_      http.Header
  5884  }
  5885  
  5886  // List: Lists operations that match the specified filter in the request. If
  5887  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5888  //
  5889  // - name: The name of the operation's parent resource.
  5890  func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall {
  5891  	c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5892  	c.name = name
  5893  	return c
  5894  }
  5895  
  5896  // Filter sets the optional parameter "filter": The standard list filter.
  5897  func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall {
  5898  	c.urlParams_.Set("filter", filter)
  5899  	return c
  5900  }
  5901  
  5902  // PageSize sets the optional parameter "pageSize": The standard list page
  5903  // size.
  5904  func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall {
  5905  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5906  	return c
  5907  }
  5908  
  5909  // PageToken sets the optional parameter "pageToken": The standard list page
  5910  // token.
  5911  func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall {
  5912  	c.urlParams_.Set("pageToken", pageToken)
  5913  	return c
  5914  }
  5915  
  5916  // Fields allows partial responses to be retrieved. See
  5917  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5918  // details.
  5919  func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall {
  5920  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5921  	return c
  5922  }
  5923  
  5924  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5925  // object's ETag matches the given value. This is useful for getting updates
  5926  // only after the object has changed since the last request.
  5927  func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall {
  5928  	c.ifNoneMatch_ = entityTag
  5929  	return c
  5930  }
  5931  
  5932  // Context sets the context to be used in this call's Do method.
  5933  func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall {
  5934  	c.ctx_ = ctx
  5935  	return c
  5936  }
  5937  
  5938  // Header returns a http.Header that can be modified by the caller to add
  5939  // headers to the request.
  5940  func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header {
  5941  	if c.header_ == nil {
  5942  		c.header_ = make(http.Header)
  5943  	}
  5944  	return c.header_
  5945  }
  5946  
  5947  func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5948  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5949  	if c.ifNoneMatch_ != "" {
  5950  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5951  	}
  5952  	var body io.Reader = nil
  5953  	c.urlParams_.Set("alt", alt)
  5954  	c.urlParams_.Set("prettyPrint", "false")
  5955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5956  	urls += "?" + c.urlParams_.Encode()
  5957  	req, err := http.NewRequest("GET", urls, body)
  5958  	if err != nil {
  5959  		return nil, err
  5960  	}
  5961  	req.Header = reqHeaders
  5962  	googleapi.Expand(req.URL, map[string]string{
  5963  		"name": c.name,
  5964  	})
  5965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5966  }
  5967  
  5968  // Do executes the "policysimulator.projects.locations.replays.operations.list" call.
  5969  // Any non-2xx status code is an error. Response headers are in either
  5970  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  5971  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5972  // googleapi.IsNotModified to check whether the returned error was because
  5973  // http.StatusNotModified was returned.
  5974  func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  5975  	gensupport.SetOptions(c.urlParams_, opts...)
  5976  	res, err := c.doRequest("json")
  5977  	if res != nil && res.StatusCode == http.StatusNotModified {
  5978  		if res.Body != nil {
  5979  			res.Body.Close()
  5980  		}
  5981  		return nil, gensupport.WrapError(&googleapi.Error{
  5982  			Code:   res.StatusCode,
  5983  			Header: res.Header,
  5984  		})
  5985  	}
  5986  	if err != nil {
  5987  		return nil, err
  5988  	}
  5989  	defer googleapi.CloseBody(res)
  5990  	if err := googleapi.CheckResponse(res); err != nil {
  5991  		return nil, gensupport.WrapError(err)
  5992  	}
  5993  	ret := &GoogleLongrunningListOperationsResponse{
  5994  		ServerResponse: googleapi.ServerResponse{
  5995  			Header:         res.Header,
  5996  			HTTPStatusCode: res.StatusCode,
  5997  		},
  5998  	}
  5999  	target := &ret
  6000  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6001  		return nil, err
  6002  	}
  6003  	return ret, nil
  6004  }
  6005  
  6006  // Pages invokes f for each page of results.
  6007  // A non-nil error returned from f will halt the iteration.
  6008  // The provided context supersedes any context provided to the Context method.
  6009  func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  6010  	c.ctx_ = ctx
  6011  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6012  	for {
  6013  		x, err := c.Do()
  6014  		if err != nil {
  6015  			return err
  6016  		}
  6017  		if err := f(x); err != nil {
  6018  			return err
  6019  		}
  6020  		if x.NextPageToken == "" {
  6021  			return nil
  6022  		}
  6023  		c.PageToken(x.NextPageToken)
  6024  	}
  6025  }
  6026  
  6027  type ProjectsLocationsReplaysResultsListCall struct {
  6028  	s            *Service
  6029  	parent       string
  6030  	urlParams_   gensupport.URLParams
  6031  	ifNoneMatch_ string
  6032  	ctx_         context.Context
  6033  	header_      http.Header
  6034  }
  6035  
  6036  // List: Lists the results of running a Replay.
  6037  //
  6038  //   - parent: The Replay whose results are listed, in the following format:
  6039  //     `{projects|folders|organizations}/{resource-id}/locations/global/replays/{r
  6040  //     eplay-id}` Example:
  6041  //     `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce
  6042  //     1833c36`.
  6043  func (r *ProjectsLocationsReplaysResultsService) List(parent string) *ProjectsLocationsReplaysResultsListCall {
  6044  	c := &ProjectsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6045  	c.parent = parent
  6046  	return c
  6047  }
  6048  
  6049  // PageSize sets the optional parameter "pageSize": The maximum number of
  6050  // ReplayResult objects to return. Defaults to 5000. The maximum value is 5000;
  6051  // values above 5000 are rounded down to 5000.
  6052  func (c *ProjectsLocationsReplaysResultsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysResultsListCall {
  6053  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6054  	return c
  6055  }
  6056  
  6057  // PageToken sets the optional parameter "pageToken": A page token, received
  6058  // from a previous Simulator.ListReplayResults call. Provide this token to
  6059  // retrieve the next page of results. When paginating, all other parameters
  6060  // provided to [Simulator.ListReplayResults[] must match the call that provided
  6061  // the page token.
  6062  func (c *ProjectsLocationsReplaysResultsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysResultsListCall {
  6063  	c.urlParams_.Set("pageToken", pageToken)
  6064  	return c
  6065  }
  6066  
  6067  // Fields allows partial responses to be retrieved. See
  6068  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6069  // details.
  6070  func (c *ProjectsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysResultsListCall {
  6071  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6072  	return c
  6073  }
  6074  
  6075  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6076  // object's ETag matches the given value. This is useful for getting updates
  6077  // only after the object has changed since the last request.
  6078  func (c *ProjectsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysResultsListCall {
  6079  	c.ifNoneMatch_ = entityTag
  6080  	return c
  6081  }
  6082  
  6083  // Context sets the context to be used in this call's Do method.
  6084  func (c *ProjectsLocationsReplaysResultsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysResultsListCall {
  6085  	c.ctx_ = ctx
  6086  	return c
  6087  }
  6088  
  6089  // Header returns a http.Header that can be modified by the caller to add
  6090  // headers to the request.
  6091  func (c *ProjectsLocationsReplaysResultsListCall) Header() http.Header {
  6092  	if c.header_ == nil {
  6093  		c.header_ = make(http.Header)
  6094  	}
  6095  	return c.header_
  6096  }
  6097  
  6098  func (c *ProjectsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) {
  6099  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6100  	if c.ifNoneMatch_ != "" {
  6101  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6102  	}
  6103  	var body io.Reader = nil
  6104  	c.urlParams_.Set("alt", alt)
  6105  	c.urlParams_.Set("prettyPrint", "false")
  6106  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results")
  6107  	urls += "?" + c.urlParams_.Encode()
  6108  	req, err := http.NewRequest("GET", urls, body)
  6109  	if err != nil {
  6110  		return nil, err
  6111  	}
  6112  	req.Header = reqHeaders
  6113  	googleapi.Expand(req.URL, map[string]string{
  6114  		"parent": c.parent,
  6115  	})
  6116  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6117  }
  6118  
  6119  // Do executes the "policysimulator.projects.locations.replays.results.list" call.
  6120  // Any non-2xx status code is an error. Response headers are in either
  6121  // *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerResponse.Hea
  6122  // der or (if a response was returned at all) in
  6123  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6124  // whether the returned error was because http.StatusNotModified was returned.
  6125  func (c *ProjectsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) {
  6126  	gensupport.SetOptions(c.urlParams_, opts...)
  6127  	res, err := c.doRequest("json")
  6128  	if res != nil && res.StatusCode == http.StatusNotModified {
  6129  		if res.Body != nil {
  6130  			res.Body.Close()
  6131  		}
  6132  		return nil, gensupport.WrapError(&googleapi.Error{
  6133  			Code:   res.StatusCode,
  6134  			Header: res.Header,
  6135  		})
  6136  	}
  6137  	if err != nil {
  6138  		return nil, err
  6139  	}
  6140  	defer googleapi.CloseBody(res)
  6141  	if err := googleapi.CheckResponse(res); err != nil {
  6142  		return nil, gensupport.WrapError(err)
  6143  	}
  6144  	ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{
  6145  		ServerResponse: googleapi.ServerResponse{
  6146  			Header:         res.Header,
  6147  			HTTPStatusCode: res.StatusCode,
  6148  		},
  6149  	}
  6150  	target := &ret
  6151  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6152  		return nil, err
  6153  	}
  6154  	return ret, nil
  6155  }
  6156  
  6157  // Pages invokes f for each page of results.
  6158  // A non-nil error returned from f will halt the iteration.
  6159  // The provided context supersedes any context provided to the Context method.
  6160  func (c *ProjectsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error {
  6161  	c.ctx_ = ctx
  6162  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6163  	for {
  6164  		x, err := c.Do()
  6165  		if err != nil {
  6166  			return err
  6167  		}
  6168  		if err := f(x); err != nil {
  6169  			return err
  6170  		}
  6171  		if x.NextPageToken == "" {
  6172  			return nil
  6173  		}
  6174  		c.PageToken(x.NextPageToken)
  6175  	}
  6176  }
  6177  

View as plain text