...

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

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

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

View as plain text