...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package assuredworkloads provides access to the Assured Workloads API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/learnmoreurl
    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/assuredworkloads/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	assuredworkloadsService, err := assuredworkloads.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  //	assuredworkloadsService, err := assuredworkloads.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  //	assuredworkloadsService, err := assuredworkloads.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package assuredworkloads // import "google.golang.org/api/assuredworkloads/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "assuredworkloads:v1"
    90  const apiName = "assuredworkloads"
    91  const apiVersion = "v1"
    92  const basePath = "https://assuredworkloads.googleapis.com/"
    93  const basePathTemplate = "https://assuredworkloads.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://assuredworkloads.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.Organizations = NewOrganizationsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Organizations *OrganizationsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewOrganizationsService(s *Service) *OrganizationsService {
   158  	rs := &OrganizationsService{s: s}
   159  	rs.Locations = NewOrganizationsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type OrganizationsService struct {
   164  	s *Service
   165  
   166  	Locations *OrganizationsLocationsService
   167  }
   168  
   169  func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
   170  	rs := &OrganizationsLocationsService{s: s}
   171  	rs.Operations = NewOrganizationsLocationsOperationsService(s)
   172  	rs.Workloads = NewOrganizationsLocationsWorkloadsService(s)
   173  	return rs
   174  }
   175  
   176  type OrganizationsLocationsService struct {
   177  	s *Service
   178  
   179  	Operations *OrganizationsLocationsOperationsService
   180  
   181  	Workloads *OrganizationsLocationsWorkloadsService
   182  }
   183  
   184  func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService {
   185  	rs := &OrganizationsLocationsOperationsService{s: s}
   186  	return rs
   187  }
   188  
   189  type OrganizationsLocationsOperationsService struct {
   190  	s *Service
   191  }
   192  
   193  func NewOrganizationsLocationsWorkloadsService(s *Service) *OrganizationsLocationsWorkloadsService {
   194  	rs := &OrganizationsLocationsWorkloadsService{s: s}
   195  	rs.Violations = NewOrganizationsLocationsWorkloadsViolationsService(s)
   196  	return rs
   197  }
   198  
   199  type OrganizationsLocationsWorkloadsService struct {
   200  	s *Service
   201  
   202  	Violations *OrganizationsLocationsWorkloadsViolationsService
   203  }
   204  
   205  func NewOrganizationsLocationsWorkloadsViolationsService(s *Service) *OrganizationsLocationsWorkloadsViolationsService {
   206  	rs := &OrganizationsLocationsWorkloadsViolationsService{s: s}
   207  	return rs
   208  }
   209  
   210  type OrganizationsLocationsWorkloadsViolationsService struct {
   211  	s *Service
   212  }
   213  
   214  // GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest: Request for
   215  // acknowledging the violation
   216  type GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest struct {
   217  	// AcknowledgeType: Optional. Acknowledge type of specified violation.
   218  	//
   219  	// Possible values:
   220  	//   "ACKNOWLEDGE_TYPE_UNSPECIFIED" - Acknowledge type unspecified.
   221  	//   "SINGLE_VIOLATION" - Acknowledge only the specific violation.
   222  	//   "EXISTING_CHILD_RESOURCE_VIOLATIONS" - Acknowledge specified orgPolicy
   223  	// violation and also associated resource violations.
   224  	AcknowledgeType string `json:"acknowledgeType,omitempty"`
   225  	// Comment: Required. Business justification explaining the need for violation
   226  	// acknowledgement
   227  	Comment string `json:"comment,omitempty"`
   228  	// NonCompliantOrgPolicy: Optional. This field is deprecated and will be
   229  	// removed in future version of the API. Name of the OrgPolicy which was
   230  	// modified with non-compliant change and resulted in this violation. Format:
   231  	// projects/{project_number}/policies/{constraint_name}
   232  	// folders/{folder_id}/policies/{constraint_name}
   233  	// organizations/{organization_id}/policies/{constraint_name}
   234  	NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"`
   235  	// ForceSendFields is a list of field names (e.g. "AcknowledgeType") to
   236  	// unconditionally include in API requests. By default, fields with empty or
   237  	// default values are omitted from API requests. See
   238  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   239  	// details.
   240  	ForceSendFields []string `json:"-"`
   241  	// NullFields is a list of field names (e.g. "AcknowledgeType") to include in
   242  	// API requests with the JSON null value. By default, fields with empty values
   243  	// are omitted from API requests. See
   244  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   245  	NullFields []string `json:"-"`
   246  }
   247  
   248  func (s *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest) MarshalJSON() ([]byte, error) {
   249  	type NoMethod GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest
   250  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   251  }
   252  
   253  // GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse: Response for
   254  // violation acknowledgement
   255  type GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse struct {
   256  	// ServerResponse contains the HTTP response code and headers from the server.
   257  	googleapi.ServerResponse `json:"-"`
   258  }
   259  
   260  // GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse: Response
   261  // containing the analysis results for the hypothetical resource move.
   262  type GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse struct {
   263  	// AssetMoveAnalyses: List of analysis results for each asset in scope.
   264  	AssetMoveAnalyses []*GoogleCloudAssuredworkloadsV1AssetMoveAnalysis `json:"assetMoveAnalyses,omitempty"`
   265  	// NextPageToken: The next page token. Is empty if the last page is reached.
   266  	NextPageToken string `json:"nextPageToken,omitempty"`
   267  
   268  	// ServerResponse contains the HTTP response code and headers from the server.
   269  	googleapi.ServerResponse `json:"-"`
   270  	// ForceSendFields is a list of field names (e.g. "AssetMoveAnalyses") to
   271  	// unconditionally include in API requests. By default, fields with empty or
   272  	// default values are omitted from API requests. See
   273  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   274  	// details.
   275  	ForceSendFields []string `json:"-"`
   276  	// NullFields is a list of field names (e.g. "AssetMoveAnalyses") to include in
   277  	// API requests with the JSON null value. By default, fields with empty values
   278  	// are omitted from API requests. See
   279  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   280  	NullFields []string `json:"-"`
   281  }
   282  
   283  func (s *GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse) MarshalJSON() ([]byte, error) {
   284  	type NoMethod GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse
   285  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   286  }
   287  
   288  // GoogleCloudAssuredworkloadsV1AssetMoveAnalysis: Represents move analysis
   289  // results for an asset.
   290  type GoogleCloudAssuredworkloadsV1AssetMoveAnalysis struct {
   291  	// AnalysisGroups: List of eligible analyses performed for the asset.
   292  	AnalysisGroups []*GoogleCloudAssuredworkloadsV1MoveAnalysisGroup `json:"analysisGroups,omitempty"`
   293  	// Asset: The full resource name of the asset being analyzed. Example:
   294  	// //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instan
   295  	// ce1
   296  	Asset string `json:"asset,omitempty"`
   297  	// AssetType: Type of the asset being analyzed. Possible values will be among
   298  	// the ones listed here
   299  	// (https://cloud.google.com/asset-inventory/docs/supported-asset-types).
   300  	AssetType string `json:"assetType,omitempty"`
   301  	// ForceSendFields is a list of field names (e.g. "AnalysisGroups") to
   302  	// unconditionally include in API requests. By default, fields with empty or
   303  	// default values are omitted from API requests. See
   304  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   305  	// details.
   306  	ForceSendFields []string `json:"-"`
   307  	// NullFields is a list of field names (e.g. "AnalysisGroups") to include in
   308  	// API requests with the JSON null value. By default, fields with empty values
   309  	// are omitted from API requests. See
   310  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   311  	NullFields []string `json:"-"`
   312  }
   313  
   314  func (s *GoogleCloudAssuredworkloadsV1AssetMoveAnalysis) MarshalJSON() ([]byte, error) {
   315  	type NoMethod GoogleCloudAssuredworkloadsV1AssetMoveAnalysis
   316  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   317  }
   318  
   319  // GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata: Operation
   320  // metadata to give request details of CreateWorkload.
   321  type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct {
   322  	// ComplianceRegime: Optional. Compliance controls that should be applied to
   323  	// the resources managed by the workload.
   324  	//
   325  	// Possible values:
   326  	//   "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime.
   327  	//   "IL4" - Information protection as per DoD IL4 requirements.
   328  	//   "CJIS" - Criminal Justice Information Services (CJIS) Security policies.
   329  	//   "FEDRAMP_HIGH" - FedRAMP High data protection controls
   330  	//   "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls
   331  	//   "REGIONAL_CONTROLS_PREMIUM_US" - Assured Workloads For US Regions data
   332  	// protection controls
   333  	//   "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data protection
   334  	// controls
   335  	//   "HIPAA" - Health Insurance Portability and Accountability Act controls
   336  	//   "HITRUST" - Health Information Trust Alliance controls
   337  	//   "REGIONAL_CONTROLS_PREMIUM_EU" - Assured Workloads For EU Regions and
   338  	// Support controls
   339  	//   "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and Support
   340  	// controls
   341  	//   "REGIONAL_CONTROLS_PREMIUM_CA" - Assured Workloads For Canada Regions and
   342  	// Support controls
   343  	//   "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and
   344  	// Support controls
   345  	//   "ITAR" - International Traffic in Arms Regulations
   346  	//   "REGIONAL_CONTROLS_PREMIUM_AU" - Assured Workloads for Australia Regions
   347  	// and Support controls
   348  	//   "AU_REGIONS_AND_US_SUPPORT" - Assured Workloads for Australia Regions and
   349  	// Support controls
   350  	//   "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners;
   351  	//   "REGIONAL_CONTROLS_PREMIUM_ISR" - Assured Workloads for Israel
   352  	//   "ISR_REGIONS" - Assured Workloads for Israel Regions
   353  	//   "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions
   354  	//   "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime
   355  	//   "IL5" - Information protection as per DoD IL5 requirements.
   356  	//   "IL2" - Information protection as per DoD IL2 requirements.
   357  	//   "REGIONAL_CONTROLS_PREMIUM_JP" - Assured Workloads for Japan Regions
   358  	//   "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions
   359  	//   "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls.
   360  	//   "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls/Free Regions
   361  	//   "FREE_REGIONS" - Assured Workloads for Regional Controls/Free Regions
   362  	ComplianceRegime string `json:"complianceRegime,omitempty"`
   363  	// CreateTime: Optional. Time when the operation was created.
   364  	CreateTime string `json:"createTime,omitempty"`
   365  	// DisplayName: Optional. The display name of the workload.
   366  	DisplayName string `json:"displayName,omitempty"`
   367  	// Parent: Optional. The parent of the workload.
   368  	Parent string `json:"parent,omitempty"`
   369  	// ForceSendFields is a list of field names (e.g. "ComplianceRegime") to
   370  	// unconditionally include in API requests. By default, fields with empty or
   371  	// default values are omitted from API requests. See
   372  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   373  	// details.
   374  	ForceSendFields []string `json:"-"`
   375  	// NullFields is a list of field names (e.g. "ComplianceRegime") to include in
   376  	// API requests with the JSON null value. By default, fields with empty values
   377  	// are omitted from API requests. See
   378  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   379  	NullFields []string `json:"-"`
   380  }
   381  
   382  func (s *GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata) MarshalJSON() ([]byte, error) {
   383  	type NoMethod GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata
   384  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   385  }
   386  
   387  // GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse: Response for
   388  // EnableResourceMonitoring endpoint.
   389  type GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse struct {
   390  	// ServerResponse contains the HTTP response code and headers from the server.
   391  	googleapi.ServerResponse `json:"-"`
   392  }
   393  
   394  // GoogleCloudAssuredworkloadsV1ListViolationsResponse: Response of
   395  // ListViolations endpoint.
   396  type GoogleCloudAssuredworkloadsV1ListViolationsResponse struct {
   397  	// NextPageToken: The next page token. Returns empty if reached the last page.
   398  	NextPageToken string `json:"nextPageToken,omitempty"`
   399  	// Violations: List of Violations under a Workload.
   400  	Violations []*GoogleCloudAssuredworkloadsV1Violation `json:"violations,omitempty"`
   401  
   402  	// ServerResponse contains the HTTP response code and headers from the server.
   403  	googleapi.ServerResponse `json:"-"`
   404  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   405  	// unconditionally include in API requests. By default, fields with empty or
   406  	// default values are omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   408  	// details.
   409  	ForceSendFields []string `json:"-"`
   410  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   411  	// requests with the JSON null value. By default, fields with empty values are
   412  	// omitted from API requests. See
   413  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   414  	NullFields []string `json:"-"`
   415  }
   416  
   417  func (s *GoogleCloudAssuredworkloadsV1ListViolationsResponse) MarshalJSON() ([]byte, error) {
   418  	type NoMethod GoogleCloudAssuredworkloadsV1ListViolationsResponse
   419  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   420  }
   421  
   422  // GoogleCloudAssuredworkloadsV1ListWorkloadsResponse: Response of
   423  // ListWorkloads endpoint.
   424  type GoogleCloudAssuredworkloadsV1ListWorkloadsResponse struct {
   425  	// NextPageToken: The next page token. Return empty if reached the last page.
   426  	NextPageToken string `json:"nextPageToken,omitempty"`
   427  	// Workloads: List of Workloads under a given parent.
   428  	Workloads []*GoogleCloudAssuredworkloadsV1Workload `json:"workloads,omitempty"`
   429  
   430  	// ServerResponse contains the HTTP response code and headers from the server.
   431  	googleapi.ServerResponse `json:"-"`
   432  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   433  	// unconditionally include in API requests. By default, fields with empty or
   434  	// default values are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   436  	// details.
   437  	ForceSendFields []string `json:"-"`
   438  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   439  	// requests with the JSON null value. By default, fields with empty values are
   440  	// omitted from API requests. See
   441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   442  	NullFields []string `json:"-"`
   443  }
   444  
   445  func (s *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) MarshalJSON() ([]byte, error) {
   446  	type NoMethod GoogleCloudAssuredworkloadsV1ListWorkloadsResponse
   447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   448  }
   449  
   450  // GoogleCloudAssuredworkloadsV1MoveAnalysisGroup: Represents a logical group
   451  // of checks performed for an asset. If successful, the group contains the
   452  // analysis result, otherwise it contains an error with the failure reason.
   453  type GoogleCloudAssuredworkloadsV1MoveAnalysisGroup struct {
   454  	// AnalysisResult: Result of a successful analysis.
   455  	AnalysisResult *GoogleCloudAssuredworkloadsV1MoveAnalysisResult `json:"analysisResult,omitempty"`
   456  	// DisplayName: Name of the analysis group.
   457  	DisplayName string `json:"displayName,omitempty"`
   458  	// Error: Error details for a failed analysis.
   459  	Error *GoogleRpcStatus `json:"error,omitempty"`
   460  	// ForceSendFields is a list of field names (e.g. "AnalysisResult") to
   461  	// unconditionally include in API requests. By default, fields with empty or
   462  	// default values are omitted from API requests. See
   463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   464  	// details.
   465  	ForceSendFields []string `json:"-"`
   466  	// NullFields is a list of field names (e.g. "AnalysisResult") to include in
   467  	// API requests with the JSON null value. By default, fields with empty values
   468  	// are omitted from API requests. See
   469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   470  	NullFields []string `json:"-"`
   471  }
   472  
   473  func (s *GoogleCloudAssuredworkloadsV1MoveAnalysisGroup) MarshalJSON() ([]byte, error) {
   474  	type NoMethod GoogleCloudAssuredworkloadsV1MoveAnalysisGroup
   475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   476  }
   477  
   478  // GoogleCloudAssuredworkloadsV1MoveAnalysisResult: Represents the successful
   479  // move analysis results for a group.
   480  type GoogleCloudAssuredworkloadsV1MoveAnalysisResult struct {
   481  	// Blockers: List of blockers. If not resolved, these will result in compliance
   482  	// violations in the target.
   483  	Blockers []*GoogleCloudAssuredworkloadsV1MoveImpact `json:"blockers,omitempty"`
   484  	// Warnings: List of warnings. These are risks that may or may not result in
   485  	// compliance violations.
   486  	Warnings []*GoogleCloudAssuredworkloadsV1MoveImpact `json:"warnings,omitempty"`
   487  	// ForceSendFields is a list of field names (e.g. "Blockers") to
   488  	// unconditionally include in API requests. By default, fields with empty or
   489  	// default values are omitted from API requests. See
   490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   491  	// details.
   492  	ForceSendFields []string `json:"-"`
   493  	// NullFields is a list of field names (e.g. "Blockers") to include in API
   494  	// requests with the JSON null value. By default, fields with empty values are
   495  	// omitted from API requests. See
   496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   497  	NullFields []string `json:"-"`
   498  }
   499  
   500  func (s *GoogleCloudAssuredworkloadsV1MoveAnalysisResult) MarshalJSON() ([]byte, error) {
   501  	type NoMethod GoogleCloudAssuredworkloadsV1MoveAnalysisResult
   502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   503  }
   504  
   505  // GoogleCloudAssuredworkloadsV1MoveImpact: Represents the impact of moving the
   506  // asset to the target.
   507  type GoogleCloudAssuredworkloadsV1MoveImpact struct {
   508  	// Detail: Explanation of the impact.
   509  	Detail string `json:"detail,omitempty"`
   510  	// ForceSendFields is a list of field names (e.g. "Detail") to unconditionally
   511  	// include in API requests. By default, fields with empty or default values are
   512  	// omitted from API requests. See
   513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   514  	// details.
   515  	ForceSendFields []string `json:"-"`
   516  	// NullFields is a list of field names (e.g. "Detail") to include in API
   517  	// requests with the JSON null value. By default, fields with empty values are
   518  	// omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   520  	NullFields []string `json:"-"`
   521  }
   522  
   523  func (s *GoogleCloudAssuredworkloadsV1MoveImpact) MarshalJSON() ([]byte, error) {
   524  	type NoMethod GoogleCloudAssuredworkloadsV1MoveImpact
   525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   526  }
   527  
   528  // GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest: Request for
   529  // updating permission settings for a partner workload.
   530  type GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest struct {
   531  	// Etag: Optional. The etag of the workload. If this is provided, it must match
   532  	// the server's etag.
   533  	Etag string `json:"etag,omitempty"`
   534  	// PartnerPermissions: Required. The partner permissions to be updated.
   535  	PartnerPermissions *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"`
   536  	// UpdateMask: Required. The list of fields to be updated. E.g. update_mask {
   537  	// paths: "partner_permissions.data_logs_viewer"}
   538  	UpdateMask string `json:"updateMask,omitempty"`
   539  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   540  	// include in API requests. By default, fields with empty or default values are
   541  	// omitted from API requests. See
   542  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   543  	// details.
   544  	ForceSendFields []string `json:"-"`
   545  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   546  	// with the JSON null value. By default, fields with empty values are omitted
   547  	// from API requests. See
   548  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   549  	NullFields []string `json:"-"`
   550  }
   551  
   552  func (s *GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest) MarshalJSON() ([]byte, error) {
   553  	type NoMethod GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest
   554  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   555  }
   556  
   557  // GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest: Request for
   558  // restricting list of available resources in Workload environment.
   559  type GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest struct {
   560  	// RestrictionType: Required. The type of restriction for using gcp products in
   561  	// the Workload environment.
   562  	//
   563  	// Possible values:
   564  	//   "RESTRICTION_TYPE_UNSPECIFIED" - Unknown restriction type.
   565  	//   "ALLOW_ALL_GCP_RESOURCES" - Allow the use all of all gcp products,
   566  	// irrespective of the compliance posture. This effectively removes
   567  	// gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder.
   568  	//   "ALLOW_COMPLIANT_RESOURCES" - Based on Workload's compliance regime,
   569  	// allowed list changes. See -
   570  	// https://cloud.google.com/assured-workloads/docs/supported-products for the
   571  	// list of supported resources.
   572  	//   "APPEND_COMPLIANT_RESOURCES" - Similar to ALLOW_COMPLIANT_RESOURCES but
   573  	// adds the list of compliant resources to the existing list of compliant
   574  	// resources. Effective org-policy of the Folder is considered to ensure there
   575  	// is no disruption to the existing customer workflows.
   576  	RestrictionType string `json:"restrictionType,omitempty"`
   577  	// ForceSendFields is a list of field names (e.g. "RestrictionType") to
   578  	// unconditionally include in API requests. By default, fields with empty or
   579  	// default values are omitted from API requests. See
   580  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   581  	// details.
   582  	ForceSendFields []string `json:"-"`
   583  	// NullFields is a list of field names (e.g. "RestrictionType") to include in
   584  	// API requests with the JSON null value. By default, fields with empty values
   585  	// are omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   587  	NullFields []string `json:"-"`
   588  }
   589  
   590  func (s *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) MarshalJSON() ([]byte, error) {
   591  	type NoMethod GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest
   592  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   593  }
   594  
   595  // GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse: Response for
   596  // restricting the list of allowed resources.
   597  type GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse struct {
   598  	// ServerResponse contains the HTTP response code and headers from the server.
   599  	googleapi.ServerResponse `json:"-"`
   600  }
   601  
   602  // GoogleCloudAssuredworkloadsV1Violation: Workload monitoring Violation.
   603  type GoogleCloudAssuredworkloadsV1Violation struct {
   604  	// Acknowledged: A boolean that indicates if the violation is acknowledged
   605  	Acknowledged bool `json:"acknowledged,omitempty"`
   606  	// AcknowledgementTime: Optional. Timestamp when this violation was
   607  	// acknowledged first. Check exception_contexts to find the last time the
   608  	// violation was acknowledged when there are more than one violations. This
   609  	// field will be absent when acknowledged field is marked as false.
   610  	AcknowledgementTime string `json:"acknowledgementTime,omitempty"`
   611  	// AssociatedOrgPolicyViolationId: Optional. Output only. Violation Id of the
   612  	// org-policy violation due to which the resource violation is caused. Empty
   613  	// for org-policy violations.
   614  	AssociatedOrgPolicyViolationId string `json:"associatedOrgPolicyViolationId,omitempty"`
   615  	// AuditLogLink: Output only. Immutable. Audit Log Link for violated resource
   616  	// Format:
   617  	// https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
   618  	AuditLogLink string `json:"auditLogLink,omitempty"`
   619  	// BeginTime: Output only. Time of the event which triggered the Violation.
   620  	BeginTime string `json:"beginTime,omitempty"`
   621  	// Category: Output only. Category under which this violation is mapped. e.g.
   622  	// Location, Service Usage, Access, Encryption, etc.
   623  	Category string `json:"category,omitempty"`
   624  	// Description: Output only. Description for the Violation. e.g. OrgPolicy
   625  	// gcp.resourceLocations has non compliant value.
   626  	Description string `json:"description,omitempty"`
   627  	// ExceptionAuditLogLink: Output only. Immutable. Audit Log link to find
   628  	// business justification provided for violation exception. Format:
   629  	// https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
   630  	ExceptionAuditLogLink string `json:"exceptionAuditLogLink,omitempty"`
   631  	// ExceptionContexts: Output only. List of all the exception detail added for
   632  	// the violation.
   633  	ExceptionContexts []*GoogleCloudAssuredworkloadsV1ViolationExceptionContext `json:"exceptionContexts,omitempty"`
   634  	// Name: Output only. Immutable. Name of the Violation. Format:
   635  	// organizations/{organization}/locations/{location}/workloads/{workload_id}/vio
   636  	// lations/{violations_id}
   637  	Name string `json:"name,omitempty"`
   638  	// NonCompliantOrgPolicy: Output only. Immutable. Name of the OrgPolicy which
   639  	// was modified with non-compliant change and resulted this violation. Format:
   640  	// projects/{project_number}/policies/{constraint_name}
   641  	// folders/{folder_id}/policies/{constraint_name}
   642  	// organizations/{organization_id}/policies/{constraint_name}
   643  	NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"`
   644  	// OrgPolicyConstraint: Output only. Immutable. The org-policy-constraint that
   645  	// was incorrectly changed, which resulted in this violation.
   646  	OrgPolicyConstraint string `json:"orgPolicyConstraint,omitempty"`
   647  	// ParentProjectNumber: Optional. Output only. Parent project number where
   648  	// resource is present. Empty for org-policy violations.
   649  	ParentProjectNumber string `json:"parentProjectNumber,omitempty"`
   650  	// Remediation: Output only. Compliance violation remediation
   651  	Remediation *GoogleCloudAssuredworkloadsV1ViolationRemediation `json:"remediation,omitempty"`
   652  	// ResolveTime: Output only. Time of the event which fixed the Violation. If
   653  	// the violation is ACTIVE this will be empty.
   654  	ResolveTime string `json:"resolveTime,omitempty"`
   655  	// ResourceName: Optional. Output only. Name of the resource like
   656  	// //storage.googleapis.com/myprojectxyz-testbucket. Empty for org-policy
   657  	// violations.
   658  	ResourceName string `json:"resourceName,omitempty"`
   659  	// ResourceType: Optional. Output only. Type of the resource like
   660  	// compute.googleapis.com/Disk, etc. Empty for org-policy violations.
   661  	ResourceType string `json:"resourceType,omitempty"`
   662  	// State: Output only. State of the violation
   663  	//
   664  	// Possible values:
   665  	//   "STATE_UNSPECIFIED" - Unspecified state.
   666  	//   "RESOLVED" - Violation is resolved.
   667  	//   "UNRESOLVED" - Violation is Unresolved
   668  	//   "EXCEPTION" - Violation is Exception
   669  	State string `json:"state,omitempty"`
   670  	// UpdateTime: Output only. The last time when the Violation record was
   671  	// updated.
   672  	UpdateTime string `json:"updateTime,omitempty"`
   673  	// ViolationType: Output only. Type of the violation
   674  	//
   675  	// Possible values:
   676  	//   "VIOLATION_TYPE_UNSPECIFIED" - Unspecified type.
   677  	//   "ORG_POLICY" - Org Policy Violation.
   678  	//   "RESOURCE" - Resource Violation.
   679  	ViolationType string `json:"violationType,omitempty"`
   680  
   681  	// ServerResponse contains the HTTP response code and headers from the server.
   682  	googleapi.ServerResponse `json:"-"`
   683  	// ForceSendFields is a list of field names (e.g. "Acknowledged") to
   684  	// unconditionally include in API requests. By default, fields with empty or
   685  	// default values are omitted from API requests. See
   686  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   687  	// details.
   688  	ForceSendFields []string `json:"-"`
   689  	// NullFields is a list of field names (e.g. "Acknowledged") to include in API
   690  	// requests with the JSON null value. By default, fields with empty values are
   691  	// omitted from API requests. See
   692  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   693  	NullFields []string `json:"-"`
   694  }
   695  
   696  func (s *GoogleCloudAssuredworkloadsV1Violation) MarshalJSON() ([]byte, error) {
   697  	type NoMethod GoogleCloudAssuredworkloadsV1Violation
   698  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   699  }
   700  
   701  // GoogleCloudAssuredworkloadsV1ViolationExceptionContext: Violation exception
   702  // detail.
   703  type GoogleCloudAssuredworkloadsV1ViolationExceptionContext struct {
   704  	// AcknowledgementTime: Timestamp when the violation was acknowledged.
   705  	AcknowledgementTime string `json:"acknowledgementTime,omitempty"`
   706  	// Comment: Business justification provided towards the acknowledgement of the
   707  	// violation.
   708  	Comment string `json:"comment,omitempty"`
   709  	// UserName: Name of the user (or service account) who acknowledged the
   710  	// violation.
   711  	UserName string `json:"userName,omitempty"`
   712  	// ForceSendFields is a list of field names (e.g. "AcknowledgementTime") to
   713  	// unconditionally include in API requests. By default, fields with empty or
   714  	// default values are omitted from API requests. See
   715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   716  	// details.
   717  	ForceSendFields []string `json:"-"`
   718  	// NullFields is a list of field names (e.g. "AcknowledgementTime") to include
   719  	// in API requests with the JSON null value. By default, fields with empty
   720  	// values are omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   722  	NullFields []string `json:"-"`
   723  }
   724  
   725  func (s *GoogleCloudAssuredworkloadsV1ViolationExceptionContext) MarshalJSON() ([]byte, error) {
   726  	type NoMethod GoogleCloudAssuredworkloadsV1ViolationExceptionContext
   727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   728  }
   729  
   730  // GoogleCloudAssuredworkloadsV1ViolationRemediation: Represents remediation
   731  // guidance to resolve compliance violation for AssuredWorkload
   732  type GoogleCloudAssuredworkloadsV1ViolationRemediation struct {
   733  	// CompliantValues: Values that can resolve the violation For example: for list
   734  	// org policy violations, this will either be the list of allowed or denied
   735  	// values
   736  	CompliantValues []string `json:"compliantValues,omitempty"`
   737  	// Instructions: Required. Remediation instructions to resolve violations
   738  	Instructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions `json:"instructions,omitempty"`
   739  	// RemediationType: Output only. Reemediation type based on the type of org
   740  	// policy values violated
   741  	//
   742  	// Possible values:
   743  	//   "REMEDIATION_TYPE_UNSPECIFIED" - Unspecified remediation type
   744  	//   "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION" - Remediation type for boolean
   745  	// org policy
   746  	//   "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION" - Remediation type
   747  	// for list org policy which have allowed values in the monitoring rule
   748  	//   "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION" - Remediation type
   749  	// for list org policy which have denied values in the monitoring rule
   750  	//   "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" -
   751  	// Remediation type for gcp.restrictCmekCryptoKeyProjects
   752  	//   "REMEDIATION_RESOURCE_VIOLATION" - Remediation type for resource
   753  	// violation.
   754  	RemediationType string `json:"remediationType,omitempty"`
   755  	// ForceSendFields is a list of field names (e.g. "CompliantValues") to
   756  	// unconditionally include in API requests. By default, fields with empty or
   757  	// default values are omitted from API requests. See
   758  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   759  	// details.
   760  	ForceSendFields []string `json:"-"`
   761  	// NullFields is a list of field names (e.g. "CompliantValues") to include in
   762  	// API requests with the JSON null value. By default, fields with empty values
   763  	// are omitted from API requests. See
   764  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   765  	NullFields []string `json:"-"`
   766  }
   767  
   768  func (s *GoogleCloudAssuredworkloadsV1ViolationRemediation) MarshalJSON() ([]byte, error) {
   769  	type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediation
   770  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   771  }
   772  
   773  // GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions: Instructions
   774  // to remediate violation
   775  type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions struct {
   776  	// ConsoleInstructions: Remediation instructions to resolve violation via cloud
   777  	// console
   778  	ConsoleInstructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole `json:"consoleInstructions,omitempty"`
   779  	// GcloudInstructions: Remediation instructions to resolve violation via gcloud
   780  	// cli
   781  	GcloudInstructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud `json:"gcloudInstructions,omitempty"`
   782  	// ForceSendFields is a list of field names (e.g. "ConsoleInstructions") to
   783  	// unconditionally include in API requests. By default, fields with empty or
   784  	// default values are omitted from API requests. See
   785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   786  	// details.
   787  	ForceSendFields []string `json:"-"`
   788  	// NullFields is a list of field names (e.g. "ConsoleInstructions") to include
   789  	// in API requests with the JSON null value. By default, fields with empty
   790  	// values are omitted from API requests. See
   791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   792  	NullFields []string `json:"-"`
   793  }
   794  
   795  func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions) MarshalJSON() ([]byte, error) {
   796  	type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions
   797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   798  }
   799  
   800  // GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole:
   801  // Remediation instructions to resolve violation via cloud console
   802  type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole struct {
   803  	// AdditionalLinks: Additional urls for more information about steps
   804  	AdditionalLinks []string `json:"additionalLinks,omitempty"`
   805  	// ConsoleUris: Link to console page where violations can be resolved
   806  	ConsoleUris []string `json:"consoleUris,omitempty"`
   807  	// Steps: Steps to resolve violation via cloud console
   808  	Steps []string `json:"steps,omitempty"`
   809  	// ForceSendFields is a list of field names (e.g. "AdditionalLinks") to
   810  	// unconditionally include in API requests. By default, fields with empty or
   811  	// default values are omitted from API requests. See
   812  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   813  	// details.
   814  	ForceSendFields []string `json:"-"`
   815  	// NullFields is a list of field names (e.g. "AdditionalLinks") to include in
   816  	// API requests with the JSON null value. By default, fields with empty values
   817  	// are omitted from API requests. See
   818  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   819  	NullFields []string `json:"-"`
   820  }
   821  
   822  func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole) MarshalJSON() ([]byte, error) {
   823  	type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole
   824  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   825  }
   826  
   827  // GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud:
   828  // Remediation instructions to resolve violation via gcloud cli
   829  type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud struct {
   830  	// AdditionalLinks: Additional urls for more information about steps
   831  	AdditionalLinks []string `json:"additionalLinks,omitempty"`
   832  	// GcloudCommands: Gcloud command to resolve violation
   833  	GcloudCommands []string `json:"gcloudCommands,omitempty"`
   834  	// Steps: Steps to resolve violation via gcloud cli
   835  	Steps []string `json:"steps,omitempty"`
   836  	// ForceSendFields is a list of field names (e.g. "AdditionalLinks") to
   837  	// unconditionally include in API requests. By default, fields with empty or
   838  	// default values are omitted from API requests. See
   839  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   840  	// details.
   841  	ForceSendFields []string `json:"-"`
   842  	// NullFields is a list of field names (e.g. "AdditionalLinks") to include in
   843  	// API requests with the JSON null value. By default, fields with empty values
   844  	// are omitted from API requests. See
   845  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   846  	NullFields []string `json:"-"`
   847  }
   848  
   849  func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud) MarshalJSON() ([]byte, error) {
   850  	type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud
   851  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   852  }
   853  
   854  // GoogleCloudAssuredworkloadsV1Workload: A Workload object for managing highly
   855  // regulated workloads of cloud customers.
   856  type GoogleCloudAssuredworkloadsV1Workload struct {
   857  	// BillingAccount: Optional. The billing account used for the resources which
   858  	// are direct children of workload. This billing account is initially
   859  	// associated with the resources created as part of Workload creation. After
   860  	// the initial creation of these resources, the customer can change the
   861  	// assigned billing account. The resource name has the form
   862  	// `billingAccounts/{billing_account_id}`. For example,
   863  	// `billingAccounts/012345-567890-ABCDEF`.
   864  	BillingAccount string `json:"billingAccount,omitempty"`
   865  	// ComplianceRegime: Required. Immutable. Compliance Regime associated with
   866  	// this workload.
   867  	//
   868  	// Possible values:
   869  	//   "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime.
   870  	//   "IL4" - Information protection as per DoD IL4 requirements.
   871  	//   "CJIS" - Criminal Justice Information Services (CJIS) Security policies.
   872  	//   "FEDRAMP_HIGH" - FedRAMP High data protection controls
   873  	//   "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls
   874  	//   "REGIONAL_CONTROLS_PREMIUM_US" - Assured Workloads For US Regions data
   875  	// protection controls
   876  	//   "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data protection
   877  	// controls
   878  	//   "HIPAA" - Health Insurance Portability and Accountability Act controls
   879  	//   "HITRUST" - Health Information Trust Alliance controls
   880  	//   "REGIONAL_CONTROLS_PREMIUM_EU" - Assured Workloads For EU Regions and
   881  	// Support controls
   882  	//   "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and Support
   883  	// controls
   884  	//   "REGIONAL_CONTROLS_PREMIUM_CA" - Assured Workloads For Canada Regions and
   885  	// Support controls
   886  	//   "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and
   887  	// Support controls
   888  	//   "ITAR" - International Traffic in Arms Regulations
   889  	//   "REGIONAL_CONTROLS_PREMIUM_AU" - Assured Workloads for Australia Regions
   890  	// and Support controls
   891  	//   "AU_REGIONS_AND_US_SUPPORT" - Assured Workloads for Australia Regions and
   892  	// Support controls
   893  	//   "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners;
   894  	//   "REGIONAL_CONTROLS_PREMIUM_ISR" - Assured Workloads for Israel
   895  	//   "ISR_REGIONS" - Assured Workloads for Israel Regions
   896  	//   "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions
   897  	//   "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime
   898  	//   "IL5" - Information protection as per DoD IL5 requirements.
   899  	//   "IL2" - Information protection as per DoD IL2 requirements.
   900  	//   "REGIONAL_CONTROLS_PREMIUM_JP" - Assured Workloads for Japan Regions
   901  	//   "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions
   902  	//   "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls.
   903  	//   "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls/Free Regions
   904  	//   "FREE_REGIONS" - Assured Workloads for Regional Controls/Free Regions
   905  	ComplianceRegime string `json:"complianceRegime,omitempty"`
   906  	// ComplianceStatus: Output only. Count of active Violations in the Workload.
   907  	ComplianceStatus *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus `json:"complianceStatus,omitempty"`
   908  	// CompliantButDisallowedServices: Output only. Urls for services which are
   909  	// compliant for this Assured Workload, but which are currently disallowed by
   910  	// the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources
   911  	// endpoint to allow your project developers to use these services in their
   912  	// environment.
   913  	CompliantButDisallowedServices []string `json:"compliantButDisallowedServices,omitempty"`
   914  	// CreateTime: Output only. Immutable. The Workload creation timestamp.
   915  	CreateTime string `json:"createTime,omitempty"`
   916  	// DisplayName: Required. The user-assigned display name of the Workload. When
   917  	// present it must be between 4 to 30 characters. Allowed characters are:
   918  	// lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My
   919  	// Workload
   920  	DisplayName string `json:"displayName,omitempty"`
   921  	// EkmProvisioningResponse: Output only. Represents the Ekm Provisioning State
   922  	// of the given workload.
   923  	EkmProvisioningResponse *GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse `json:"ekmProvisioningResponse,omitempty"`
   924  	// EnableSovereignControls: Optional. Indicates the sovereignty status of the
   925  	// given workload. Currently meant to be used by Europe/Canada customers.
   926  	EnableSovereignControls bool `json:"enableSovereignControls,omitempty"`
   927  	// Etag: Optional. ETag of the workload, it is calculated on the basis of the
   928  	// Workload contents. It will be used in Update & Delete operations.
   929  	Etag string `json:"etag,omitempty"`
   930  	// KajEnrollmentState: Output only. Represents the KAJ enrollment state of the
   931  	// given workload.
   932  	//
   933  	// Possible values:
   934  	//   "KAJ_ENROLLMENT_STATE_UNSPECIFIED" - Default State for KAJ Enrollment.
   935  	//   "KAJ_ENROLLMENT_STATE_PENDING" - Pending State for KAJ Enrollment.
   936  	//   "KAJ_ENROLLMENT_STATE_COMPLETE" - Complete State for KAJ Enrollment.
   937  	KajEnrollmentState string `json:"kajEnrollmentState,omitempty"`
   938  	// KmsSettings: Input only. Settings used to create a CMEK crypto key. When
   939  	// set, a project with a KMS CMEK key is provisioned. This field is deprecated
   940  	// as of Feb 28, 2022. In order to create a Keyring, callers should specify,
   941  	// ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
   942  	KmsSettings *GoogleCloudAssuredworkloadsV1WorkloadKMSSettings `json:"kmsSettings,omitempty"`
   943  	// Labels: Optional. Labels applied to the workload.
   944  	Labels map[string]string `json:"labels,omitempty"`
   945  	// Name: Optional. The resource name of the workload. Format:
   946  	// organizations/{organization}/locations/{location}/workloads/{workload}
   947  	// Read-only.
   948  	Name string `json:"name,omitempty"`
   949  	// Partner: Optional. Partner regime associated with this workload.
   950  	//
   951  	// Possible values:
   952  	//   "PARTNER_UNSPECIFIED"
   953  	//   "LOCAL_CONTROLS_BY_S3NS" - Enum representing S3NS (Thales) partner.
   954  	//   "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" - Enum representing T_SYSTEM (TSI)
   955  	// partner.
   956  	//   "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT" - Enum representing SIA_MINSAIT
   957  	// (Indra) partner.
   958  	//   "SOVEREIGN_CONTROLS_BY_PSN" - Enum representing PSN (TIM) partner.
   959  	Partner string `json:"partner,omitempty"`
   960  	// PartnerPermissions: Optional. Permissions granted to the AW Partner SA
   961  	// account for the customer workload
   962  	PartnerPermissions *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"`
   963  	// ProvisionedResourcesParent: Input only. The parent resource for the
   964  	// resources managed by this Assured Workload. May be either empty or a folder
   965  	// resource which is a child of the Workload parent. If not specified all
   966  	// resources are created under the parent organization. Format:
   967  	// folders/{folder_id}
   968  	ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"`
   969  	// ResourceMonitoringEnabled: Output only. Indicates whether resource
   970  	// monitoring is enabled for workload or not. It is true when Resource feed is
   971  	// subscribed to AWM topic and AWM Service Agent Role is binded to AW Service
   972  	// Account for resource Assured workload.
   973  	ResourceMonitoringEnabled bool `json:"resourceMonitoringEnabled,omitempty"`
   974  	// ResourceSettings: Input only. Resource properties that are used to customize
   975  	// workload resources. These properties (such as custom project id) will be
   976  	// used to create workload resources if possible. This field is optional.
   977  	ResourceSettings []*GoogleCloudAssuredworkloadsV1WorkloadResourceSettings `json:"resourceSettings,omitempty"`
   978  	// Resources: Output only. The resources associated with this workload. These
   979  	// resources will be created when creating the workload. If any of the projects
   980  	// already exist, the workload creation will fail. Always read only.
   981  	Resources []*GoogleCloudAssuredworkloadsV1WorkloadResourceInfo `json:"resources,omitempty"`
   982  	// SaaEnrollmentResponse: Output only. Represents the SAA enrollment response
   983  	// of the given workload. SAA enrollment response is queried during GetWorkload
   984  	// call. In failure cases, user friendly error message is shown in SAA details
   985  	// page.
   986  	SaaEnrollmentResponse *GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse `json:"saaEnrollmentResponse,omitempty"`
   987  	// ViolationNotificationsEnabled: Optional. Indicates whether the e-mail
   988  	// notification for a violation is enabled for a workload. This value will be
   989  	// by default True, and if not present will be considered as true. This should
   990  	// only be updated via updateWorkload call. Any Changes to this field during
   991  	// the createWorkload call will not be honored. This will always be true while
   992  	// creating the workload.
   993  	ViolationNotificationsEnabled bool `json:"violationNotificationsEnabled,omitempty"`
   994  
   995  	// ServerResponse contains the HTTP response code and headers from the server.
   996  	googleapi.ServerResponse `json:"-"`
   997  	// ForceSendFields is a list of field names (e.g. "BillingAccount") to
   998  	// unconditionally include in API requests. By default, fields with empty or
   999  	// default values are omitted from API requests. See
  1000  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1001  	// details.
  1002  	ForceSendFields []string `json:"-"`
  1003  	// NullFields is a list of field names (e.g. "BillingAccount") to include in
  1004  	// API requests with the JSON null value. By default, fields with empty values
  1005  	// are omitted from API requests. See
  1006  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1007  	NullFields []string `json:"-"`
  1008  }
  1009  
  1010  func (s *GoogleCloudAssuredworkloadsV1Workload) MarshalJSON() ([]byte, error) {
  1011  	type NoMethod GoogleCloudAssuredworkloadsV1Workload
  1012  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1013  }
  1014  
  1015  // GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus: Represents the
  1016  // Compliance Status of this workload
  1017  type GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus struct {
  1018  	// AcknowledgedResourceViolationCount: Number of current resource violations
  1019  	// which are not acknowledged.
  1020  	AcknowledgedResourceViolationCount int64 `json:"acknowledgedResourceViolationCount,omitempty"`
  1021  	// AcknowledgedViolationCount: Number of current orgPolicy violations which are
  1022  	// acknowledged.
  1023  	AcknowledgedViolationCount int64 `json:"acknowledgedViolationCount,omitempty"`
  1024  	// ActiveResourceViolationCount: Number of current resource violations which
  1025  	// are acknowledged.
  1026  	ActiveResourceViolationCount int64 `json:"activeResourceViolationCount,omitempty"`
  1027  	// ActiveViolationCount: Number of current orgPolicy violations which are not
  1028  	// acknowledged.
  1029  	ActiveViolationCount int64 `json:"activeViolationCount,omitempty"`
  1030  	// ForceSendFields is a list of field names (e.g.
  1031  	// "AcknowledgedResourceViolationCount") to unconditionally include in API
  1032  	// requests. By default, fields with empty or default values are omitted from
  1033  	// API requests. See
  1034  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1035  	// details.
  1036  	ForceSendFields []string `json:"-"`
  1037  	// NullFields is a list of field names (e.g.
  1038  	// "AcknowledgedResourceViolationCount") to include in API requests with the
  1039  	// JSON null value. By default, fields with empty values are omitted from API
  1040  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
  1041  	// more details.
  1042  	NullFields []string `json:"-"`
  1043  }
  1044  
  1045  func (s *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus) MarshalJSON() ([]byte, error) {
  1046  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus
  1047  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1048  }
  1049  
  1050  // GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse: External key
  1051  // management systems(EKM) Provisioning response
  1052  type GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse struct {
  1053  	// EkmProvisioningErrorDomain: Indicates Ekm provisioning error if any.
  1054  	//
  1055  	// Possible values:
  1056  	//   "EKM_PROVISIONING_ERROR_DOMAIN_UNSPECIFIED" - No error domain
  1057  	//   "UNSPECIFIED_ERROR" - Error but domain is unspecified.
  1058  	//   "GOOGLE_SERVER_ERROR" - Internal logic breaks within provisioning code.
  1059  	//   "EXTERNAL_USER_ERROR" - Error occurred with the customer not granting
  1060  	// permission/creating resource.
  1061  	//   "EXTERNAL_PARTNER_ERROR" - Error occurred within the partner's
  1062  	// provisioning cluster.
  1063  	//   "TIMEOUT_ERROR" - Resource wasn't provisioned in the required 7 day time
  1064  	// period
  1065  	EkmProvisioningErrorDomain string `json:"ekmProvisioningErrorDomain,omitempty"`
  1066  	// EkmProvisioningErrorMapping: Detailed error message if Ekm provisioning
  1067  	// fails
  1068  	//
  1069  	// Possible values:
  1070  	//   "EKM_PROVISIONING_ERROR_MAPPING_UNSPECIFIED" - Error is unspecified.
  1071  	//   "INVALID_SERVICE_ACCOUNT" - Service account is used is invalid.
  1072  	//   "MISSING_METRICS_SCOPE_ADMIN_PERMISSION" - Iam permission
  1073  	// monitoring.MetricsScopeAdmin wasn't applied.
  1074  	//   "MISSING_EKM_CONNECTION_ADMIN_PERMISSION" - Iam permission
  1075  	// cloudkms.ekmConnectionsAdmin wasn't applied.
  1076  	EkmProvisioningErrorMapping string `json:"ekmProvisioningErrorMapping,omitempty"`
  1077  	// EkmProvisioningState: Indicates Ekm enrollment Provisioning of a given
  1078  	// workload.
  1079  	//
  1080  	// Possible values:
  1081  	//   "EKM_PROVISIONING_STATE_UNSPECIFIED" - Default State for Ekm Provisioning
  1082  	//   "EKM_PROVISIONING_STATE_PENDING" - Pending State for Ekm Provisioning
  1083  	//   "EKM_PROVISIONING_STATE_FAILED" - Failed State for Ekm Provisioning
  1084  	//   "EKM_PROVISIONING_STATE_COMPLETED" - Completed State for Ekm Provisioning
  1085  	EkmProvisioningState string `json:"ekmProvisioningState,omitempty"`
  1086  	// ForceSendFields is a list of field names (e.g. "EkmProvisioningErrorDomain")
  1087  	// to unconditionally include in API requests. By default, fields with empty or
  1088  	// default values are omitted from API requests. See
  1089  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1090  	// details.
  1091  	ForceSendFields []string `json:"-"`
  1092  	// NullFields is a list of field names (e.g. "EkmProvisioningErrorDomain") to
  1093  	// include in API requests with the JSON null value. By default, fields with
  1094  	// empty values are omitted from API requests. See
  1095  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1096  	NullFields []string `json:"-"`
  1097  }
  1098  
  1099  func (s *GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse) MarshalJSON() ([]byte, error) {
  1100  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse
  1101  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1102  }
  1103  
  1104  // GoogleCloudAssuredworkloadsV1WorkloadKMSSettings: Settings specific to the
  1105  // Key Management Service.
  1106  type GoogleCloudAssuredworkloadsV1WorkloadKMSSettings struct {
  1107  	// NextRotationTime: Required. Input only. Immutable. The time at which the Key
  1108  	// Management Service will automatically create a new version of the crypto key
  1109  	// and mark it as the primary.
  1110  	NextRotationTime string `json:"nextRotationTime,omitempty"`
  1111  	// RotationPeriod: Required. Input only. Immutable. [next_rotation_time] will
  1112  	// be advanced by this period when the Key Management Service automatically
  1113  	// rotates a key. Must be at least 24 hours and at most 876,000 hours.
  1114  	RotationPeriod string `json:"rotationPeriod,omitempty"`
  1115  	// ForceSendFields is a list of field names (e.g. "NextRotationTime") to
  1116  	// unconditionally include in API requests. By default, fields with empty or
  1117  	// default values are omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1119  	// details.
  1120  	ForceSendFields []string `json:"-"`
  1121  	// NullFields is a list of field names (e.g. "NextRotationTime") to include in
  1122  	// API requests with the JSON null value. By default, fields with empty values
  1123  	// are omitted from API requests. See
  1124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1125  	NullFields []string `json:"-"`
  1126  }
  1127  
  1128  func (s *GoogleCloudAssuredworkloadsV1WorkloadKMSSettings) MarshalJSON() ([]byte, error) {
  1129  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadKMSSettings
  1130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1131  }
  1132  
  1133  // GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions: Permissions granted
  1134  // to the AW Partner SA account for the customer workload
  1135  type GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions struct {
  1136  	// AssuredWorkloadsMonitoring: Optional. Allow partner to view violation
  1137  	// alerts.
  1138  	AssuredWorkloadsMonitoring bool `json:"assuredWorkloadsMonitoring,omitempty"`
  1139  	// DataLogsViewer: Allow the partner to view inspectability logs and monitoring
  1140  	// violations.
  1141  	DataLogsViewer bool `json:"dataLogsViewer,omitempty"`
  1142  	// ServiceAccessApprover: Optional. Allow partner to view access approval logs.
  1143  	ServiceAccessApprover bool `json:"serviceAccessApprover,omitempty"`
  1144  	// ForceSendFields is a list of field names (e.g. "AssuredWorkloadsMonitoring")
  1145  	// to unconditionally include in API requests. By default, fields with empty or
  1146  	// default values are omitted from API requests. See
  1147  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1148  	// details.
  1149  	ForceSendFields []string `json:"-"`
  1150  	// NullFields is a list of field names (e.g. "AssuredWorkloadsMonitoring") to
  1151  	// include in API requests with the JSON null value. By default, fields with
  1152  	// empty values are omitted from API requests. See
  1153  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1154  	NullFields []string `json:"-"`
  1155  }
  1156  
  1157  func (s *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions) MarshalJSON() ([]byte, error) {
  1158  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions
  1159  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1160  }
  1161  
  1162  // GoogleCloudAssuredworkloadsV1WorkloadResourceInfo: Represent the resources
  1163  // that are children of this Workload.
  1164  type GoogleCloudAssuredworkloadsV1WorkloadResourceInfo struct {
  1165  	// ResourceId: Resource identifier. For a project this represents
  1166  	// project_number.
  1167  	ResourceId int64 `json:"resourceId,omitempty,string"`
  1168  	// ResourceType: Indicates the type of resource.
  1169  	//
  1170  	// Possible values:
  1171  	//   "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type.
  1172  	//   "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue to
  1173  	// support this, but new CreateWorkloadRequests should not specify this as an
  1174  	// input value.
  1175  	//   "CONSUMER_FOLDER" - Consumer Folder.
  1176  	//   "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption keys.
  1177  	//   "KEYRING" - Keyring resource that hosts encryption keys.
  1178  	ResourceType string `json:"resourceType,omitempty"`
  1179  	// ForceSendFields is a list of field names (e.g. "ResourceId") to
  1180  	// unconditionally include in API requests. By default, fields with empty or
  1181  	// default values are omitted from API requests. See
  1182  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1183  	// details.
  1184  	ForceSendFields []string `json:"-"`
  1185  	// NullFields is a list of field names (e.g. "ResourceId") to include in API
  1186  	// requests with the JSON null value. By default, fields with empty values are
  1187  	// omitted from API requests. See
  1188  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1189  	NullFields []string `json:"-"`
  1190  }
  1191  
  1192  func (s *GoogleCloudAssuredworkloadsV1WorkloadResourceInfo) MarshalJSON() ([]byte, error) {
  1193  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadResourceInfo
  1194  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1195  }
  1196  
  1197  // GoogleCloudAssuredworkloadsV1WorkloadResourceSettings: Represent the custom
  1198  // settings for the resources to be created.
  1199  type GoogleCloudAssuredworkloadsV1WorkloadResourceSettings struct {
  1200  	// DisplayName: User-assigned resource display name. If not empty it will be
  1201  	// used to create a resource with the specified name.
  1202  	DisplayName string `json:"displayName,omitempty"`
  1203  	// ResourceId: Resource identifier. For a project this represents project_id.
  1204  	// If the project is already taken, the workload creation will fail. For
  1205  	// KeyRing, this represents the keyring_id. For a folder, don't set this value
  1206  	// as folder_id is assigned by Google.
  1207  	ResourceId string `json:"resourceId,omitempty"`
  1208  	// ResourceType: Indicates the type of resource. This field should be specified
  1209  	// to correspond the id to the right project type (CONSUMER_PROJECT or
  1210  	// ENCRYPTION_KEYS_PROJECT)
  1211  	//
  1212  	// Possible values:
  1213  	//   "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type.
  1214  	//   "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue to
  1215  	// support this, but new CreateWorkloadRequests should not specify this as an
  1216  	// input value.
  1217  	//   "CONSUMER_FOLDER" - Consumer Folder.
  1218  	//   "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption keys.
  1219  	//   "KEYRING" - Keyring resource that hosts encryption keys.
  1220  	ResourceType string `json:"resourceType,omitempty"`
  1221  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1222  	// unconditionally include in API requests. By default, fields with empty or
  1223  	// default values are omitted from API requests. See
  1224  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1225  	// details.
  1226  	ForceSendFields []string `json:"-"`
  1227  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1228  	// requests with the JSON null value. By default, fields with empty values are
  1229  	// omitted from API requests. See
  1230  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1231  	NullFields []string `json:"-"`
  1232  }
  1233  
  1234  func (s *GoogleCloudAssuredworkloadsV1WorkloadResourceSettings) MarshalJSON() ([]byte, error) {
  1235  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadResourceSettings
  1236  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1237  }
  1238  
  1239  // GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse: Signed Access
  1240  // Approvals (SAA) enrollment response.
  1241  type GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse struct {
  1242  	// SetupErrors: Indicates SAA enrollment setup error if any.
  1243  	//
  1244  	// Possible values:
  1245  	//   "SETUP_ERROR_UNSPECIFIED" - Unspecified.
  1246  	//   "ERROR_INVALID_BASE_SETUP" - Invalid states for all customers, to be
  1247  	// redirected to AA UI for additional details.
  1248  	//   "ERROR_MISSING_EXTERNAL_SIGNING_KEY" - Returned when there is not an EKM
  1249  	// key configured.
  1250  	//   "ERROR_NOT_ALL_SERVICES_ENROLLED" - Returned when there are no enrolled
  1251  	// services or the customer is enrolled in CAA only for a subset of services.
  1252  	//   "ERROR_SETUP_CHECK_FAILED" - Returned when exception was encountered
  1253  	// during evaluation of other criteria.
  1254  	SetupErrors []string `json:"setupErrors,omitempty"`
  1255  	// SetupStatus: Indicates SAA enrollment status of a given workload.
  1256  	//
  1257  	// Possible values:
  1258  	//   "SETUP_STATE_UNSPECIFIED" - Unspecified.
  1259  	//   "STATUS_PENDING" - SAA enrollment pending.
  1260  	//   "STATUS_COMPLETE" - SAA enrollment comopleted.
  1261  	SetupStatus string `json:"setupStatus,omitempty"`
  1262  	// ForceSendFields is a list of field names (e.g. "SetupErrors") to
  1263  	// unconditionally include in API requests. By default, fields with empty or
  1264  	// default values are omitted from API requests. See
  1265  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1266  	// details.
  1267  	ForceSendFields []string `json:"-"`
  1268  	// NullFields is a list of field names (e.g. "SetupErrors") to include in API
  1269  	// requests with the JSON null value. By default, fields with empty values are
  1270  	// omitted from API requests. See
  1271  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1272  	NullFields []string `json:"-"`
  1273  }
  1274  
  1275  func (s *GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse) MarshalJSON() ([]byte, error) {
  1276  	type NoMethod GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse
  1277  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1278  }
  1279  
  1280  // GoogleLongrunningListOperationsResponse: The response message for
  1281  // Operations.ListOperations.
  1282  type GoogleLongrunningListOperationsResponse struct {
  1283  	// NextPageToken: The standard List next-page token.
  1284  	NextPageToken string `json:"nextPageToken,omitempty"`
  1285  	// Operations: A list of operations that matches the specified filter in the
  1286  	// request.
  1287  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  1288  
  1289  	// ServerResponse contains the HTTP response code and headers from the server.
  1290  	googleapi.ServerResponse `json:"-"`
  1291  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1292  	// unconditionally include in API requests. By default, fields with empty or
  1293  	// default values are omitted from API requests. See
  1294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1295  	// details.
  1296  	ForceSendFields []string `json:"-"`
  1297  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1298  	// requests with the JSON null value. By default, fields with empty values are
  1299  	// omitted from API requests. See
  1300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1301  	NullFields []string `json:"-"`
  1302  }
  1303  
  1304  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  1305  	type NoMethod GoogleLongrunningListOperationsResponse
  1306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1307  }
  1308  
  1309  // GoogleLongrunningOperation: This resource represents a long-running
  1310  // operation that is the result of a network API call.
  1311  type GoogleLongrunningOperation struct {
  1312  	// Done: If the value is `false`, it means the operation is still in progress.
  1313  	// If `true`, the operation is completed, and either `error` or `response` is
  1314  	// available.
  1315  	Done bool `json:"done,omitempty"`
  1316  	// Error: The error result of the operation in case of failure or cancellation.
  1317  	Error *GoogleRpcStatus `json:"error,omitempty"`
  1318  	// Metadata: Service-specific metadata associated with the operation. It
  1319  	// typically contains progress information and common metadata such as create
  1320  	// time. Some services might not provide such metadata. Any method that returns
  1321  	// a long-running operation should document the metadata type, if any.
  1322  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1323  	// Name: The server-assigned name, which is only unique within the same service
  1324  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1325  	// should be a resource name ending with `operations/{unique_id}`.
  1326  	Name string `json:"name,omitempty"`
  1327  	// Response: The normal, successful response of the operation. If the original
  1328  	// method returns no data on success, such as `Delete`, the response is
  1329  	// `google.protobuf.Empty`. If the original method is standard
  1330  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1331  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1332  	// original method name. For example, if the original method name is
  1333  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1334  	Response googleapi.RawMessage `json:"response,omitempty"`
  1335  
  1336  	// ServerResponse contains the HTTP response code and headers from the server.
  1337  	googleapi.ServerResponse `json:"-"`
  1338  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1339  	// include in API requests. By default, fields with empty or default values are
  1340  	// omitted from API requests. See
  1341  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1342  	// details.
  1343  	ForceSendFields []string `json:"-"`
  1344  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1345  	// with the JSON null value. By default, fields with empty values are omitted
  1346  	// from API requests. See
  1347  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1348  	NullFields []string `json:"-"`
  1349  }
  1350  
  1351  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  1352  	type NoMethod GoogleLongrunningOperation
  1353  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1354  }
  1355  
  1356  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
  1357  // defining duplicated empty messages in your APIs. A typical example is to use
  1358  // it as the request or the response type of an API method. For instance:
  1359  // service Foo { rpc Bar(google.protobuf.Empty) returns
  1360  // (google.protobuf.Empty); }
  1361  type GoogleProtobufEmpty struct {
  1362  	// ServerResponse contains the HTTP response code and headers from the server.
  1363  	googleapi.ServerResponse `json:"-"`
  1364  }
  1365  
  1366  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  1367  // suitable for different programming environments, including REST APIs and RPC
  1368  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  1369  // contains three pieces of data: error code, error message, and error details.
  1370  // You can find out more about this error model and how to work with it in the
  1371  // API Design Guide (https://cloud.google.com/apis/design/errors).
  1372  type GoogleRpcStatus struct {
  1373  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1374  	Code int64 `json:"code,omitempty"`
  1375  	// Details: A list of messages that carry the error details. There is a common
  1376  	// set of message types for APIs to use.
  1377  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1378  	// Message: A developer-facing error message, which should be in English. Any
  1379  	// user-facing error message should be localized and sent in the
  1380  	// google.rpc.Status.details field, or localized by the client.
  1381  	Message string `json:"message,omitempty"`
  1382  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1383  	// include in API requests. By default, fields with empty or default values are
  1384  	// omitted from API requests. See
  1385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1386  	// details.
  1387  	ForceSendFields []string `json:"-"`
  1388  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1389  	// with the JSON null value. By default, fields with empty values are omitted
  1390  	// from API requests. See
  1391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1392  	NullFields []string `json:"-"`
  1393  }
  1394  
  1395  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  1396  	type NoMethod GoogleRpcStatus
  1397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1398  }
  1399  
  1400  type OrganizationsLocationsOperationsGetCall struct {
  1401  	s            *Service
  1402  	name         string
  1403  	urlParams_   gensupport.URLParams
  1404  	ifNoneMatch_ string
  1405  	ctx_         context.Context
  1406  	header_      http.Header
  1407  }
  1408  
  1409  // Get: Gets the latest state of a long-running operation. Clients can use this
  1410  // method to poll the operation result at intervals as recommended by the API
  1411  // service.
  1412  //
  1413  // - name: The name of the operation resource.
  1414  func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall {
  1415  	c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1416  	c.name = name
  1417  	return c
  1418  }
  1419  
  1420  // Fields allows partial responses to be retrieved. See
  1421  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1422  // details.
  1423  func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall {
  1424  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1425  	return c
  1426  }
  1427  
  1428  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1429  // object's ETag matches the given value. This is useful for getting updates
  1430  // only after the object has changed since the last request.
  1431  func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall {
  1432  	c.ifNoneMatch_ = entityTag
  1433  	return c
  1434  }
  1435  
  1436  // Context sets the context to be used in this call's Do method.
  1437  func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall {
  1438  	c.ctx_ = ctx
  1439  	return c
  1440  }
  1441  
  1442  // Header returns a http.Header that can be modified by the caller to add
  1443  // headers to the request.
  1444  func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header {
  1445  	if c.header_ == nil {
  1446  		c.header_ = make(http.Header)
  1447  	}
  1448  	return c.header_
  1449  }
  1450  
  1451  func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  1452  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1453  	if c.ifNoneMatch_ != "" {
  1454  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1455  	}
  1456  	var body io.Reader = nil
  1457  	c.urlParams_.Set("alt", alt)
  1458  	c.urlParams_.Set("prettyPrint", "false")
  1459  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1460  	urls += "?" + c.urlParams_.Encode()
  1461  	req, err := http.NewRequest("GET", urls, body)
  1462  	if err != nil {
  1463  		return nil, err
  1464  	}
  1465  	req.Header = reqHeaders
  1466  	googleapi.Expand(req.URL, map[string]string{
  1467  		"name": c.name,
  1468  	})
  1469  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1470  }
  1471  
  1472  // Do executes the "assuredworkloads.organizations.locations.operations.get" call.
  1473  // Any non-2xx status code is an error. Response headers are in either
  1474  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  1475  // returned at all) in error.(*googleapi.Error).Header. Use
  1476  // googleapi.IsNotModified to check whether the returned error was because
  1477  // http.StatusNotModified was returned.
  1478  func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  1479  	gensupport.SetOptions(c.urlParams_, opts...)
  1480  	res, err := c.doRequest("json")
  1481  	if res != nil && res.StatusCode == http.StatusNotModified {
  1482  		if res.Body != nil {
  1483  			res.Body.Close()
  1484  		}
  1485  		return nil, gensupport.WrapError(&googleapi.Error{
  1486  			Code:   res.StatusCode,
  1487  			Header: res.Header,
  1488  		})
  1489  	}
  1490  	if err != nil {
  1491  		return nil, err
  1492  	}
  1493  	defer googleapi.CloseBody(res)
  1494  	if err := googleapi.CheckResponse(res); err != nil {
  1495  		return nil, gensupport.WrapError(err)
  1496  	}
  1497  	ret := &GoogleLongrunningOperation{
  1498  		ServerResponse: googleapi.ServerResponse{
  1499  			Header:         res.Header,
  1500  			HTTPStatusCode: res.StatusCode,
  1501  		},
  1502  	}
  1503  	target := &ret
  1504  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1505  		return nil, err
  1506  	}
  1507  	return ret, nil
  1508  }
  1509  
  1510  type OrganizationsLocationsOperationsListCall struct {
  1511  	s            *Service
  1512  	name         string
  1513  	urlParams_   gensupport.URLParams
  1514  	ifNoneMatch_ string
  1515  	ctx_         context.Context
  1516  	header_      http.Header
  1517  }
  1518  
  1519  // List: Lists operations that match the specified filter in the request. If
  1520  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  1521  //
  1522  // - name: The name of the operation's parent resource.
  1523  func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall {
  1524  	c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1525  	c.name = name
  1526  	return c
  1527  }
  1528  
  1529  // Filter sets the optional parameter "filter": The standard list filter.
  1530  func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall {
  1531  	c.urlParams_.Set("filter", filter)
  1532  	return c
  1533  }
  1534  
  1535  // PageSize sets the optional parameter "pageSize": The standard list page
  1536  // size.
  1537  func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall {
  1538  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1539  	return c
  1540  }
  1541  
  1542  // PageToken sets the optional parameter "pageToken": The standard list page
  1543  // token.
  1544  func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall {
  1545  	c.urlParams_.Set("pageToken", pageToken)
  1546  	return c
  1547  }
  1548  
  1549  // Fields allows partial responses to be retrieved. See
  1550  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1551  // details.
  1552  func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall {
  1553  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1554  	return c
  1555  }
  1556  
  1557  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1558  // object's ETag matches the given value. This is useful for getting updates
  1559  // only after the object has changed since the last request.
  1560  func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall {
  1561  	c.ifNoneMatch_ = entityTag
  1562  	return c
  1563  }
  1564  
  1565  // Context sets the context to be used in this call's Do method.
  1566  func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall {
  1567  	c.ctx_ = ctx
  1568  	return c
  1569  }
  1570  
  1571  // Header returns a http.Header that can be modified by the caller to add
  1572  // headers to the request.
  1573  func (c *OrganizationsLocationsOperationsListCall) Header() http.Header {
  1574  	if c.header_ == nil {
  1575  		c.header_ = make(http.Header)
  1576  	}
  1577  	return c.header_
  1578  }
  1579  
  1580  func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  1581  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1582  	if c.ifNoneMatch_ != "" {
  1583  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1584  	}
  1585  	var body io.Reader = nil
  1586  	c.urlParams_.Set("alt", alt)
  1587  	c.urlParams_.Set("prettyPrint", "false")
  1588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  1589  	urls += "?" + c.urlParams_.Encode()
  1590  	req, err := http.NewRequest("GET", urls, body)
  1591  	if err != nil {
  1592  		return nil, err
  1593  	}
  1594  	req.Header = reqHeaders
  1595  	googleapi.Expand(req.URL, map[string]string{
  1596  		"name": c.name,
  1597  	})
  1598  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1599  }
  1600  
  1601  // Do executes the "assuredworkloads.organizations.locations.operations.list" call.
  1602  // Any non-2xx status code is an error. Response headers are in either
  1603  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  1604  // response was returned at all) in error.(*googleapi.Error).Header. Use
  1605  // googleapi.IsNotModified to check whether the returned error was because
  1606  // http.StatusNotModified was returned.
  1607  func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  1608  	gensupport.SetOptions(c.urlParams_, opts...)
  1609  	res, err := c.doRequest("json")
  1610  	if res != nil && res.StatusCode == http.StatusNotModified {
  1611  		if res.Body != nil {
  1612  			res.Body.Close()
  1613  		}
  1614  		return nil, gensupport.WrapError(&googleapi.Error{
  1615  			Code:   res.StatusCode,
  1616  			Header: res.Header,
  1617  		})
  1618  	}
  1619  	if err != nil {
  1620  		return nil, err
  1621  	}
  1622  	defer googleapi.CloseBody(res)
  1623  	if err := googleapi.CheckResponse(res); err != nil {
  1624  		return nil, gensupport.WrapError(err)
  1625  	}
  1626  	ret := &GoogleLongrunningListOperationsResponse{
  1627  		ServerResponse: googleapi.ServerResponse{
  1628  			Header:         res.Header,
  1629  			HTTPStatusCode: res.StatusCode,
  1630  		},
  1631  	}
  1632  	target := &ret
  1633  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1634  		return nil, err
  1635  	}
  1636  	return ret, nil
  1637  }
  1638  
  1639  // Pages invokes f for each page of results.
  1640  // A non-nil error returned from f will halt the iteration.
  1641  // The provided context supersedes any context provided to the Context method.
  1642  func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  1643  	c.ctx_ = ctx
  1644  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1645  	for {
  1646  		x, err := c.Do()
  1647  		if err != nil {
  1648  			return err
  1649  		}
  1650  		if err := f(x); err != nil {
  1651  			return err
  1652  		}
  1653  		if x.NextPageToken == "" {
  1654  			return nil
  1655  		}
  1656  		c.PageToken(x.NextPageToken)
  1657  	}
  1658  }
  1659  
  1660  type OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall struct {
  1661  	s            *Service
  1662  	target       string
  1663  	urlParams_   gensupport.URLParams
  1664  	ifNoneMatch_ string
  1665  	ctx_         context.Context
  1666  	header_      http.Header
  1667  }
  1668  
  1669  // AnalyzeWorkloadMove: Analyzes a hypothetical move of a source resource to a
  1670  // target workload to surface compliance risks. The analysis is best effort and
  1671  // is not guaranteed to be exhaustive.
  1672  //
  1673  //   - target: The resource ID of the folder-based destination workload. This
  1674  //     workload is where the source resource will hypothetically be moved to.
  1675  //     Specify the workload's relative resource name, formatted as:
  1676  //     "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOA
  1677  //     D_ID}" For example:
  1678  //     "organizations/123/locations/us-east1/workloads/assured-workload-2".
  1679  func (r *OrganizationsLocationsWorkloadsService) AnalyzeWorkloadMove(target string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1680  	c := &OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1681  	c.target = target
  1682  	return c
  1683  }
  1684  
  1685  // AssetTypes sets the optional parameter "assetTypes": List of asset types to
  1686  // be analyzed, including and under the source resource. If empty, all assets
  1687  // are analyzed. The complete list of asset types is available here
  1688  // (https://cloud.google.com/asset-inventory/docs/supported-asset-types).
  1689  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) AssetTypes(assetTypes ...string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1690  	c.urlParams_.SetMulti("assetTypes", append([]string{}, assetTypes...))
  1691  	return c
  1692  }
  1693  
  1694  // PageSize sets the optional parameter "pageSize": Page size. If a value is
  1695  // not specified, the default value of 10 is used.
  1696  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1697  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1698  	return c
  1699  }
  1700  
  1701  // PageToken sets the optional parameter "pageToken": The page token from the
  1702  // previous response. It needs to be passed in the second and following
  1703  // requests.
  1704  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1705  	c.urlParams_.Set("pageToken", pageToken)
  1706  	return c
  1707  }
  1708  
  1709  // Project sets the optional parameter "project": The source type is a project.
  1710  // Specify the project's relative resource name, formatted as either a project
  1711  // number or a project ID: "projects/{PROJECT_NUMBER}" or
  1712  // "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying
  1713  // a project number, or "projects/my-project-123" when specifying a project ID.
  1714  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Project(project string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1715  	c.urlParams_.Set("project", project)
  1716  	return c
  1717  }
  1718  
  1719  // Fields allows partial responses to be retrieved. See
  1720  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1721  // details.
  1722  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1723  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1724  	return c
  1725  }
  1726  
  1727  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1728  // object's ETag matches the given value. This is useful for getting updates
  1729  // only after the object has changed since the last request.
  1730  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1731  	c.ifNoneMatch_ = entityTag
  1732  	return c
  1733  }
  1734  
  1735  // Context sets the context to be used in this call's Do method.
  1736  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall {
  1737  	c.ctx_ = ctx
  1738  	return c
  1739  }
  1740  
  1741  // Header returns a http.Header that can be modified by the caller to add
  1742  // headers to the request.
  1743  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Header() http.Header {
  1744  	if c.header_ == nil {
  1745  		c.header_ = make(http.Header)
  1746  	}
  1747  	return c.header_
  1748  }
  1749  
  1750  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) doRequest(alt string) (*http.Response, error) {
  1751  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1752  	if c.ifNoneMatch_ != "" {
  1753  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1754  	}
  1755  	var body io.Reader = nil
  1756  	c.urlParams_.Set("alt", alt)
  1757  	c.urlParams_.Set("prettyPrint", "false")
  1758  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+target}:analyzeWorkloadMove")
  1759  	urls += "?" + c.urlParams_.Encode()
  1760  	req, err := http.NewRequest("GET", urls, body)
  1761  	if err != nil {
  1762  		return nil, err
  1763  	}
  1764  	req.Header = reqHeaders
  1765  	googleapi.Expand(req.URL, map[string]string{
  1766  		"target": c.target,
  1767  	})
  1768  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1769  }
  1770  
  1771  // Do executes the "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove" call.
  1772  // Any non-2xx status code is an error. Response headers are in either
  1773  // *GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse.ServerResponse.Head
  1774  // er or (if a response was returned at all) in
  1775  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1776  // whether the returned error was because http.StatusNotModified was returned.
  1777  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse, error) {
  1778  	gensupport.SetOptions(c.urlParams_, opts...)
  1779  	res, err := c.doRequest("json")
  1780  	if res != nil && res.StatusCode == http.StatusNotModified {
  1781  		if res.Body != nil {
  1782  			res.Body.Close()
  1783  		}
  1784  		return nil, gensupport.WrapError(&googleapi.Error{
  1785  			Code:   res.StatusCode,
  1786  			Header: res.Header,
  1787  		})
  1788  	}
  1789  	if err != nil {
  1790  		return nil, err
  1791  	}
  1792  	defer googleapi.CloseBody(res)
  1793  	if err := googleapi.CheckResponse(res); err != nil {
  1794  		return nil, gensupport.WrapError(err)
  1795  	}
  1796  	ret := &GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse{
  1797  		ServerResponse: googleapi.ServerResponse{
  1798  			Header:         res.Header,
  1799  			HTTPStatusCode: res.StatusCode,
  1800  		},
  1801  	}
  1802  	target := &ret
  1803  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1804  		return nil, err
  1805  	}
  1806  	return ret, nil
  1807  }
  1808  
  1809  // Pages invokes f for each page of results.
  1810  // A non-nil error returned from f will halt the iteration.
  1811  // The provided context supersedes any context provided to the Context method.
  1812  func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse) error) error {
  1813  	c.ctx_ = ctx
  1814  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1815  	for {
  1816  		x, err := c.Do()
  1817  		if err != nil {
  1818  			return err
  1819  		}
  1820  		if err := f(x); err != nil {
  1821  			return err
  1822  		}
  1823  		if x.NextPageToken == "" {
  1824  			return nil
  1825  		}
  1826  		c.PageToken(x.NextPageToken)
  1827  	}
  1828  }
  1829  
  1830  type OrganizationsLocationsWorkloadsCreateCall struct {
  1831  	s                                     *Service
  1832  	parent                                string
  1833  	googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload
  1834  	urlParams_                            gensupport.URLParams
  1835  	ctx_                                  context.Context
  1836  	header_                               http.Header
  1837  }
  1838  
  1839  // Create: Creates Assured Workload.
  1840  //
  1841  //   - parent: The resource name of the new Workload's parent. Must be of the
  1842  //     form `organizations/{org_id}/locations/{location_id}`.
  1843  func (r *OrganizationsLocationsWorkloadsService) Create(parent string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsCreateCall {
  1844  	c := &OrganizationsLocationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1845  	c.parent = parent
  1846  	c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload
  1847  	return c
  1848  }
  1849  
  1850  // ExternalId sets the optional parameter "externalId": A identifier associated
  1851  // with the workload and underlying projects which allows for the break down of
  1852  // billing costs for a workload. The value provided for the identifier will add
  1853  // a label to the workload and contained projects with the identifier as the
  1854  // value.
  1855  func (c *OrganizationsLocationsWorkloadsCreateCall) ExternalId(externalId string) *OrganizationsLocationsWorkloadsCreateCall {
  1856  	c.urlParams_.Set("externalId", externalId)
  1857  	return c
  1858  }
  1859  
  1860  // Fields allows partial responses to be retrieved. See
  1861  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1862  // details.
  1863  func (c *OrganizationsLocationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsCreateCall {
  1864  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1865  	return c
  1866  }
  1867  
  1868  // Context sets the context to be used in this call's Do method.
  1869  func (c *OrganizationsLocationsWorkloadsCreateCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsCreateCall {
  1870  	c.ctx_ = ctx
  1871  	return c
  1872  }
  1873  
  1874  // Header returns a http.Header that can be modified by the caller to add
  1875  // headers to the request.
  1876  func (c *OrganizationsLocationsWorkloadsCreateCall) Header() http.Header {
  1877  	if c.header_ == nil {
  1878  		c.header_ = make(http.Header)
  1879  	}
  1880  	return c.header_
  1881  }
  1882  
  1883  func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) {
  1884  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1885  	var body io.Reader = nil
  1886  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload)
  1887  	if err != nil {
  1888  		return nil, err
  1889  	}
  1890  	c.urlParams_.Set("alt", alt)
  1891  	c.urlParams_.Set("prettyPrint", "false")
  1892  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads")
  1893  	urls += "?" + c.urlParams_.Encode()
  1894  	req, err := http.NewRequest("POST", urls, body)
  1895  	if err != nil {
  1896  		return nil, err
  1897  	}
  1898  	req.Header = reqHeaders
  1899  	googleapi.Expand(req.URL, map[string]string{
  1900  		"parent": c.parent,
  1901  	})
  1902  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1903  }
  1904  
  1905  // Do executes the "assuredworkloads.organizations.locations.workloads.create" call.
  1906  // Any non-2xx status code is an error. Response headers are in either
  1907  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  1908  // returned at all) in error.(*googleapi.Error).Header. Use
  1909  // googleapi.IsNotModified to check whether the returned error was because
  1910  // http.StatusNotModified was returned.
  1911  func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  1912  	gensupport.SetOptions(c.urlParams_, opts...)
  1913  	res, err := c.doRequest("json")
  1914  	if res != nil && res.StatusCode == http.StatusNotModified {
  1915  		if res.Body != nil {
  1916  			res.Body.Close()
  1917  		}
  1918  		return nil, gensupport.WrapError(&googleapi.Error{
  1919  			Code:   res.StatusCode,
  1920  			Header: res.Header,
  1921  		})
  1922  	}
  1923  	if err != nil {
  1924  		return nil, err
  1925  	}
  1926  	defer googleapi.CloseBody(res)
  1927  	if err := googleapi.CheckResponse(res); err != nil {
  1928  		return nil, gensupport.WrapError(err)
  1929  	}
  1930  	ret := &GoogleLongrunningOperation{
  1931  		ServerResponse: googleapi.ServerResponse{
  1932  			Header:         res.Header,
  1933  			HTTPStatusCode: res.StatusCode,
  1934  		},
  1935  	}
  1936  	target := &ret
  1937  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1938  		return nil, err
  1939  	}
  1940  	return ret, nil
  1941  }
  1942  
  1943  type OrganizationsLocationsWorkloadsDeleteCall struct {
  1944  	s          *Service
  1945  	name       string
  1946  	urlParams_ gensupport.URLParams
  1947  	ctx_       context.Context
  1948  	header_    http.Header
  1949  }
  1950  
  1951  // Delete: Deletes the workload. Make sure that workload's direct children are
  1952  // already in a deleted state, otherwise the request will fail with a
  1953  // FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete
  1954  // permission, the user should also have orgpolicy.policy.set permission on the
  1955  // deleted folder to remove Assured Workloads OrgPolicies.
  1956  //
  1957  //   - name: The `name` field is used to identify the workload. Format:
  1958  //     organizations/{org_id}/locations/{location_id}/workloads/{workload_id}.
  1959  func (r *OrganizationsLocationsWorkloadsService) Delete(name string) *OrganizationsLocationsWorkloadsDeleteCall {
  1960  	c := &OrganizationsLocationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1961  	c.name = name
  1962  	return c
  1963  }
  1964  
  1965  // Etag sets the optional parameter "etag": The etag of the workload. If this
  1966  // is provided, it must match the server's etag.
  1967  func (c *OrganizationsLocationsWorkloadsDeleteCall) Etag(etag string) *OrganizationsLocationsWorkloadsDeleteCall {
  1968  	c.urlParams_.Set("etag", etag)
  1969  	return c
  1970  }
  1971  
  1972  // Fields allows partial responses to be retrieved. See
  1973  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1974  // details.
  1975  func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsDeleteCall {
  1976  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1977  	return c
  1978  }
  1979  
  1980  // Context sets the context to be used in this call's Do method.
  1981  func (c *OrganizationsLocationsWorkloadsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsDeleteCall {
  1982  	c.ctx_ = ctx
  1983  	return c
  1984  }
  1985  
  1986  // Header returns a http.Header that can be modified by the caller to add
  1987  // headers to the request.
  1988  func (c *OrganizationsLocationsWorkloadsDeleteCall) Header() http.Header {
  1989  	if c.header_ == nil {
  1990  		c.header_ = make(http.Header)
  1991  	}
  1992  	return c.header_
  1993  }
  1994  
  1995  func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1996  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1997  	var body io.Reader = nil
  1998  	c.urlParams_.Set("alt", alt)
  1999  	c.urlParams_.Set("prettyPrint", "false")
  2000  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2001  	urls += "?" + c.urlParams_.Encode()
  2002  	req, err := http.NewRequest("DELETE", urls, body)
  2003  	if err != nil {
  2004  		return nil, err
  2005  	}
  2006  	req.Header = reqHeaders
  2007  	googleapi.Expand(req.URL, map[string]string{
  2008  		"name": c.name,
  2009  	})
  2010  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2011  }
  2012  
  2013  // Do executes the "assuredworkloads.organizations.locations.workloads.delete" call.
  2014  // Any non-2xx status code is an error. Response headers are in either
  2015  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  2016  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2017  // check whether the returned error was because http.StatusNotModified was
  2018  // returned.
  2019  func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  2020  	gensupport.SetOptions(c.urlParams_, opts...)
  2021  	res, err := c.doRequest("json")
  2022  	if res != nil && res.StatusCode == http.StatusNotModified {
  2023  		if res.Body != nil {
  2024  			res.Body.Close()
  2025  		}
  2026  		return nil, gensupport.WrapError(&googleapi.Error{
  2027  			Code:   res.StatusCode,
  2028  			Header: res.Header,
  2029  		})
  2030  	}
  2031  	if err != nil {
  2032  		return nil, err
  2033  	}
  2034  	defer googleapi.CloseBody(res)
  2035  	if err := googleapi.CheckResponse(res); err != nil {
  2036  		return nil, gensupport.WrapError(err)
  2037  	}
  2038  	ret := &GoogleProtobufEmpty{
  2039  		ServerResponse: googleapi.ServerResponse{
  2040  			Header:         res.Header,
  2041  			HTTPStatusCode: res.StatusCode,
  2042  		},
  2043  	}
  2044  	target := &ret
  2045  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2046  		return nil, err
  2047  	}
  2048  	return ret, nil
  2049  }
  2050  
  2051  type OrganizationsLocationsWorkloadsEnableResourceMonitoringCall struct {
  2052  	s          *Service
  2053  	name       string
  2054  	urlParams_ gensupport.URLParams
  2055  	ctx_       context.Context
  2056  	header_    http.Header
  2057  }
  2058  
  2059  // EnableResourceMonitoring: Enable resource violation monitoring for a
  2060  // workload.
  2061  //
  2062  //   - name: The `name` field is used to identify the workload. Format:
  2063  //     organizations/{org_id}/locations/{location_id}/workloads/{workload_id}.
  2064  func (r *OrganizationsLocationsWorkloadsService) EnableResourceMonitoring(name string) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall {
  2065  	c := &OrganizationsLocationsWorkloadsEnableResourceMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2066  	c.name = name
  2067  	return c
  2068  }
  2069  
  2070  // Fields allows partial responses to be retrieved. See
  2071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2072  // details.
  2073  func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall {
  2074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2075  	return c
  2076  }
  2077  
  2078  // Context sets the context to be used in this call's Do method.
  2079  func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall {
  2080  	c.ctx_ = ctx
  2081  	return c
  2082  }
  2083  
  2084  // Header returns a http.Header that can be modified by the caller to add
  2085  // headers to the request.
  2086  func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Header() http.Header {
  2087  	if c.header_ == nil {
  2088  		c.header_ = make(http.Header)
  2089  	}
  2090  	return c.header_
  2091  }
  2092  
  2093  func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) doRequest(alt string) (*http.Response, error) {
  2094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2095  	var body io.Reader = nil
  2096  	c.urlParams_.Set("alt", alt)
  2097  	c.urlParams_.Set("prettyPrint", "false")
  2098  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enableResourceMonitoring")
  2099  	urls += "?" + c.urlParams_.Encode()
  2100  	req, err := http.NewRequest("POST", urls, body)
  2101  	if err != nil {
  2102  		return nil, err
  2103  	}
  2104  	req.Header = reqHeaders
  2105  	googleapi.Expand(req.URL, map[string]string{
  2106  		"name": c.name,
  2107  	})
  2108  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2109  }
  2110  
  2111  // Do executes the "assuredworkloads.organizations.locations.workloads.enableResourceMonitoring" call.
  2112  // Any non-2xx status code is an error. Response headers are in either
  2113  // *GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse.ServerResponse
  2114  // .Header or (if a response was returned at all) in
  2115  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2116  // whether the returned error was because http.StatusNotModified was returned.
  2117  func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse, error) {
  2118  	gensupport.SetOptions(c.urlParams_, opts...)
  2119  	res, err := c.doRequest("json")
  2120  	if res != nil && res.StatusCode == http.StatusNotModified {
  2121  		if res.Body != nil {
  2122  			res.Body.Close()
  2123  		}
  2124  		return nil, gensupport.WrapError(&googleapi.Error{
  2125  			Code:   res.StatusCode,
  2126  			Header: res.Header,
  2127  		})
  2128  	}
  2129  	if err != nil {
  2130  		return nil, err
  2131  	}
  2132  	defer googleapi.CloseBody(res)
  2133  	if err := googleapi.CheckResponse(res); err != nil {
  2134  		return nil, gensupport.WrapError(err)
  2135  	}
  2136  	ret := &GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse{
  2137  		ServerResponse: googleapi.ServerResponse{
  2138  			Header:         res.Header,
  2139  			HTTPStatusCode: res.StatusCode,
  2140  		},
  2141  	}
  2142  	target := &ret
  2143  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2144  		return nil, err
  2145  	}
  2146  	return ret, nil
  2147  }
  2148  
  2149  type OrganizationsLocationsWorkloadsGetCall struct {
  2150  	s            *Service
  2151  	name         string
  2152  	urlParams_   gensupport.URLParams
  2153  	ifNoneMatch_ string
  2154  	ctx_         context.Context
  2155  	header_      http.Header
  2156  }
  2157  
  2158  // Get: Gets Assured Workload associated with a CRM Node
  2159  //
  2160  //   - name: The resource name of the Workload to fetch. This is the workloads's
  2161  //     relative path in the API, formatted as
  2162  //     "organizations/{organization_id}/locations/{location_id}/workloads/{workloa
  2163  //     d_id}". For example,
  2164  //     "organizations/123/locations/us-east1/workloads/assured-workload-1".
  2165  func (r *OrganizationsLocationsWorkloadsService) Get(name string) *OrganizationsLocationsWorkloadsGetCall {
  2166  	c := &OrganizationsLocationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2167  	c.name = name
  2168  	return c
  2169  }
  2170  
  2171  // Fields allows partial responses to be retrieved. See
  2172  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2173  // details.
  2174  func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsGetCall {
  2175  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2176  	return c
  2177  }
  2178  
  2179  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2180  // object's ETag matches the given value. This is useful for getting updates
  2181  // only after the object has changed since the last request.
  2182  func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsGetCall {
  2183  	c.ifNoneMatch_ = entityTag
  2184  	return c
  2185  }
  2186  
  2187  // Context sets the context to be used in this call's Do method.
  2188  func (c *OrganizationsLocationsWorkloadsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsGetCall {
  2189  	c.ctx_ = ctx
  2190  	return c
  2191  }
  2192  
  2193  // Header returns a http.Header that can be modified by the caller to add
  2194  // headers to the request.
  2195  func (c *OrganizationsLocationsWorkloadsGetCall) Header() http.Header {
  2196  	if c.header_ == nil {
  2197  		c.header_ = make(http.Header)
  2198  	}
  2199  	return c.header_
  2200  }
  2201  
  2202  func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) {
  2203  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2204  	if c.ifNoneMatch_ != "" {
  2205  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2206  	}
  2207  	var body io.Reader = nil
  2208  	c.urlParams_.Set("alt", alt)
  2209  	c.urlParams_.Set("prettyPrint", "false")
  2210  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2211  	urls += "?" + c.urlParams_.Encode()
  2212  	req, err := http.NewRequest("GET", urls, body)
  2213  	if err != nil {
  2214  		return nil, err
  2215  	}
  2216  	req.Header = reqHeaders
  2217  	googleapi.Expand(req.URL, map[string]string{
  2218  		"name": c.name,
  2219  	})
  2220  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2221  }
  2222  
  2223  // Do executes the "assuredworkloads.organizations.locations.workloads.get" call.
  2224  // Any non-2xx status code is an error. Response headers are in either
  2225  // *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a
  2226  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2227  // googleapi.IsNotModified to check whether the returned error was because
  2228  // http.StatusNotModified was returned.
  2229  func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) {
  2230  	gensupport.SetOptions(c.urlParams_, opts...)
  2231  	res, err := c.doRequest("json")
  2232  	if res != nil && res.StatusCode == http.StatusNotModified {
  2233  		if res.Body != nil {
  2234  			res.Body.Close()
  2235  		}
  2236  		return nil, gensupport.WrapError(&googleapi.Error{
  2237  			Code:   res.StatusCode,
  2238  			Header: res.Header,
  2239  		})
  2240  	}
  2241  	if err != nil {
  2242  		return nil, err
  2243  	}
  2244  	defer googleapi.CloseBody(res)
  2245  	if err := googleapi.CheckResponse(res); err != nil {
  2246  		return nil, gensupport.WrapError(err)
  2247  	}
  2248  	ret := &GoogleCloudAssuredworkloadsV1Workload{
  2249  		ServerResponse: googleapi.ServerResponse{
  2250  			Header:         res.Header,
  2251  			HTTPStatusCode: res.StatusCode,
  2252  		},
  2253  	}
  2254  	target := &ret
  2255  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2256  		return nil, err
  2257  	}
  2258  	return ret, nil
  2259  }
  2260  
  2261  type OrganizationsLocationsWorkloadsListCall struct {
  2262  	s            *Service
  2263  	parent       string
  2264  	urlParams_   gensupport.URLParams
  2265  	ifNoneMatch_ string
  2266  	ctx_         context.Context
  2267  	header_      http.Header
  2268  }
  2269  
  2270  // List: Lists Assured Workloads under a CRM Node.
  2271  //
  2272  //   - parent: Parent Resource to list workloads from. Must be of the form
  2273  //     `organizations/{org_id}/locations/{location}`.
  2274  func (r *OrganizationsLocationsWorkloadsService) List(parent string) *OrganizationsLocationsWorkloadsListCall {
  2275  	c := &OrganizationsLocationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2276  	c.parent = parent
  2277  	return c
  2278  }
  2279  
  2280  // Filter sets the optional parameter "filter": A custom filter for filtering
  2281  // by properties of a workload. At this time, only filtering by labels is
  2282  // supported.
  2283  func (c *OrganizationsLocationsWorkloadsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsListCall {
  2284  	c.urlParams_.Set("filter", filter)
  2285  	return c
  2286  }
  2287  
  2288  // PageSize sets the optional parameter "pageSize": Page size.
  2289  func (c *OrganizationsLocationsWorkloadsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsListCall {
  2290  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2291  	return c
  2292  }
  2293  
  2294  // PageToken sets the optional parameter "pageToken": Page token returned from
  2295  // previous request. Page token contains context from previous request. Page
  2296  // token needs to be passed in the second and following requests.
  2297  func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsListCall {
  2298  	c.urlParams_.Set("pageToken", pageToken)
  2299  	return c
  2300  }
  2301  
  2302  // Fields allows partial responses to be retrieved. See
  2303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2304  // details.
  2305  func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsListCall {
  2306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2307  	return c
  2308  }
  2309  
  2310  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2311  // object's ETag matches the given value. This is useful for getting updates
  2312  // only after the object has changed since the last request.
  2313  func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsListCall {
  2314  	c.ifNoneMatch_ = entityTag
  2315  	return c
  2316  }
  2317  
  2318  // Context sets the context to be used in this call's Do method.
  2319  func (c *OrganizationsLocationsWorkloadsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsListCall {
  2320  	c.ctx_ = ctx
  2321  	return c
  2322  }
  2323  
  2324  // Header returns a http.Header that can be modified by the caller to add
  2325  // headers to the request.
  2326  func (c *OrganizationsLocationsWorkloadsListCall) Header() http.Header {
  2327  	if c.header_ == nil {
  2328  		c.header_ = make(http.Header)
  2329  	}
  2330  	return c.header_
  2331  }
  2332  
  2333  func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) {
  2334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2335  	if c.ifNoneMatch_ != "" {
  2336  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2337  	}
  2338  	var body io.Reader = nil
  2339  	c.urlParams_.Set("alt", alt)
  2340  	c.urlParams_.Set("prettyPrint", "false")
  2341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads")
  2342  	urls += "?" + c.urlParams_.Encode()
  2343  	req, err := http.NewRequest("GET", urls, body)
  2344  	if err != nil {
  2345  		return nil, err
  2346  	}
  2347  	req.Header = reqHeaders
  2348  	googleapi.Expand(req.URL, map[string]string{
  2349  		"parent": c.parent,
  2350  	})
  2351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2352  }
  2353  
  2354  // Do executes the "assuredworkloads.organizations.locations.workloads.list" call.
  2355  // Any non-2xx status code is an error. Response headers are in either
  2356  // *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse.ServerResponse.Header or
  2357  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  2358  // googleapi.IsNotModified to check whether the returned error was because
  2359  // http.StatusNotModified was returned.
  2360  func (c *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse, error) {
  2361  	gensupport.SetOptions(c.urlParams_, opts...)
  2362  	res, err := c.doRequest("json")
  2363  	if res != nil && res.StatusCode == http.StatusNotModified {
  2364  		if res.Body != nil {
  2365  			res.Body.Close()
  2366  		}
  2367  		return nil, gensupport.WrapError(&googleapi.Error{
  2368  			Code:   res.StatusCode,
  2369  			Header: res.Header,
  2370  		})
  2371  	}
  2372  	if err != nil {
  2373  		return nil, err
  2374  	}
  2375  	defer googleapi.CloseBody(res)
  2376  	if err := googleapi.CheckResponse(res); err != nil {
  2377  		return nil, gensupport.WrapError(err)
  2378  	}
  2379  	ret := &GoogleCloudAssuredworkloadsV1ListWorkloadsResponse{
  2380  		ServerResponse: googleapi.ServerResponse{
  2381  			Header:         res.Header,
  2382  			HTTPStatusCode: res.StatusCode,
  2383  		},
  2384  	}
  2385  	target := &ret
  2386  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2387  		return nil, err
  2388  	}
  2389  	return ret, nil
  2390  }
  2391  
  2392  // Pages invokes f for each page of results.
  2393  // A non-nil error returned from f will halt the iteration.
  2394  // The provided context supersedes any context provided to the Context method.
  2395  func (c *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) error) error {
  2396  	c.ctx_ = ctx
  2397  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2398  	for {
  2399  		x, err := c.Do()
  2400  		if err != nil {
  2401  			return err
  2402  		}
  2403  		if err := f(x); err != nil {
  2404  			return err
  2405  		}
  2406  		if x.NextPageToken == "" {
  2407  			return nil
  2408  		}
  2409  		c.PageToken(x.NextPageToken)
  2410  	}
  2411  }
  2412  
  2413  type OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall struct {
  2414  	s                                                            *Service
  2415  	name                                                         string
  2416  	googlecloudassuredworkloadsv1mutatepartnerpermissionsrequest *GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest
  2417  	urlParams_                                                   gensupport.URLParams
  2418  	ctx_                                                         context.Context
  2419  	header_                                                      http.Header
  2420  }
  2421  
  2422  // MutatePartnerPermissions: Update the permissions settings for an existing
  2423  // partner workload. For force updates don't set etag field in the Workload.
  2424  // Only one update operation per workload can be in progress.
  2425  //
  2426  //   - name: The `name` field is used to identify the workload. Format:
  2427  //     organizations/{org_id}/locations/{location_id}/workloads/{workload_id}.
  2428  func (r *OrganizationsLocationsWorkloadsService) MutatePartnerPermissions(name string, googlecloudassuredworkloadsv1mutatepartnerpermissionsrequest *GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest) *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall {
  2429  	c := &OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2430  	c.name = name
  2431  	c.googlecloudassuredworkloadsv1mutatepartnerpermissionsrequest = googlecloudassuredworkloadsv1mutatepartnerpermissionsrequest
  2432  	return c
  2433  }
  2434  
  2435  // Fields allows partial responses to be retrieved. See
  2436  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2437  // details.
  2438  func (c *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall {
  2439  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2440  	return c
  2441  }
  2442  
  2443  // Context sets the context to be used in this call's Do method.
  2444  func (c *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall {
  2445  	c.ctx_ = ctx
  2446  	return c
  2447  }
  2448  
  2449  // Header returns a http.Header that can be modified by the caller to add
  2450  // headers to the request.
  2451  func (c *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall) Header() http.Header {
  2452  	if c.header_ == nil {
  2453  		c.header_ = make(http.Header)
  2454  	}
  2455  	return c.header_
  2456  }
  2457  
  2458  func (c *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2459  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2460  	var body io.Reader = nil
  2461  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1mutatepartnerpermissionsrequest)
  2462  	if err != nil {
  2463  		return nil, err
  2464  	}
  2465  	c.urlParams_.Set("alt", alt)
  2466  	c.urlParams_.Set("prettyPrint", "false")
  2467  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:mutatePartnerPermissions")
  2468  	urls += "?" + c.urlParams_.Encode()
  2469  	req, err := http.NewRequest("PATCH", urls, body)
  2470  	if err != nil {
  2471  		return nil, err
  2472  	}
  2473  	req.Header = reqHeaders
  2474  	googleapi.Expand(req.URL, map[string]string{
  2475  		"name": c.name,
  2476  	})
  2477  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2478  }
  2479  
  2480  // Do executes the "assuredworkloads.organizations.locations.workloads.mutatePartnerPermissions" call.
  2481  // Any non-2xx status code is an error. Response headers are in either
  2482  // *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a
  2483  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2484  // googleapi.IsNotModified to check whether the returned error was because
  2485  // http.StatusNotModified was returned.
  2486  func (c *OrganizationsLocationsWorkloadsMutatePartnerPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) {
  2487  	gensupport.SetOptions(c.urlParams_, opts...)
  2488  	res, err := c.doRequest("json")
  2489  	if res != nil && res.StatusCode == http.StatusNotModified {
  2490  		if res.Body != nil {
  2491  			res.Body.Close()
  2492  		}
  2493  		return nil, gensupport.WrapError(&googleapi.Error{
  2494  			Code:   res.StatusCode,
  2495  			Header: res.Header,
  2496  		})
  2497  	}
  2498  	if err != nil {
  2499  		return nil, err
  2500  	}
  2501  	defer googleapi.CloseBody(res)
  2502  	if err := googleapi.CheckResponse(res); err != nil {
  2503  		return nil, gensupport.WrapError(err)
  2504  	}
  2505  	ret := &GoogleCloudAssuredworkloadsV1Workload{
  2506  		ServerResponse: googleapi.ServerResponse{
  2507  			Header:         res.Header,
  2508  			HTTPStatusCode: res.StatusCode,
  2509  		},
  2510  	}
  2511  	target := &ret
  2512  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2513  		return nil, err
  2514  	}
  2515  	return ret, nil
  2516  }
  2517  
  2518  type OrganizationsLocationsWorkloadsPatchCall struct {
  2519  	s                                     *Service
  2520  	name                                  string
  2521  	googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload
  2522  	urlParams_                            gensupport.URLParams
  2523  	ctx_                                  context.Context
  2524  	header_                               http.Header
  2525  }
  2526  
  2527  // Patch: Updates an existing workload. Currently allows updating of workload
  2528  // display_name and labels. For force updates don't set etag field in the
  2529  // Workload. Only one update operation per workload can be in progress.
  2530  //
  2531  //   - name: Optional. The resource name of the workload. Format:
  2532  //     organizations/{organization}/locations/{location}/workloads/{workload}
  2533  //     Read-only.
  2534  func (r *OrganizationsLocationsWorkloadsService) Patch(name string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsPatchCall {
  2535  	c := &OrganizationsLocationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2536  	c.name = name
  2537  	c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload
  2538  	return c
  2539  }
  2540  
  2541  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  2542  // fields to be updated.
  2543  func (c *OrganizationsLocationsWorkloadsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsWorkloadsPatchCall {
  2544  	c.urlParams_.Set("updateMask", updateMask)
  2545  	return c
  2546  }
  2547  
  2548  // Fields allows partial responses to be retrieved. See
  2549  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2550  // details.
  2551  func (c *OrganizationsLocationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsPatchCall {
  2552  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2553  	return c
  2554  }
  2555  
  2556  // Context sets the context to be used in this call's Do method.
  2557  func (c *OrganizationsLocationsWorkloadsPatchCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsPatchCall {
  2558  	c.ctx_ = ctx
  2559  	return c
  2560  }
  2561  
  2562  // Header returns a http.Header that can be modified by the caller to add
  2563  // headers to the request.
  2564  func (c *OrganizationsLocationsWorkloadsPatchCall) Header() http.Header {
  2565  	if c.header_ == nil {
  2566  		c.header_ = make(http.Header)
  2567  	}
  2568  	return c.header_
  2569  }
  2570  
  2571  func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) {
  2572  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2573  	var body io.Reader = nil
  2574  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload)
  2575  	if err != nil {
  2576  		return nil, err
  2577  	}
  2578  	c.urlParams_.Set("alt", alt)
  2579  	c.urlParams_.Set("prettyPrint", "false")
  2580  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2581  	urls += "?" + c.urlParams_.Encode()
  2582  	req, err := http.NewRequest("PATCH", urls, body)
  2583  	if err != nil {
  2584  		return nil, err
  2585  	}
  2586  	req.Header = reqHeaders
  2587  	googleapi.Expand(req.URL, map[string]string{
  2588  		"name": c.name,
  2589  	})
  2590  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2591  }
  2592  
  2593  // Do executes the "assuredworkloads.organizations.locations.workloads.patch" call.
  2594  // Any non-2xx status code is an error. Response headers are in either
  2595  // *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a
  2596  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2597  // googleapi.IsNotModified to check whether the returned error was because
  2598  // http.StatusNotModified was returned.
  2599  func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) {
  2600  	gensupport.SetOptions(c.urlParams_, opts...)
  2601  	res, err := c.doRequest("json")
  2602  	if res != nil && res.StatusCode == http.StatusNotModified {
  2603  		if res.Body != nil {
  2604  			res.Body.Close()
  2605  		}
  2606  		return nil, gensupport.WrapError(&googleapi.Error{
  2607  			Code:   res.StatusCode,
  2608  			Header: res.Header,
  2609  		})
  2610  	}
  2611  	if err != nil {
  2612  		return nil, err
  2613  	}
  2614  	defer googleapi.CloseBody(res)
  2615  	if err := googleapi.CheckResponse(res); err != nil {
  2616  		return nil, gensupport.WrapError(err)
  2617  	}
  2618  	ret := &GoogleCloudAssuredworkloadsV1Workload{
  2619  		ServerResponse: googleapi.ServerResponse{
  2620  			Header:         res.Header,
  2621  			HTTPStatusCode: res.StatusCode,
  2622  		},
  2623  	}
  2624  	target := &ret
  2625  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2626  		return nil, err
  2627  	}
  2628  	return ret, nil
  2629  }
  2630  
  2631  type OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall struct {
  2632  	s                                                            *Service
  2633  	name                                                         string
  2634  	googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest
  2635  	urlParams_                                                   gensupport.URLParams
  2636  	ctx_                                                         context.Context
  2637  	header_                                                      http.Header
  2638  }
  2639  
  2640  // RestrictAllowedResources: Restrict the list of resources allowed in the
  2641  // Workload environment. The current list of allowed products can be found at
  2642  // https://cloud.google.com/assured-workloads/docs/supported-products In
  2643  // addition to assuredworkloads.workload.update permission, the user should
  2644  // also have orgpolicy.policy.set permission on the folder resource to use this
  2645  // functionality.
  2646  //
  2647  //   - name: The resource name of the Workload. This is the workloads's relative
  2648  //     path in the API, formatted as
  2649  //     "organizations/{organization_id}/locations/{location_id}/workloads/{workloa
  2650  //     d_id}". For example,
  2651  //     "organizations/123/locations/us-east1/workloads/assured-workload-1".
  2652  func (r *OrganizationsLocationsWorkloadsService) RestrictAllowedResources(name string, googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall {
  2653  	c := &OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2654  	c.name = name
  2655  	c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest = googlecloudassuredworkloadsv1restrictallowedresourcesrequest
  2656  	return c
  2657  }
  2658  
  2659  // Fields allows partial responses to be retrieved. See
  2660  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2661  // details.
  2662  func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall {
  2663  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2664  	return c
  2665  }
  2666  
  2667  // Context sets the context to be used in this call's Do method.
  2668  func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall {
  2669  	c.ctx_ = ctx
  2670  	return c
  2671  }
  2672  
  2673  // Header returns a http.Header that can be modified by the caller to add
  2674  // headers to the request.
  2675  func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Header() http.Header {
  2676  	if c.header_ == nil {
  2677  		c.header_ = make(http.Header)
  2678  	}
  2679  	return c.header_
  2680  }
  2681  
  2682  func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) doRequest(alt string) (*http.Response, error) {
  2683  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2684  	var body io.Reader = nil
  2685  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest)
  2686  	if err != nil {
  2687  		return nil, err
  2688  	}
  2689  	c.urlParams_.Set("alt", alt)
  2690  	c.urlParams_.Set("prettyPrint", "false")
  2691  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restrictAllowedResources")
  2692  	urls += "?" + c.urlParams_.Encode()
  2693  	req, err := http.NewRequest("POST", urls, body)
  2694  	if err != nil {
  2695  		return nil, err
  2696  	}
  2697  	req.Header = reqHeaders
  2698  	googleapi.Expand(req.URL, map[string]string{
  2699  		"name": c.name,
  2700  	})
  2701  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2702  }
  2703  
  2704  // Do executes the "assuredworkloads.organizations.locations.workloads.restrictAllowedResources" call.
  2705  // Any non-2xx status code is an error. Response headers are in either
  2706  // *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse.ServerResponse
  2707  // .Header or (if a response was returned at all) in
  2708  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2709  // whether the returned error was because http.StatusNotModified was returned.
  2710  func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse, error) {
  2711  	gensupport.SetOptions(c.urlParams_, opts...)
  2712  	res, err := c.doRequest("json")
  2713  	if res != nil && res.StatusCode == http.StatusNotModified {
  2714  		if res.Body != nil {
  2715  			res.Body.Close()
  2716  		}
  2717  		return nil, gensupport.WrapError(&googleapi.Error{
  2718  			Code:   res.StatusCode,
  2719  			Header: res.Header,
  2720  		})
  2721  	}
  2722  	if err != nil {
  2723  		return nil, err
  2724  	}
  2725  	defer googleapi.CloseBody(res)
  2726  	if err := googleapi.CheckResponse(res); err != nil {
  2727  		return nil, gensupport.WrapError(err)
  2728  	}
  2729  	ret := &GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse{
  2730  		ServerResponse: googleapi.ServerResponse{
  2731  			Header:         res.Header,
  2732  			HTTPStatusCode: res.StatusCode,
  2733  		},
  2734  	}
  2735  	target := &ret
  2736  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2737  		return nil, err
  2738  	}
  2739  	return ret, nil
  2740  }
  2741  
  2742  type OrganizationsLocationsWorkloadsViolationsAcknowledgeCall struct {
  2743  	s                                                        *Service
  2744  	name                                                     string
  2745  	googlecloudassuredworkloadsv1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest
  2746  	urlParams_                                               gensupport.URLParams
  2747  	ctx_                                                     context.Context
  2748  	header_                                                  http.Header
  2749  }
  2750  
  2751  // Acknowledge: Acknowledges an existing violation. By acknowledging a
  2752  // violation, users acknowledge the existence of a compliance violation in
  2753  // their workload and decide to ignore it due to a valid business
  2754  // justification. Acknowledgement is a permanent operation and it cannot be
  2755  // reverted.
  2756  //
  2757  //   - name: The resource name of the Violation to acknowledge. Format:
  2758  //     organizations/{organization}/locations/{location}/workloads/{workload}/viol
  2759  //     ations/{violation}.
  2760  func (r *OrganizationsLocationsWorkloadsViolationsService) Acknowledge(name string, googlecloudassuredworkloadsv1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall {
  2761  	c := &OrganizationsLocationsWorkloadsViolationsAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2762  	c.name = name
  2763  	c.googlecloudassuredworkloadsv1acknowledgeviolationrequest = googlecloudassuredworkloadsv1acknowledgeviolationrequest
  2764  	return c
  2765  }
  2766  
  2767  // Fields allows partial responses to be retrieved. See
  2768  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2769  // details.
  2770  func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall {
  2771  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2772  	return c
  2773  }
  2774  
  2775  // Context sets the context to be used in this call's Do method.
  2776  func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall {
  2777  	c.ctx_ = ctx
  2778  	return c
  2779  }
  2780  
  2781  // Header returns a http.Header that can be modified by the caller to add
  2782  // headers to the request.
  2783  func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Header() http.Header {
  2784  	if c.header_ == nil {
  2785  		c.header_ = make(http.Header)
  2786  	}
  2787  	return c.header_
  2788  }
  2789  
  2790  func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
  2791  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2792  	var body io.Reader = nil
  2793  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1acknowledgeviolationrequest)
  2794  	if err != nil {
  2795  		return nil, err
  2796  	}
  2797  	c.urlParams_.Set("alt", alt)
  2798  	c.urlParams_.Set("prettyPrint", "false")
  2799  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:acknowledge")
  2800  	urls += "?" + c.urlParams_.Encode()
  2801  	req, err := http.NewRequest("POST", urls, body)
  2802  	if err != nil {
  2803  		return nil, err
  2804  	}
  2805  	req.Header = reqHeaders
  2806  	googleapi.Expand(req.URL, map[string]string{
  2807  		"name": c.name,
  2808  	})
  2809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2810  }
  2811  
  2812  // Do executes the "assuredworkloads.organizations.locations.workloads.violations.acknowledge" call.
  2813  // Any non-2xx status code is an error. Response headers are in either
  2814  // *GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse.ServerResponse.Hea
  2815  // der or (if a response was returned at all) in
  2816  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2817  // whether the returned error was because http.StatusNotModified was returned.
  2818  func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse, error) {
  2819  	gensupport.SetOptions(c.urlParams_, opts...)
  2820  	res, err := c.doRequest("json")
  2821  	if res != nil && res.StatusCode == http.StatusNotModified {
  2822  		if res.Body != nil {
  2823  			res.Body.Close()
  2824  		}
  2825  		return nil, gensupport.WrapError(&googleapi.Error{
  2826  			Code:   res.StatusCode,
  2827  			Header: res.Header,
  2828  		})
  2829  	}
  2830  	if err != nil {
  2831  		return nil, err
  2832  	}
  2833  	defer googleapi.CloseBody(res)
  2834  	if err := googleapi.CheckResponse(res); err != nil {
  2835  		return nil, gensupport.WrapError(err)
  2836  	}
  2837  	ret := &GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse{
  2838  		ServerResponse: googleapi.ServerResponse{
  2839  			Header:         res.Header,
  2840  			HTTPStatusCode: res.StatusCode,
  2841  		},
  2842  	}
  2843  	target := &ret
  2844  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2845  		return nil, err
  2846  	}
  2847  	return ret, nil
  2848  }
  2849  
  2850  type OrganizationsLocationsWorkloadsViolationsGetCall struct {
  2851  	s            *Service
  2852  	name         string
  2853  	urlParams_   gensupport.URLParams
  2854  	ifNoneMatch_ string
  2855  	ctx_         context.Context
  2856  	header_      http.Header
  2857  }
  2858  
  2859  // Get: Retrieves Assured Workload Violation based on ID.
  2860  //
  2861  //   - name: The resource name of the Violation to fetch (ie. Violation.name).
  2862  //     Format:
  2863  //     organizations/{organization}/locations/{location}/workloads/{workload}/viol
  2864  //     ations/{violation}.
  2865  func (r *OrganizationsLocationsWorkloadsViolationsService) Get(name string) *OrganizationsLocationsWorkloadsViolationsGetCall {
  2866  	c := &OrganizationsLocationsWorkloadsViolationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2867  	c.name = name
  2868  	return c
  2869  }
  2870  
  2871  // Fields allows partial responses to be retrieved. See
  2872  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2873  // details.
  2874  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsGetCall {
  2875  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2876  	return c
  2877  }
  2878  
  2879  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2880  // object's ETag matches the given value. This is useful for getting updates
  2881  // only after the object has changed since the last request.
  2882  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsGetCall {
  2883  	c.ifNoneMatch_ = entityTag
  2884  	return c
  2885  }
  2886  
  2887  // Context sets the context to be used in this call's Do method.
  2888  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsGetCall {
  2889  	c.ctx_ = ctx
  2890  	return c
  2891  }
  2892  
  2893  // Header returns a http.Header that can be modified by the caller to add
  2894  // headers to the request.
  2895  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Header() http.Header {
  2896  	if c.header_ == nil {
  2897  		c.header_ = make(http.Header)
  2898  	}
  2899  	return c.header_
  2900  }
  2901  
  2902  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) doRequest(alt string) (*http.Response, error) {
  2903  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2904  	if c.ifNoneMatch_ != "" {
  2905  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2906  	}
  2907  	var body io.Reader = nil
  2908  	c.urlParams_.Set("alt", alt)
  2909  	c.urlParams_.Set("prettyPrint", "false")
  2910  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2911  	urls += "?" + c.urlParams_.Encode()
  2912  	req, err := http.NewRequest("GET", urls, body)
  2913  	if err != nil {
  2914  		return nil, err
  2915  	}
  2916  	req.Header = reqHeaders
  2917  	googleapi.Expand(req.URL, map[string]string{
  2918  		"name": c.name,
  2919  	})
  2920  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2921  }
  2922  
  2923  // Do executes the "assuredworkloads.organizations.locations.workloads.violations.get" call.
  2924  // Any non-2xx status code is an error. Response headers are in either
  2925  // *GoogleCloudAssuredworkloadsV1Violation.ServerResponse.Header or (if a
  2926  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2927  // googleapi.IsNotModified to check whether the returned error was because
  2928  // http.StatusNotModified was returned.
  2929  func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Violation, error) {
  2930  	gensupport.SetOptions(c.urlParams_, opts...)
  2931  	res, err := c.doRequest("json")
  2932  	if res != nil && res.StatusCode == http.StatusNotModified {
  2933  		if res.Body != nil {
  2934  			res.Body.Close()
  2935  		}
  2936  		return nil, gensupport.WrapError(&googleapi.Error{
  2937  			Code:   res.StatusCode,
  2938  			Header: res.Header,
  2939  		})
  2940  	}
  2941  	if err != nil {
  2942  		return nil, err
  2943  	}
  2944  	defer googleapi.CloseBody(res)
  2945  	if err := googleapi.CheckResponse(res); err != nil {
  2946  		return nil, gensupport.WrapError(err)
  2947  	}
  2948  	ret := &GoogleCloudAssuredworkloadsV1Violation{
  2949  		ServerResponse: googleapi.ServerResponse{
  2950  			Header:         res.Header,
  2951  			HTTPStatusCode: res.StatusCode,
  2952  		},
  2953  	}
  2954  	target := &ret
  2955  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2956  		return nil, err
  2957  	}
  2958  	return ret, nil
  2959  }
  2960  
  2961  type OrganizationsLocationsWorkloadsViolationsListCall struct {
  2962  	s            *Service
  2963  	parent       string
  2964  	urlParams_   gensupport.URLParams
  2965  	ifNoneMatch_ string
  2966  	ctx_         context.Context
  2967  	header_      http.Header
  2968  }
  2969  
  2970  // List: Lists the Violations in the AssuredWorkload Environment. Callers may
  2971  // also choose to read across multiple Workloads as per AIP-159
  2972  // (https://google.aip.dev/159) by using '-' (the hyphen or dash character) as
  2973  // a wildcard character instead of workload-id in the parent. Format
  2974  // `organizations/{org_id}/locations/{location}/workloads/-`
  2975  //
  2976  //   - parent: The Workload name. Format
  2977  //     `organizations/{org_id}/locations/{location}/workloads/{workload}`.
  2978  func (r *OrganizationsLocationsWorkloadsViolationsService) List(parent string) *OrganizationsLocationsWorkloadsViolationsListCall {
  2979  	c := &OrganizationsLocationsWorkloadsViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2980  	c.parent = parent
  2981  	return c
  2982  }
  2983  
  2984  // Filter sets the optional parameter "filter": A custom filter for filtering
  2985  // by the Violations properties.
  2986  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsViolationsListCall {
  2987  	c.urlParams_.Set("filter", filter)
  2988  	return c
  2989  }
  2990  
  2991  // IntervalEndTime sets the optional parameter "interval.endTime": The end of
  2992  // the time window.
  2993  func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalEndTime(intervalEndTime string) *OrganizationsLocationsWorkloadsViolationsListCall {
  2994  	c.urlParams_.Set("interval.endTime", intervalEndTime)
  2995  	return c
  2996  }
  2997  
  2998  // IntervalStartTime sets the optional parameter "interval.startTime": The
  2999  // start of the time window.
  3000  func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalStartTime(intervalStartTime string) *OrganizationsLocationsWorkloadsViolationsListCall {
  3001  	c.urlParams_.Set("interval.startTime", intervalStartTime)
  3002  	return c
  3003  }
  3004  
  3005  // PageSize sets the optional parameter "pageSize": Page size.
  3006  func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsViolationsListCall {
  3007  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3008  	return c
  3009  }
  3010  
  3011  // PageToken sets the optional parameter "pageToken": Page token returned from
  3012  // previous request.
  3013  func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsViolationsListCall {
  3014  	c.urlParams_.Set("pageToken", pageToken)
  3015  	return c
  3016  }
  3017  
  3018  // Fields allows partial responses to be retrieved. See
  3019  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3020  // details.
  3021  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsListCall {
  3022  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3023  	return c
  3024  }
  3025  
  3026  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3027  // object's ETag matches the given value. This is useful for getting updates
  3028  // only after the object has changed since the last request.
  3029  func (c *OrganizationsLocationsWorkloadsViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsListCall {
  3030  	c.ifNoneMatch_ = entityTag
  3031  	return c
  3032  }
  3033  
  3034  // Context sets the context to be used in this call's Do method.
  3035  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsListCall {
  3036  	c.ctx_ = ctx
  3037  	return c
  3038  }
  3039  
  3040  // Header returns a http.Header that can be modified by the caller to add
  3041  // headers to the request.
  3042  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Header() http.Header {
  3043  	if c.header_ == nil {
  3044  		c.header_ = make(http.Header)
  3045  	}
  3046  	return c.header_
  3047  }
  3048  
  3049  func (c *OrganizationsLocationsWorkloadsViolationsListCall) doRequest(alt string) (*http.Response, error) {
  3050  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3051  	if c.ifNoneMatch_ != "" {
  3052  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3053  	}
  3054  	var body io.Reader = nil
  3055  	c.urlParams_.Set("alt", alt)
  3056  	c.urlParams_.Set("prettyPrint", "false")
  3057  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/violations")
  3058  	urls += "?" + c.urlParams_.Encode()
  3059  	req, err := http.NewRequest("GET", urls, body)
  3060  	if err != nil {
  3061  		return nil, err
  3062  	}
  3063  	req.Header = reqHeaders
  3064  	googleapi.Expand(req.URL, map[string]string{
  3065  		"parent": c.parent,
  3066  	})
  3067  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3068  }
  3069  
  3070  // Do executes the "assuredworkloads.organizations.locations.workloads.violations.list" call.
  3071  // Any non-2xx status code is an error. Response headers are in either
  3072  // *GoogleCloudAssuredworkloadsV1ListViolationsResponse.ServerResponse.Header
  3073  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  3074  // Use googleapi.IsNotModified to check whether the returned error was because
  3075  // http.StatusNotModified was returned.
  3076  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1ListViolationsResponse, error) {
  3077  	gensupport.SetOptions(c.urlParams_, opts...)
  3078  	res, err := c.doRequest("json")
  3079  	if res != nil && res.StatusCode == http.StatusNotModified {
  3080  		if res.Body != nil {
  3081  			res.Body.Close()
  3082  		}
  3083  		return nil, gensupport.WrapError(&googleapi.Error{
  3084  			Code:   res.StatusCode,
  3085  			Header: res.Header,
  3086  		})
  3087  	}
  3088  	if err != nil {
  3089  		return nil, err
  3090  	}
  3091  	defer googleapi.CloseBody(res)
  3092  	if err := googleapi.CheckResponse(res); err != nil {
  3093  		return nil, gensupport.WrapError(err)
  3094  	}
  3095  	ret := &GoogleCloudAssuredworkloadsV1ListViolationsResponse{
  3096  		ServerResponse: googleapi.ServerResponse{
  3097  			Header:         res.Header,
  3098  			HTTPStatusCode: res.StatusCode,
  3099  		},
  3100  	}
  3101  	target := &ret
  3102  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3103  		return nil, err
  3104  	}
  3105  	return ret, nil
  3106  }
  3107  
  3108  // Pages invokes f for each page of results.
  3109  // A non-nil error returned from f will halt the iteration.
  3110  // The provided context supersedes any context provided to the Context method.
  3111  func (c *OrganizationsLocationsWorkloadsViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1ListViolationsResponse) error) error {
  3112  	c.ctx_ = ctx
  3113  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3114  	for {
  3115  		x, err := c.Do()
  3116  		if err != nil {
  3117  			return err
  3118  		}
  3119  		if err := f(x); err != nil {
  3120  			return err
  3121  		}
  3122  		if x.NextPageToken == "" {
  3123  			return nil
  3124  		}
  3125  		c.PageToken(x.NextPageToken)
  3126  	}
  3127  }
  3128  

View as plain text