...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package osconfig provides access to the OS Config API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/compute/docs/osconfig/rest
    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/osconfig/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	osconfigService, err := osconfig.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  //	osconfigService, err := osconfig.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  //	osconfigService, err := osconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package osconfig // import "google.golang.org/api/osconfig/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "osconfig:v1"
    90  const apiName = "osconfig"
    91  const apiVersion = "v1"
    92  const basePath = "https://osconfig.googleapis.com/"
    93  const basePathTemplate = "https://osconfig.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://osconfig.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.Projects = NewProjectsService(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  	Projects *ProjectsService
   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 NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	rs.PatchDeployments = NewProjectsPatchDeploymentsService(s)
   161  	rs.PatchJobs = NewProjectsPatchJobsService(s)
   162  	return rs
   163  }
   164  
   165  type ProjectsService struct {
   166  	s *Service
   167  
   168  	Locations *ProjectsLocationsService
   169  
   170  	PatchDeployments *ProjectsPatchDeploymentsService
   171  
   172  	PatchJobs *ProjectsPatchJobsService
   173  }
   174  
   175  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   176  	rs := &ProjectsLocationsService{s: s}
   177  	rs.Global = NewProjectsLocationsGlobalService(s)
   178  	rs.Instances = NewProjectsLocationsInstancesService(s)
   179  	rs.OsPolicyAssignments = NewProjectsLocationsOsPolicyAssignmentsService(s)
   180  	return rs
   181  }
   182  
   183  type ProjectsLocationsService struct {
   184  	s *Service
   185  
   186  	Global *ProjectsLocationsGlobalService
   187  
   188  	Instances *ProjectsLocationsInstancesService
   189  
   190  	OsPolicyAssignments *ProjectsLocationsOsPolicyAssignmentsService
   191  }
   192  
   193  func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService {
   194  	rs := &ProjectsLocationsGlobalService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsGlobalService struct {
   199  	s *Service
   200  }
   201  
   202  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   203  	rs := &ProjectsLocationsInstancesService{s: s}
   204  	rs.Inventories = NewProjectsLocationsInstancesInventoriesService(s)
   205  	rs.OsPolicyAssignments = NewProjectsLocationsInstancesOsPolicyAssignmentsService(s)
   206  	rs.VulnerabilityReports = NewProjectsLocationsInstancesVulnerabilityReportsService(s)
   207  	return rs
   208  }
   209  
   210  type ProjectsLocationsInstancesService struct {
   211  	s *Service
   212  
   213  	Inventories *ProjectsLocationsInstancesInventoriesService
   214  
   215  	OsPolicyAssignments *ProjectsLocationsInstancesOsPolicyAssignmentsService
   216  
   217  	VulnerabilityReports *ProjectsLocationsInstancesVulnerabilityReportsService
   218  }
   219  
   220  func NewProjectsLocationsInstancesInventoriesService(s *Service) *ProjectsLocationsInstancesInventoriesService {
   221  	rs := &ProjectsLocationsInstancesInventoriesService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsInstancesInventoriesService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsLocationsInstancesOsPolicyAssignmentsService(s *Service) *ProjectsLocationsInstancesOsPolicyAssignmentsService {
   230  	rs := &ProjectsLocationsInstancesOsPolicyAssignmentsService{s: s}
   231  	rs.Reports = NewProjectsLocationsInstancesOsPolicyAssignmentsReportsService(s)
   232  	return rs
   233  }
   234  
   235  type ProjectsLocationsInstancesOsPolicyAssignmentsService struct {
   236  	s *Service
   237  
   238  	Reports *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService
   239  }
   240  
   241  func NewProjectsLocationsInstancesOsPolicyAssignmentsReportsService(s *Service) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService {
   242  	rs := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsService{s: s}
   243  	return rs
   244  }
   245  
   246  type ProjectsLocationsInstancesOsPolicyAssignmentsReportsService struct {
   247  	s *Service
   248  }
   249  
   250  func NewProjectsLocationsInstancesVulnerabilityReportsService(s *Service) *ProjectsLocationsInstancesVulnerabilityReportsService {
   251  	rs := &ProjectsLocationsInstancesVulnerabilityReportsService{s: s}
   252  	return rs
   253  }
   254  
   255  type ProjectsLocationsInstancesVulnerabilityReportsService struct {
   256  	s *Service
   257  }
   258  
   259  func NewProjectsLocationsOsPolicyAssignmentsService(s *Service) *ProjectsLocationsOsPolicyAssignmentsService {
   260  	rs := &ProjectsLocationsOsPolicyAssignmentsService{s: s}
   261  	rs.Operations = NewProjectsLocationsOsPolicyAssignmentsOperationsService(s)
   262  	return rs
   263  }
   264  
   265  type ProjectsLocationsOsPolicyAssignmentsService struct {
   266  	s *Service
   267  
   268  	Operations *ProjectsLocationsOsPolicyAssignmentsOperationsService
   269  }
   270  
   271  func NewProjectsLocationsOsPolicyAssignmentsOperationsService(s *Service) *ProjectsLocationsOsPolicyAssignmentsOperationsService {
   272  	rs := &ProjectsLocationsOsPolicyAssignmentsOperationsService{s: s}
   273  	return rs
   274  }
   275  
   276  type ProjectsLocationsOsPolicyAssignmentsOperationsService struct {
   277  	s *Service
   278  }
   279  
   280  func NewProjectsPatchDeploymentsService(s *Service) *ProjectsPatchDeploymentsService {
   281  	rs := &ProjectsPatchDeploymentsService{s: s}
   282  	return rs
   283  }
   284  
   285  type ProjectsPatchDeploymentsService struct {
   286  	s *Service
   287  }
   288  
   289  func NewProjectsPatchJobsService(s *Service) *ProjectsPatchJobsService {
   290  	rs := &ProjectsPatchJobsService{s: s}
   291  	rs.InstanceDetails = NewProjectsPatchJobsInstanceDetailsService(s)
   292  	return rs
   293  }
   294  
   295  type ProjectsPatchJobsService struct {
   296  	s *Service
   297  
   298  	InstanceDetails *ProjectsPatchJobsInstanceDetailsService
   299  }
   300  
   301  func NewProjectsPatchJobsInstanceDetailsService(s *Service) *ProjectsPatchJobsInstanceDetailsService {
   302  	rs := &ProjectsPatchJobsInstanceDetailsService{s: s}
   303  	return rs
   304  }
   305  
   306  type ProjectsPatchJobsInstanceDetailsService struct {
   307  	s *Service
   308  }
   309  
   310  // AptSettings: Apt patching is completed by executing `apt-get update &&
   311  // apt-get upgrade`. Additional options can be set to control how this is
   312  // executed.
   313  type AptSettings struct {
   314  	// Excludes: List of packages to exclude from update. These packages will be
   315  	// excluded
   316  	Excludes []string `json:"excludes,omitempty"`
   317  	// ExclusivePackages: An exclusive list of packages to be updated. These are
   318  	// the only packages that will be updated. If these packages are not installed,
   319  	// they will be ignored. This field cannot be specified with any other patch
   320  	// configuration fields.
   321  	ExclusivePackages []string `json:"exclusivePackages,omitempty"`
   322  	// Type: By changing the type to DIST, the patching is performed using `apt-get
   323  	// dist-upgrade` instead.
   324  	//
   325  	// Possible values:
   326  	//   "TYPE_UNSPECIFIED" - By default, upgrade will be performed.
   327  	//   "DIST" - Runs `apt-get dist-upgrade`.
   328  	//   "UPGRADE" - Runs `apt-get upgrade`.
   329  	Type string `json:"type,omitempty"`
   330  	// ForceSendFields is a list of field names (e.g. "Excludes") to
   331  	// unconditionally include in API requests. By default, fields with empty or
   332  	// default values are omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   334  	// details.
   335  	ForceSendFields []string `json:"-"`
   336  	// NullFields is a list of field names (e.g. "Excludes") to include in API
   337  	// requests with the JSON null value. By default, fields with empty values are
   338  	// omitted from API requests. See
   339  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   340  	NullFields []string `json:"-"`
   341  }
   342  
   343  func (s *AptSettings) MarshalJSON() ([]byte, error) {
   344  	type NoMethod AptSettings
   345  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   346  }
   347  
   348  // CVSSv3: Common Vulnerability Scoring System version 3. For details, see
   349  // https://www.first.org/cvss/specification-document
   350  type CVSSv3 struct {
   351  	// AttackComplexity: This metric describes the conditions beyond the attacker's
   352  	// control that must exist in order to exploit the vulnerability.
   353  	//
   354  	// Possible values:
   355  	//   "ATTACK_COMPLEXITY_UNSPECIFIED" - Invalid value.
   356  	//   "ATTACK_COMPLEXITY_LOW" - Specialized access conditions or extenuating
   357  	// circumstances do not exist. An attacker can expect repeatable success when
   358  	// attacking the vulnerable component.
   359  	//   "ATTACK_COMPLEXITY_HIGH" - A successful attack depends on conditions
   360  	// beyond the attacker's control. That is, a successful attack cannot be
   361  	// accomplished at will, but requires the attacker to invest in some measurable
   362  	// amount of effort in preparation or execution against the vulnerable
   363  	// component before a successful attack can be expected.
   364  	AttackComplexity string `json:"attackComplexity,omitempty"`
   365  	// AttackVector: This metric reflects the context by which vulnerability
   366  	// exploitation is possible.
   367  	//
   368  	// Possible values:
   369  	//   "ATTACK_VECTOR_UNSPECIFIED" - Invalid value.
   370  	//   "ATTACK_VECTOR_NETWORK" - The vulnerable component is bound to the network
   371  	// stack and the set of possible attackers extends beyond the other options
   372  	// listed below, up to and including the entire Internet.
   373  	//   "ATTACK_VECTOR_ADJACENT" - The vulnerable component is bound to the
   374  	// network stack, but the attack is limited at the protocol level to a
   375  	// logically adjacent topology.
   376  	//   "ATTACK_VECTOR_LOCAL" - The vulnerable component is not bound to the
   377  	// network stack and the attacker's path is via read/write/execute
   378  	// capabilities.
   379  	//   "ATTACK_VECTOR_PHYSICAL" - The attack requires the attacker to physically
   380  	// touch or manipulate the vulnerable component.
   381  	AttackVector string `json:"attackVector,omitempty"`
   382  	// AvailabilityImpact: This metric measures the impact to the availability of
   383  	// the impacted component resulting from a successfully exploited
   384  	// vulnerability.
   385  	//
   386  	// Possible values:
   387  	//   "IMPACT_UNSPECIFIED" - Invalid value.
   388  	//   "IMPACT_HIGH" - High impact.
   389  	//   "IMPACT_LOW" - Low impact.
   390  	//   "IMPACT_NONE" - No impact.
   391  	AvailabilityImpact string `json:"availabilityImpact,omitempty"`
   392  	// BaseScore: The base score is a function of the base metric scores.
   393  	// https://www.first.org/cvss/specification-document#Base-Metrics
   394  	BaseScore float64 `json:"baseScore,omitempty"`
   395  	// ConfidentialityImpact: This metric measures the impact to the
   396  	// confidentiality of the information resources managed by a software component
   397  	// due to a successfully exploited vulnerability.
   398  	//
   399  	// Possible values:
   400  	//   "IMPACT_UNSPECIFIED" - Invalid value.
   401  	//   "IMPACT_HIGH" - High impact.
   402  	//   "IMPACT_LOW" - Low impact.
   403  	//   "IMPACT_NONE" - No impact.
   404  	ConfidentialityImpact string `json:"confidentialityImpact,omitempty"`
   405  	// ExploitabilityScore: The Exploitability sub-score equation is derived from
   406  	// the Base Exploitability metrics.
   407  	// https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
   408  	ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`
   409  	// ImpactScore: The Impact sub-score equation is derived from the Base Impact
   410  	// metrics.
   411  	ImpactScore float64 `json:"impactScore,omitempty"`
   412  	// IntegrityImpact: This metric measures the impact to integrity of a
   413  	// successfully exploited vulnerability.
   414  	//
   415  	// Possible values:
   416  	//   "IMPACT_UNSPECIFIED" - Invalid value.
   417  	//   "IMPACT_HIGH" - High impact.
   418  	//   "IMPACT_LOW" - Low impact.
   419  	//   "IMPACT_NONE" - No impact.
   420  	IntegrityImpact string `json:"integrityImpact,omitempty"`
   421  	// PrivilegesRequired: This metric describes the level of privileges an
   422  	// attacker must possess before successfully exploiting the vulnerability.
   423  	//
   424  	// Possible values:
   425  	//   "PRIVILEGES_REQUIRED_UNSPECIFIED" - Invalid value.
   426  	//   "PRIVILEGES_REQUIRED_NONE" - The attacker is unauthorized prior to attack,
   427  	// and therefore does not require any access to settings or files of the
   428  	// vulnerable system to carry out an attack.
   429  	//   "PRIVILEGES_REQUIRED_LOW" - The attacker requires privileges that provide
   430  	// basic user capabilities that could normally affect only settings and files
   431  	// owned by a user. Alternatively, an attacker with Low privileges has the
   432  	// ability to access only non-sensitive resources.
   433  	//   "PRIVILEGES_REQUIRED_HIGH" - The attacker requires privileges that provide
   434  	// significant (e.g., administrative) control over the vulnerable component
   435  	// allowing access to component-wide settings and files.
   436  	PrivilegesRequired string `json:"privilegesRequired,omitempty"`
   437  	// Scope: The Scope metric captures whether a vulnerability in one vulnerable
   438  	// component impacts resources in components beyond its security scope.
   439  	//
   440  	// Possible values:
   441  	//   "SCOPE_UNSPECIFIED" - Invalid value.
   442  	//   "SCOPE_UNCHANGED" - An exploited vulnerability can only affect resources
   443  	// managed by the same security authority.
   444  	//   "SCOPE_CHANGED" - An exploited vulnerability can affect resources beyond
   445  	// the security scope managed by the security authority of the vulnerable
   446  	// component.
   447  	Scope string `json:"scope,omitempty"`
   448  	// UserInteraction: This metric captures the requirement for a human user,
   449  	// other than the attacker, to participate in the successful compromise of the
   450  	// vulnerable component.
   451  	//
   452  	// Possible values:
   453  	//   "USER_INTERACTION_UNSPECIFIED" - Invalid value.
   454  	//   "USER_INTERACTION_NONE" - The vulnerable system can be exploited without
   455  	// interaction from any user.
   456  	//   "USER_INTERACTION_REQUIRED" - Successful exploitation of this
   457  	// vulnerability requires a user to take some action before the vulnerability
   458  	// can be exploited.
   459  	UserInteraction string `json:"userInteraction,omitempty"`
   460  	// ForceSendFields is a list of field names (e.g. "AttackComplexity") to
   461  	// unconditionally include in API requests. By default, fields with empty or
   462  	// default values are omitted from API requests. See
   463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   464  	// details.
   465  	ForceSendFields []string `json:"-"`
   466  	// NullFields is a list of field names (e.g. "AttackComplexity") to include in
   467  	// API requests with the JSON null value. By default, fields with empty values
   468  	// are omitted from API requests. See
   469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   470  	NullFields []string `json:"-"`
   471  }
   472  
   473  func (s *CVSSv3) MarshalJSON() ([]byte, error) {
   474  	type NoMethod CVSSv3
   475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   476  }
   477  
   478  func (s *CVSSv3) UnmarshalJSON(data []byte) error {
   479  	type NoMethod CVSSv3
   480  	var s1 struct {
   481  		BaseScore           gensupport.JSONFloat64 `json:"baseScore"`
   482  		ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"`
   483  		ImpactScore         gensupport.JSONFloat64 `json:"impactScore"`
   484  		*NoMethod
   485  	}
   486  	s1.NoMethod = (*NoMethod)(s)
   487  	if err := json.Unmarshal(data, &s1); err != nil {
   488  		return err
   489  	}
   490  	s.BaseScore = float64(s1.BaseScore)
   491  	s.ExploitabilityScore = float64(s1.ExploitabilityScore)
   492  	s.ImpactScore = float64(s1.ImpactScore)
   493  	return nil
   494  }
   495  
   496  // CancelOperationRequest: The request message for Operations.CancelOperation.
   497  type CancelOperationRequest struct {
   498  }
   499  
   500  // CancelPatchJobRequest: Message for canceling a patch job.
   501  type CancelPatchJobRequest struct {
   502  }
   503  
   504  // Date: Represents a whole or partial calendar date, such as a birthday. The
   505  // time of day and time zone are either specified elsewhere or are
   506  // insignificant. The date is relative to the Gregorian Calendar. This can
   507  // represent one of the following: * A full date, with non-zero year, month,
   508  // and day values. * A month and day, with a zero year (for example, an
   509  // anniversary). * A year on its own, with a zero month and a zero day. * A
   510  // year and month, with a zero day (for example, a credit card expiration
   511  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
   512  // google.protobuf.Timestamp
   513  type Date struct {
   514  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
   515  	// or 0 to specify a year by itself or a year and month where the day isn't
   516  	// significant.
   517  	Day int64 `json:"day,omitempty"`
   518  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
   519  	// a month and day.
   520  	Month int64 `json:"month,omitempty"`
   521  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
   522  	// without a year.
   523  	Year int64 `json:"year,omitempty"`
   524  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
   525  	// include in API requests. By default, fields with empty or default values are
   526  	// omitted from API requests. See
   527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   528  	// details.
   529  	ForceSendFields []string `json:"-"`
   530  	// NullFields is a list of field names (e.g. "Day") to include in API requests
   531  	// with the JSON null value. By default, fields with empty values are omitted
   532  	// from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   534  	NullFields []string `json:"-"`
   535  }
   536  
   537  func (s *Date) MarshalJSON() ([]byte, error) {
   538  	type NoMethod Date
   539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   540  }
   541  
   542  // Empty: A generic empty message that you can re-use to avoid defining
   543  // duplicated empty messages in your APIs. A typical example is to use it as
   544  // the request or the response type of an API method. For instance: service Foo
   545  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   546  type Empty struct {
   547  	// ServerResponse contains the HTTP response code and headers from the server.
   548  	googleapi.ServerResponse `json:"-"`
   549  }
   550  
   551  // ExecStep: A step that runs an executable for a PatchJob.
   552  type ExecStep struct {
   553  	// LinuxExecStepConfig: The ExecStepConfig for all Linux VMs targeted by the
   554  	// PatchJob.
   555  	LinuxExecStepConfig *ExecStepConfig `json:"linuxExecStepConfig,omitempty"`
   556  	// WindowsExecStepConfig: The ExecStepConfig for all Windows VMs targeted by
   557  	// the PatchJob.
   558  	WindowsExecStepConfig *ExecStepConfig `json:"windowsExecStepConfig,omitempty"`
   559  	// ForceSendFields is a list of field names (e.g. "LinuxExecStepConfig") to
   560  	// unconditionally include in API requests. By default, fields with empty or
   561  	// default values are omitted from API requests. See
   562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   563  	// details.
   564  	ForceSendFields []string `json:"-"`
   565  	// NullFields is a list of field names (e.g. "LinuxExecStepConfig") to include
   566  	// in API requests with the JSON null value. By default, fields with empty
   567  	// values are omitted from API requests. See
   568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   569  	NullFields []string `json:"-"`
   570  }
   571  
   572  func (s *ExecStep) MarshalJSON() ([]byte, error) {
   573  	type NoMethod ExecStep
   574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   575  }
   576  
   577  // ExecStepConfig: Common configurations for an ExecStep.
   578  type ExecStepConfig struct {
   579  	// AllowedSuccessCodes: Defaults to [0]. A list of possible return values that
   580  	// the execution can return to indicate a success.
   581  	AllowedSuccessCodes []int64 `json:"allowedSuccessCodes,omitempty"`
   582  	// GcsObject: A Cloud Storage object containing the executable.
   583  	GcsObject *GcsObject `json:"gcsObject,omitempty"`
   584  	// Interpreter: The script interpreter to use to run the script. If no
   585  	// interpreter is specified the script will be executed directly, which will
   586  	// likely only succeed for scripts with [shebang lines]
   587  	// (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
   588  	//
   589  	// Possible values:
   590  	//   "INTERPRETER_UNSPECIFIED" - If the interpreter is not specified, the value
   591  	// defaults to `NONE`.
   592  	//   "NONE" - Indicates that the file is run as follows on each operating
   593  	// system: + For Linux VMs, the file is ran as an executable and the
   594  	// interpreter might be parsed from the [shebang
   595  	// line](https://wikipedia.org/wiki/Shebang_(Unix)) of the file. + For Windows
   596  	// VM, this value is not supported.
   597  	//   "SHELL" - Indicates that the file is run with `/bin/sh` on Linux and `cmd`
   598  	// on Windows.
   599  	//   "POWERSHELL" - Indicates that the file is run with PowerShell.
   600  	Interpreter string `json:"interpreter,omitempty"`
   601  	// LocalPath: An absolute path to the executable on the VM.
   602  	LocalPath string `json:"localPath,omitempty"`
   603  	// ForceSendFields is a list of field names (e.g. "AllowedSuccessCodes") to
   604  	// unconditionally include in API requests. By default, fields with empty or
   605  	// default values are omitted from API requests. See
   606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   607  	// details.
   608  	ForceSendFields []string `json:"-"`
   609  	// NullFields is a list of field names (e.g. "AllowedSuccessCodes") to include
   610  	// in API requests with the JSON null value. By default, fields with empty
   611  	// values are omitted from API requests. See
   612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   613  	NullFields []string `json:"-"`
   614  }
   615  
   616  func (s *ExecStepConfig) MarshalJSON() ([]byte, error) {
   617  	type NoMethod ExecStepConfig
   618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   619  }
   620  
   621  // ExecutePatchJobRequest: A request message to initiate patching across
   622  // Compute Engine instances.
   623  type ExecutePatchJobRequest struct {
   624  	// Description: Description of the patch job. Length of the description is
   625  	// limited to 1024 characters.
   626  	Description string `json:"description,omitempty"`
   627  	// DisplayName: Display name for this patch job. This does not have to be
   628  	// unique.
   629  	DisplayName string `json:"displayName,omitempty"`
   630  	// DryRun: If this patch is a dry-run only, instances are contacted but will do
   631  	// nothing.
   632  	DryRun bool `json:"dryRun,omitempty"`
   633  	// Duration: Duration of the patch job. After the duration ends, the patch job
   634  	// times out.
   635  	Duration string `json:"duration,omitempty"`
   636  	// InstanceFilter: Required. Instances to patch, either explicitly or filtered
   637  	// by some criteria such as zone or labels.
   638  	InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
   639  	// PatchConfig: Patch configuration being applied. If omitted, instances are
   640  	// patched using the default configurations.
   641  	PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
   642  	// Rollout: Rollout strategy of the patch job.
   643  	Rollout *PatchRollout `json:"rollout,omitempty"`
   644  	// ForceSendFields is a list of field names (e.g. "Description") to
   645  	// unconditionally include in API requests. By default, fields with empty or
   646  	// default values are omitted from API requests. See
   647  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   648  	// details.
   649  	ForceSendFields []string `json:"-"`
   650  	// NullFields is a list of field names (e.g. "Description") to include in API
   651  	// requests with the JSON null value. By default, fields with empty values are
   652  	// omitted from API requests. See
   653  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   654  	NullFields []string `json:"-"`
   655  }
   656  
   657  func (s *ExecutePatchJobRequest) MarshalJSON() ([]byte, error) {
   658  	type NoMethod ExecutePatchJobRequest
   659  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   660  }
   661  
   662  // FixedOrPercent: Message encapsulating a value that can be either absolute
   663  // ("fixed") or relative ("percent") to a value.
   664  type FixedOrPercent struct {
   665  	// Fixed: Specifies a fixed value.
   666  	Fixed int64 `json:"fixed,omitempty"`
   667  	// Percent: Specifies the relative value defined as a percentage, which will be
   668  	// multiplied by a reference value.
   669  	Percent int64 `json:"percent,omitempty"`
   670  	// ForceSendFields is a list of field names (e.g. "Fixed") to unconditionally
   671  	// include in API requests. By default, fields with empty or default values are
   672  	// omitted from API requests. See
   673  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   674  	// details.
   675  	ForceSendFields []string `json:"-"`
   676  	// NullFields is a list of field names (e.g. "Fixed") to include in API
   677  	// requests with the JSON null value. By default, fields with empty values are
   678  	// omitted from API requests. See
   679  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   680  	NullFields []string `json:"-"`
   681  }
   682  
   683  func (s *FixedOrPercent) MarshalJSON() ([]byte, error) {
   684  	type NoMethod FixedOrPercent
   685  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   686  }
   687  
   688  // GcsObject: Cloud Storage object representation.
   689  type GcsObject struct {
   690  	// Bucket: Required. Bucket of the Cloud Storage object.
   691  	Bucket string `json:"bucket,omitempty"`
   692  	// GenerationNumber: Required. Generation number of the Cloud Storage object.
   693  	// This is used to ensure that the ExecStep specified by this PatchJob does not
   694  	// change.
   695  	GenerationNumber int64 `json:"generationNumber,omitempty,string"`
   696  	// Object: Required. Name of the Cloud Storage object.
   697  	Object string `json:"object,omitempty"`
   698  	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
   699  	// include in API requests. By default, fields with empty or default values are
   700  	// omitted from API requests. See
   701  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   702  	// details.
   703  	ForceSendFields []string `json:"-"`
   704  	// NullFields is a list of field names (e.g. "Bucket") to include in API
   705  	// requests with the JSON null value. By default, fields with empty values are
   706  	// omitted from API requests. See
   707  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   708  	NullFields []string `json:"-"`
   709  }
   710  
   711  func (s *GcsObject) MarshalJSON() ([]byte, error) {
   712  	type NoMethod GcsObject
   713  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   714  }
   715  
   716  // GooSettings: Googet patching is performed by running `googet update`.
   717  type GooSettings struct {
   718  }
   719  
   720  // GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata: OS policy
   721  // assignment operation metadata provided by OS policy assignment API methods
   722  // that return long running operations.
   723  type GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata struct {
   724  	// ApiMethod: The OS policy assignment API method.
   725  	//
   726  	// Possible values:
   727  	//   "API_METHOD_UNSPECIFIED" - Invalid value
   728  	//   "CREATE" - Create OS policy assignment API method
   729  	//   "UPDATE" - Update OS policy assignment API method
   730  	//   "DELETE" - Delete OS policy assignment API method
   731  	ApiMethod string `json:"apiMethod,omitempty"`
   732  	// OsPolicyAssignment: Reference to the `OSPolicyAssignment` API resource.
   733  	// Format:
   734  	// `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_polic
   735  	// y_assignment_id@revision_id}`
   736  	OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
   737  	// RolloutStartTime: Rollout start time
   738  	RolloutStartTime string `json:"rolloutStartTime,omitempty"`
   739  	// RolloutState: State of the rollout
   740  	//
   741  	// Possible values:
   742  	//   "ROLLOUT_STATE_UNSPECIFIED" - Invalid value
   743  	//   "IN_PROGRESS" - The rollout is in progress.
   744  	//   "CANCELLING" - The rollout is being cancelled.
   745  	//   "CANCELLED" - The rollout is cancelled.
   746  	//   "SUCCEEDED" - The rollout has completed successfully.
   747  	RolloutState string `json:"rolloutState,omitempty"`
   748  	// RolloutUpdateTime: Rollout update time
   749  	RolloutUpdateTime string `json:"rolloutUpdateTime,omitempty"`
   750  	// ForceSendFields is a list of field names (e.g. "ApiMethod") to
   751  	// unconditionally include in API requests. By default, fields with empty or
   752  	// default values are omitted from API requests. See
   753  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   754  	// details.
   755  	ForceSendFields []string `json:"-"`
   756  	// NullFields is a list of field names (e.g. "ApiMethod") to include in API
   757  	// requests with the JSON null value. By default, fields with empty values are
   758  	// omitted from API requests. See
   759  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   760  	NullFields []string `json:"-"`
   761  }
   762  
   763  func (s *GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata) MarshalJSON() ([]byte, error) {
   764  	type NoMethod GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata
   765  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   766  }
   767  
   768  // Inventory: This API resource represents the available inventory data for a
   769  // Compute Engine virtual machine (VM) instance at a given point in time. You
   770  // can use this API resource to determine the inventory data of your VM. For
   771  // more information, see Information provided by OS inventory management
   772  // (https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).
   773  type Inventory struct {
   774  	// Items: Inventory items related to the VM keyed by an opaque unique
   775  	// identifier for each inventory item. The identifier is unique to each
   776  	// distinct and addressable inventory item and will change, when there is a new
   777  	// package version.
   778  	Items map[string]InventoryItem `json:"items,omitempty"`
   779  	// Name: Output only. The `Inventory` API resource name. Format:
   780  	// `projects/{project_number}/locations/{location}/instances/{instance_id}/inven
   781  	// tory`
   782  	Name string `json:"name,omitempty"`
   783  	// OsInfo: Base level operating system information for the VM.
   784  	OsInfo *InventoryOsInfo `json:"osInfo,omitempty"`
   785  	// UpdateTime: Output only. Timestamp of the last reported inventory for the
   786  	// VM.
   787  	UpdateTime string `json:"updateTime,omitempty"`
   788  
   789  	// ServerResponse contains the HTTP response code and headers from the server.
   790  	googleapi.ServerResponse `json:"-"`
   791  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   792  	// include in API requests. By default, fields with empty or default values are
   793  	// omitted from API requests. See
   794  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   795  	// details.
   796  	ForceSendFields []string `json:"-"`
   797  	// NullFields is a list of field names (e.g. "Items") to include in API
   798  	// requests with the JSON null value. By default, fields with empty values are
   799  	// omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   801  	NullFields []string `json:"-"`
   802  }
   803  
   804  func (s *Inventory) MarshalJSON() ([]byte, error) {
   805  	type NoMethod Inventory
   806  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   807  }
   808  
   809  // InventoryItem: A single piece of inventory on a VM.
   810  type InventoryItem struct {
   811  	// AvailablePackage: Software package available to be installed on the VM
   812  	// instance.
   813  	AvailablePackage *InventorySoftwarePackage `json:"availablePackage,omitempty"`
   814  	// CreateTime: When this inventory item was first detected.
   815  	CreateTime string `json:"createTime,omitempty"`
   816  	// Id: Identifier for this item, unique across items for this VM.
   817  	Id string `json:"id,omitempty"`
   818  	// InstalledPackage: Software package present on the VM instance.
   819  	InstalledPackage *InventorySoftwarePackage `json:"installedPackage,omitempty"`
   820  	// OriginType: The origin of this inventory item.
   821  	//
   822  	// Possible values:
   823  	//   "ORIGIN_TYPE_UNSPECIFIED" - Invalid. An origin type must be specified.
   824  	//   "INVENTORY_REPORT" - This inventory item was discovered as the result of
   825  	// the agent reporting inventory via the reporting API.
   826  	OriginType string `json:"originType,omitempty"`
   827  	// Type: The specific type of inventory, correlating to its specific details.
   828  	//
   829  	// Possible values:
   830  	//   "TYPE_UNSPECIFIED" - Invalid. An type must be specified.
   831  	//   "INSTALLED_PACKAGE" - This represents a package that is installed on the
   832  	// VM.
   833  	//   "AVAILABLE_PACKAGE" - This represents an update that is available for a
   834  	// package.
   835  	Type string `json:"type,omitempty"`
   836  	// UpdateTime: When this inventory item was last modified.
   837  	UpdateTime string `json:"updateTime,omitempty"`
   838  	// ForceSendFields is a list of field names (e.g. "AvailablePackage") to
   839  	// unconditionally include in API requests. By default, fields with empty or
   840  	// default values are omitted from API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   842  	// details.
   843  	ForceSendFields []string `json:"-"`
   844  	// NullFields is a list of field names (e.g. "AvailablePackage") to include in
   845  	// API requests with the JSON null value. By default, fields with empty values
   846  	// are omitted from API requests. See
   847  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   848  	NullFields []string `json:"-"`
   849  }
   850  
   851  func (s *InventoryItem) MarshalJSON() ([]byte, error) {
   852  	type NoMethod InventoryItem
   853  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   854  }
   855  
   856  // InventoryOsInfo: Operating system information for the VM.
   857  type InventoryOsInfo struct {
   858  	// Architecture: The system architecture of the operating system.
   859  	Architecture string `json:"architecture,omitempty"`
   860  	// Hostname: The VM hostname.
   861  	Hostname string `json:"hostname,omitempty"`
   862  	// KernelRelease: The kernel release of the operating system.
   863  	KernelRelease string `json:"kernelRelease,omitempty"`
   864  	// KernelVersion: The kernel version of the operating system.
   865  	KernelVersion string `json:"kernelVersion,omitempty"`
   866  	// LongName: The operating system long name. For example 'Debian GNU/Linux 9'
   867  	// or 'Microsoft Window Server 2019 Datacenter'.
   868  	LongName string `json:"longName,omitempty"`
   869  	// OsconfigAgentVersion: The current version of the OS Config agent running on
   870  	// the VM.
   871  	OsconfigAgentVersion string `json:"osconfigAgentVersion,omitempty"`
   872  	// ShortName: The operating system short name. For example, 'windows' or
   873  	// 'debian'.
   874  	ShortName string `json:"shortName,omitempty"`
   875  	// Version: The version of the operating system.
   876  	Version string `json:"version,omitempty"`
   877  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   878  	// unconditionally include in API requests. By default, fields with empty or
   879  	// default values are omitted from API requests. See
   880  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   881  	// details.
   882  	ForceSendFields []string `json:"-"`
   883  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   884  	// requests with the JSON null value. By default, fields with empty values are
   885  	// omitted from API requests. See
   886  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   887  	NullFields []string `json:"-"`
   888  }
   889  
   890  func (s *InventoryOsInfo) MarshalJSON() ([]byte, error) {
   891  	type NoMethod InventoryOsInfo
   892  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   893  }
   894  
   895  // InventorySoftwarePackage: Software package information of the operating
   896  // system.
   897  type InventorySoftwarePackage struct {
   898  	// AptPackage: Details of an APT package. For details about the apt package
   899  	// manager, see https://wiki.debian.org/Apt.
   900  	AptPackage *InventoryVersionedPackage `json:"aptPackage,omitempty"`
   901  	// CosPackage: Details of a COS package.
   902  	CosPackage *InventoryVersionedPackage `json:"cosPackage,omitempty"`
   903  	// GoogetPackage: Details of a Googet package. For details about the googet
   904  	// package manager, see https://github.com/google/googet.
   905  	GoogetPackage *InventoryVersionedPackage `json:"googetPackage,omitempty"`
   906  	// QfePackage: Details of a Windows Quick Fix engineering package. See
   907  	// https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
   908  	// for info in Windows Quick Fix Engineering.
   909  	QfePackage *InventoryWindowsQuickFixEngineeringPackage `json:"qfePackage,omitempty"`
   910  	// WindowsApplication: Details of Windows Application.
   911  	WindowsApplication *InventoryWindowsApplication `json:"windowsApplication,omitempty"`
   912  	// WuaPackage: Details of a Windows Update package. See
   913  	// https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for information
   914  	// about Windows Update.
   915  	WuaPackage *InventoryWindowsUpdatePackage `json:"wuaPackage,omitempty"`
   916  	// YumPackage: Yum package info. For details about the yum package manager, see
   917  	// https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
   918  	YumPackage *InventoryVersionedPackage `json:"yumPackage,omitempty"`
   919  	// ZypperPackage: Details of a Zypper package. For details about the Zypper
   920  	// package manager, see https://en.opensuse.org/SDB:Zypper_manual.
   921  	ZypperPackage *InventoryVersionedPackage `json:"zypperPackage,omitempty"`
   922  	// ZypperPatch: Details of a Zypper patch. For details about the Zypper package
   923  	// manager, see https://en.opensuse.org/SDB:Zypper_manual.
   924  	ZypperPatch *InventoryZypperPatch `json:"zypperPatch,omitempty"`
   925  	// ForceSendFields is a list of field names (e.g. "AptPackage") to
   926  	// unconditionally include in API requests. By default, fields with empty or
   927  	// default values are omitted from API requests. See
   928  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   929  	// details.
   930  	ForceSendFields []string `json:"-"`
   931  	// NullFields is a list of field names (e.g. "AptPackage") to include in API
   932  	// requests with the JSON null value. By default, fields with empty values are
   933  	// omitted from API requests. See
   934  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   935  	NullFields []string `json:"-"`
   936  }
   937  
   938  func (s *InventorySoftwarePackage) MarshalJSON() ([]byte, error) {
   939  	type NoMethod InventorySoftwarePackage
   940  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   941  }
   942  
   943  // InventoryVersionedPackage: Information related to the a standard versioned
   944  // package. This includes package info for APT, Yum, Zypper, and Googet package
   945  // managers.
   946  type InventoryVersionedPackage struct {
   947  	// Architecture: The system architecture this package is intended for.
   948  	Architecture string `json:"architecture,omitempty"`
   949  	// PackageName: The name of the package.
   950  	PackageName string `json:"packageName,omitempty"`
   951  	// Version: The version of the package.
   952  	Version string `json:"version,omitempty"`
   953  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   954  	// unconditionally include in API requests. By default, fields with empty or
   955  	// default values are omitted from API requests. See
   956  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   957  	// details.
   958  	ForceSendFields []string `json:"-"`
   959  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   960  	// requests with the JSON null value. By default, fields with empty values are
   961  	// omitted from API requests. See
   962  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   963  	NullFields []string `json:"-"`
   964  }
   965  
   966  func (s *InventoryVersionedPackage) MarshalJSON() ([]byte, error) {
   967  	type NoMethod InventoryVersionedPackage
   968  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   969  }
   970  
   971  // InventoryWindowsApplication: Contains information about a Windows
   972  // application that is retrieved from the Windows Registry. For more
   973  // information about these fields, see:
   974  // https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key
   975  type InventoryWindowsApplication struct {
   976  	// DisplayName: The name of the application or product.
   977  	DisplayName string `json:"displayName,omitempty"`
   978  	// DisplayVersion: The version of the product or application in string format.
   979  	DisplayVersion string `json:"displayVersion,omitempty"`
   980  	// HelpLink: The internet address for technical support.
   981  	HelpLink string `json:"helpLink,omitempty"`
   982  	// InstallDate: The last time this product received service. The value of this
   983  	// property is replaced each time a patch is applied or removed from the
   984  	// product or the command-line option is used to repair the product.
   985  	InstallDate *Date `json:"installDate,omitempty"`
   986  	// Publisher: The name of the manufacturer for the product or application.
   987  	Publisher string `json:"publisher,omitempty"`
   988  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   989  	// unconditionally include in API requests. By default, fields with empty or
   990  	// default values are omitted from API requests. See
   991  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   992  	// details.
   993  	ForceSendFields []string `json:"-"`
   994  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   995  	// requests with the JSON null value. By default, fields with empty values are
   996  	// omitted from API requests. See
   997  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   998  	NullFields []string `json:"-"`
   999  }
  1000  
  1001  func (s *InventoryWindowsApplication) MarshalJSON() ([]byte, error) {
  1002  	type NoMethod InventoryWindowsApplication
  1003  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1004  }
  1005  
  1006  // InventoryWindowsQuickFixEngineeringPackage: Information related to a Quick
  1007  // Fix Engineering package. Fields are taken from Windows QuickFixEngineering
  1008  // Interface and match the source names:
  1009  // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
  1010  type InventoryWindowsQuickFixEngineeringPackage struct {
  1011  	// Caption: A short textual description of the QFE update.
  1012  	Caption string `json:"caption,omitempty"`
  1013  	// Description: A textual description of the QFE update.
  1014  	Description string `json:"description,omitempty"`
  1015  	// HotFixId: Unique identifier associated with a particular QFE update.
  1016  	HotFixId string `json:"hotFixId,omitempty"`
  1017  	// InstallTime: Date that the QFE update was installed. Mapped from
  1018  	// installed_on field.
  1019  	InstallTime string `json:"installTime,omitempty"`
  1020  	// ForceSendFields is a list of field names (e.g. "Caption") to unconditionally
  1021  	// include in API requests. By default, fields with empty or default values are
  1022  	// omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1024  	// details.
  1025  	ForceSendFields []string `json:"-"`
  1026  	// NullFields is a list of field names (e.g. "Caption") to include in API
  1027  	// requests with the JSON null value. By default, fields with empty values are
  1028  	// omitted from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1030  	NullFields []string `json:"-"`
  1031  }
  1032  
  1033  func (s *InventoryWindowsQuickFixEngineeringPackage) MarshalJSON() ([]byte, error) {
  1034  	type NoMethod InventoryWindowsQuickFixEngineeringPackage
  1035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1036  }
  1037  
  1038  // InventoryWindowsUpdatePackage: Details related to a Windows Update package.
  1039  // Field data and names are taken from Windows Update API IUpdate Interface:
  1040  // https://docs.microsoft.com/en-us/windows/win32/api/_wua/ Descriptive fields
  1041  // like title, and description are localized based on the locale of the VM
  1042  // being updated.
  1043  type InventoryWindowsUpdatePackage struct {
  1044  	// Categories: The categories that are associated with this update package.
  1045  	Categories []*InventoryWindowsUpdatePackageWindowsUpdateCategory `json:"categories,omitempty"`
  1046  	// Description: The localized description of the update package.
  1047  	Description string `json:"description,omitempty"`
  1048  	// KbArticleIds: A collection of Microsoft Knowledge Base article IDs that are
  1049  	// associated with the update package.
  1050  	KbArticleIds []string `json:"kbArticleIds,omitempty"`
  1051  	// LastDeploymentChangeTime: The last published date of the update, in (UTC)
  1052  	// date and time.
  1053  	LastDeploymentChangeTime string `json:"lastDeploymentChangeTime,omitempty"`
  1054  	// MoreInfoUrls: A collection of URLs that provide more information about the
  1055  	// update package.
  1056  	MoreInfoUrls []string `json:"moreInfoUrls,omitempty"`
  1057  	// RevisionNumber: The revision number of this update package.
  1058  	RevisionNumber int64 `json:"revisionNumber,omitempty"`
  1059  	// SupportUrl: A hyperlink to the language-specific support information for the
  1060  	// update.
  1061  	SupportUrl string `json:"supportUrl,omitempty"`
  1062  	// Title: The localized title of the update package.
  1063  	Title string `json:"title,omitempty"`
  1064  	// UpdateId: Gets the identifier of an update package. Stays the same across
  1065  	// revisions.
  1066  	UpdateId string `json:"updateId,omitempty"`
  1067  	// ForceSendFields is a list of field names (e.g. "Categories") to
  1068  	// unconditionally include in API requests. By default, fields with empty or
  1069  	// default values are omitted from API requests. See
  1070  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1071  	// details.
  1072  	ForceSendFields []string `json:"-"`
  1073  	// NullFields is a list of field names (e.g. "Categories") to include in API
  1074  	// requests with the JSON null value. By default, fields with empty values are
  1075  	// omitted from API requests. See
  1076  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1077  	NullFields []string `json:"-"`
  1078  }
  1079  
  1080  func (s *InventoryWindowsUpdatePackage) MarshalJSON() ([]byte, error) {
  1081  	type NoMethod InventoryWindowsUpdatePackage
  1082  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1083  }
  1084  
  1085  // InventoryWindowsUpdatePackageWindowsUpdateCategory: Categories specified by
  1086  // the Windows Update.
  1087  type InventoryWindowsUpdatePackageWindowsUpdateCategory struct {
  1088  	// Id: The identifier of the windows update category.
  1089  	Id string `json:"id,omitempty"`
  1090  	// Name: The name of the windows update category.
  1091  	Name string `json:"name,omitempty"`
  1092  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  1093  	// include in API requests. By default, fields with empty or default values are
  1094  	// omitted from API requests. See
  1095  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1096  	// details.
  1097  	ForceSendFields []string `json:"-"`
  1098  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  1099  	// with the JSON null value. By default, fields with empty values are omitted
  1100  	// from API requests. See
  1101  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1102  	NullFields []string `json:"-"`
  1103  }
  1104  
  1105  func (s *InventoryWindowsUpdatePackageWindowsUpdateCategory) MarshalJSON() ([]byte, error) {
  1106  	type NoMethod InventoryWindowsUpdatePackageWindowsUpdateCategory
  1107  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1108  }
  1109  
  1110  // InventoryZypperPatch: Details related to a Zypper Patch.
  1111  type InventoryZypperPatch struct {
  1112  	// Category: The category of the patch.
  1113  	Category string `json:"category,omitempty"`
  1114  	// PatchName: The name of the patch.
  1115  	PatchName string `json:"patchName,omitempty"`
  1116  	// Severity: The severity specified for this patch
  1117  	Severity string `json:"severity,omitempty"`
  1118  	// Summary: Any summary information provided about this patch.
  1119  	Summary string `json:"summary,omitempty"`
  1120  	// ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 *InventoryZypperPatch) MarshalJSON() ([]byte, error) {
  1134  	type NoMethod InventoryZypperPatch
  1135  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1136  }
  1137  
  1138  // ListInventoriesResponse: A response message for listing inventory data for
  1139  // all VMs in a specified location.
  1140  type ListInventoriesResponse struct {
  1141  	// Inventories: List of inventory objects.
  1142  	Inventories []*Inventory `json:"inventories,omitempty"`
  1143  	// NextPageToken: The pagination token to retrieve the next page of inventory
  1144  	// objects.
  1145  	NextPageToken string `json:"nextPageToken,omitempty"`
  1146  
  1147  	// ServerResponse contains the HTTP response code and headers from the server.
  1148  	googleapi.ServerResponse `json:"-"`
  1149  	// ForceSendFields is a list of field names (e.g. "Inventories") to
  1150  	// unconditionally include in API requests. By default, fields with empty or
  1151  	// default values are omitted from API requests. See
  1152  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1153  	// details.
  1154  	ForceSendFields []string `json:"-"`
  1155  	// NullFields is a list of field names (e.g. "Inventories") to include in API
  1156  	// requests with the JSON null value. By default, fields with empty values are
  1157  	// omitted from API requests. See
  1158  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1159  	NullFields []string `json:"-"`
  1160  }
  1161  
  1162  func (s *ListInventoriesResponse) MarshalJSON() ([]byte, error) {
  1163  	type NoMethod ListInventoriesResponse
  1164  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1165  }
  1166  
  1167  // ListOSPolicyAssignmentReportsResponse: A response message for listing OS
  1168  // Policy assignment reports including the page of results and page token.
  1169  type ListOSPolicyAssignmentReportsResponse struct {
  1170  	// NextPageToken: The pagination token to retrieve the next page of OS policy
  1171  	// assignment report objects.
  1172  	NextPageToken string `json:"nextPageToken,omitempty"`
  1173  	// OsPolicyAssignmentReports: List of OS policy assignment reports.
  1174  	OsPolicyAssignmentReports []*OSPolicyAssignmentReport `json:"osPolicyAssignmentReports,omitempty"`
  1175  
  1176  	// ServerResponse contains the HTTP response code and headers from the server.
  1177  	googleapi.ServerResponse `json:"-"`
  1178  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1179  	// unconditionally include in API requests. By default, fields with empty or
  1180  	// default values are omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1182  	// details.
  1183  	ForceSendFields []string `json:"-"`
  1184  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1185  	// requests with the JSON null value. By default, fields with empty values are
  1186  	// omitted from API requests. See
  1187  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1188  	NullFields []string `json:"-"`
  1189  }
  1190  
  1191  func (s *ListOSPolicyAssignmentReportsResponse) MarshalJSON() ([]byte, error) {
  1192  	type NoMethod ListOSPolicyAssignmentReportsResponse
  1193  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1194  }
  1195  
  1196  // ListOSPolicyAssignmentRevisionsResponse: A response message for listing all
  1197  // revisions for a OS policy assignment.
  1198  type ListOSPolicyAssignmentRevisionsResponse struct {
  1199  	// NextPageToken: The pagination token to retrieve the next page of OS policy
  1200  	// assignment revisions.
  1201  	NextPageToken string `json:"nextPageToken,omitempty"`
  1202  	// OsPolicyAssignments: The OS policy assignment revisions
  1203  	OsPolicyAssignments []*OSPolicyAssignment `json:"osPolicyAssignments,omitempty"`
  1204  
  1205  	// ServerResponse contains the HTTP response code and headers from the server.
  1206  	googleapi.ServerResponse `json:"-"`
  1207  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1208  	// unconditionally include in API requests. By default, fields with empty or
  1209  	// default values are omitted from API requests. See
  1210  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1211  	// details.
  1212  	ForceSendFields []string `json:"-"`
  1213  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1214  	// requests with the JSON null value. By default, fields with empty values are
  1215  	// omitted from API requests. See
  1216  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1217  	NullFields []string `json:"-"`
  1218  }
  1219  
  1220  func (s *ListOSPolicyAssignmentRevisionsResponse) MarshalJSON() ([]byte, error) {
  1221  	type NoMethod ListOSPolicyAssignmentRevisionsResponse
  1222  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1223  }
  1224  
  1225  // ListOSPolicyAssignmentsResponse: A response message for listing all
  1226  // assignments under given parent.
  1227  type ListOSPolicyAssignmentsResponse struct {
  1228  	// NextPageToken: The pagination token to retrieve the next page of OS policy
  1229  	// assignments.
  1230  	NextPageToken string `json:"nextPageToken,omitempty"`
  1231  	// OsPolicyAssignments: The list of assignments
  1232  	OsPolicyAssignments []*OSPolicyAssignment `json:"osPolicyAssignments,omitempty"`
  1233  
  1234  	// ServerResponse contains the HTTP response code and headers from the server.
  1235  	googleapi.ServerResponse `json:"-"`
  1236  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1237  	// unconditionally include in API requests. By default, fields with empty or
  1238  	// default values are omitted from API requests. See
  1239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1240  	// details.
  1241  	ForceSendFields []string `json:"-"`
  1242  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1243  	// requests with the JSON null value. By default, fields with empty values are
  1244  	// omitted from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1246  	NullFields []string `json:"-"`
  1247  }
  1248  
  1249  func (s *ListOSPolicyAssignmentsResponse) MarshalJSON() ([]byte, error) {
  1250  	type NoMethod ListOSPolicyAssignmentsResponse
  1251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1252  }
  1253  
  1254  // ListPatchDeploymentsResponse: A response message for listing patch
  1255  // deployments.
  1256  type ListPatchDeploymentsResponse struct {
  1257  	// NextPageToken: A pagination token that can be used to get the next page of
  1258  	// patch deployments.
  1259  	NextPageToken string `json:"nextPageToken,omitempty"`
  1260  	// PatchDeployments: The list of patch deployments.
  1261  	PatchDeployments []*PatchDeployment `json:"patchDeployments,omitempty"`
  1262  
  1263  	// ServerResponse contains the HTTP response code and headers from the server.
  1264  	googleapi.ServerResponse `json:"-"`
  1265  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1266  	// unconditionally include in API requests. By default, fields with empty or
  1267  	// default values are omitted from API requests. See
  1268  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1269  	// details.
  1270  	ForceSendFields []string `json:"-"`
  1271  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1272  	// requests with the JSON null value. By default, fields with empty values are
  1273  	// omitted from API requests. See
  1274  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1275  	NullFields []string `json:"-"`
  1276  }
  1277  
  1278  func (s *ListPatchDeploymentsResponse) MarshalJSON() ([]byte, error) {
  1279  	type NoMethod ListPatchDeploymentsResponse
  1280  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1281  }
  1282  
  1283  // ListPatchJobInstanceDetailsResponse: A response message for listing the
  1284  // instances details for a patch job.
  1285  type ListPatchJobInstanceDetailsResponse struct {
  1286  	// NextPageToken: A pagination token that can be used to get the next page of
  1287  	// results.
  1288  	NextPageToken string `json:"nextPageToken,omitempty"`
  1289  	// PatchJobInstanceDetails: A list of instance status.
  1290  	PatchJobInstanceDetails []*PatchJobInstanceDetails `json:"patchJobInstanceDetails,omitempty"`
  1291  
  1292  	// ServerResponse contains the HTTP response code and headers from the server.
  1293  	googleapi.ServerResponse `json:"-"`
  1294  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1295  	// unconditionally include in API requests. By default, fields with empty or
  1296  	// default values are omitted from API requests. See
  1297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1298  	// details.
  1299  	ForceSendFields []string `json:"-"`
  1300  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1301  	// requests with the JSON null value. By default, fields with empty values are
  1302  	// omitted from API requests. See
  1303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1304  	NullFields []string `json:"-"`
  1305  }
  1306  
  1307  func (s *ListPatchJobInstanceDetailsResponse) MarshalJSON() ([]byte, error) {
  1308  	type NoMethod ListPatchJobInstanceDetailsResponse
  1309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1310  }
  1311  
  1312  // ListPatchJobsResponse: A response message for listing patch jobs.
  1313  type ListPatchJobsResponse struct {
  1314  	// NextPageToken: A pagination token that can be used to get the next page of
  1315  	// results.
  1316  	NextPageToken string `json:"nextPageToken,omitempty"`
  1317  	// PatchJobs: The list of patch jobs.
  1318  	PatchJobs []*PatchJob `json:"patchJobs,omitempty"`
  1319  
  1320  	// ServerResponse contains the HTTP response code and headers from the server.
  1321  	googleapi.ServerResponse `json:"-"`
  1322  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1323  	// unconditionally include in API requests. By default, fields with empty or
  1324  	// default values are omitted from API requests. See
  1325  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1326  	// details.
  1327  	ForceSendFields []string `json:"-"`
  1328  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1329  	// requests with the JSON null value. By default, fields with empty values are
  1330  	// omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1332  	NullFields []string `json:"-"`
  1333  }
  1334  
  1335  func (s *ListPatchJobsResponse) MarshalJSON() ([]byte, error) {
  1336  	type NoMethod ListPatchJobsResponse
  1337  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1338  }
  1339  
  1340  // ListVulnerabilityReportsResponse: A response message for listing
  1341  // vulnerability reports for all VM instances in the specified location.
  1342  type ListVulnerabilityReportsResponse struct {
  1343  	// NextPageToken: The pagination token to retrieve the next page of
  1344  	// vulnerabilityReports object.
  1345  	NextPageToken string `json:"nextPageToken,omitempty"`
  1346  	// VulnerabilityReports: List of vulnerabilityReport objects.
  1347  	VulnerabilityReports []*VulnerabilityReport `json:"vulnerabilityReports,omitempty"`
  1348  
  1349  	// ServerResponse contains the HTTP response code and headers from the server.
  1350  	googleapi.ServerResponse `json:"-"`
  1351  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1352  	// unconditionally include in API requests. By default, fields with empty or
  1353  	// default values are omitted from API requests. See
  1354  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1355  	// details.
  1356  	ForceSendFields []string `json:"-"`
  1357  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1358  	// requests with the JSON null value. By default, fields with empty values are
  1359  	// omitted from API requests. See
  1360  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1361  	NullFields []string `json:"-"`
  1362  }
  1363  
  1364  func (s *ListVulnerabilityReportsResponse) MarshalJSON() ([]byte, error) {
  1365  	type NoMethod ListVulnerabilityReportsResponse
  1366  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1367  }
  1368  
  1369  // MonthlySchedule: Represents a monthly schedule. An example of a valid
  1370  // monthly schedule is "on the third Tuesday of the month" or "on the 15th of
  1371  // the month".
  1372  type MonthlySchedule struct {
  1373  	// MonthDay: Required. One day of the month. 1-31 indicates the 1st to the 31st
  1374  	// day. -1 indicates the last day of the month. Months without the target day
  1375  	// will be skipped. For example, a schedule to run "every month on the 31st"
  1376  	// will not run in February, April, June, etc.
  1377  	MonthDay int64 `json:"monthDay,omitempty"`
  1378  	// WeekDayOfMonth: Required. Week day in a month.
  1379  	WeekDayOfMonth *WeekDayOfMonth `json:"weekDayOfMonth,omitempty"`
  1380  	// ForceSendFields is a list of field names (e.g. "MonthDay") to
  1381  	// unconditionally include in API requests. By default, fields with empty or
  1382  	// default values are omitted from API requests. See
  1383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1384  	// details.
  1385  	ForceSendFields []string `json:"-"`
  1386  	// NullFields is a list of field names (e.g. "MonthDay") to include in API
  1387  	// requests with the JSON null value. By default, fields with empty values are
  1388  	// omitted from API requests. See
  1389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1390  	NullFields []string `json:"-"`
  1391  }
  1392  
  1393  func (s *MonthlySchedule) MarshalJSON() ([]byte, error) {
  1394  	type NoMethod MonthlySchedule
  1395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1396  }
  1397  
  1398  // OSPolicy: An OS policy defines the desired state configuration for a VM.
  1399  type OSPolicy struct {
  1400  	// AllowNoResourceGroupMatch: This flag determines the OS policy compliance
  1401  	// status when none of the resource groups within the policy are applicable for
  1402  	// a VM. Set this value to `true` if the policy needs to be reported as
  1403  	// compliant even if the policy has nothing to validate or enforce.
  1404  	AllowNoResourceGroupMatch bool `json:"allowNoResourceGroupMatch,omitempty"`
  1405  	// Description: Policy description. Length of the description is limited to
  1406  	// 1024 characters.
  1407  	Description string `json:"description,omitempty"`
  1408  	// Id: Required. The id of the OS policy with the following restrictions: *
  1409  	// Must contain only lowercase letters, numbers, and hyphens. * Must start with
  1410  	// a letter. * Must be between 1-63 characters. * Must end with a number or a
  1411  	// letter. * Must be unique within the assignment.
  1412  	Id string `json:"id,omitempty"`
  1413  	// Mode: Required. Policy mode
  1414  	//
  1415  	// Possible values:
  1416  	//   "MODE_UNSPECIFIED" - Invalid mode
  1417  	//   "VALIDATION" - This mode checks if the configuration resources in the
  1418  	// policy are in their desired state. No actions are performed if they are not
  1419  	// in the desired state. This mode is used for reporting purposes.
  1420  	//   "ENFORCEMENT" - This mode checks if the configuration resources in the
  1421  	// policy are in their desired state, and if not, enforces the desired state.
  1422  	Mode string `json:"mode,omitempty"`
  1423  	// ResourceGroups: Required. List of resource groups for the policy. For a
  1424  	// particular VM, resource groups are evaluated in the order specified and the
  1425  	// first resource group that is applicable is selected and the rest are
  1426  	// ignored. If none of the resource groups are applicable for a VM, the VM is
  1427  	// considered to be non-compliant w.r.t this policy. This behavior can be
  1428  	// toggled by the flag `allow_no_resource_group_match`
  1429  	ResourceGroups []*OSPolicyResourceGroup `json:"resourceGroups,omitempty"`
  1430  	// ForceSendFields is a list of field names (e.g. "AllowNoResourceGroupMatch")
  1431  	// to unconditionally include in API requests. By default, fields with empty or
  1432  	// default values are omitted from API requests. See
  1433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1434  	// details.
  1435  	ForceSendFields []string `json:"-"`
  1436  	// NullFields is a list of field names (e.g. "AllowNoResourceGroupMatch") to
  1437  	// include in API requests with the JSON null value. By default, fields with
  1438  	// empty values are omitted from API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1440  	NullFields []string `json:"-"`
  1441  }
  1442  
  1443  func (s *OSPolicy) MarshalJSON() ([]byte, error) {
  1444  	type NoMethod OSPolicy
  1445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1446  }
  1447  
  1448  // OSPolicyAssignment: OS policy assignment is an API resource that is used to
  1449  // apply a set of OS policies to a dynamically targeted group of Compute Engine
  1450  // VM instances. An OS policy is used to define the desired state configuration
  1451  // for a Compute Engine VM instance through a set of configuration resources
  1452  // that provide capabilities such as installing or removing software packages,
  1453  // or executing a script. For more information about the OS policy resource
  1454  // definitions and examples, see OS policy and OS policy assignment
  1455  // (https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
  1456  type OSPolicyAssignment struct {
  1457  	// Baseline: Output only. Indicates that this revision has been successfully
  1458  	// rolled out in this zone and new VMs will be assigned OS policies from this
  1459  	// revision. For a given OS policy assignment, there is only one revision with
  1460  	// a value of `true` for this field.
  1461  	Baseline bool `json:"baseline,omitempty"`
  1462  	// Deleted: Output only. Indicates that this revision deletes the OS policy
  1463  	// assignment.
  1464  	Deleted bool `json:"deleted,omitempty"`
  1465  	// Description: OS policy assignment description. Length of the description is
  1466  	// limited to 1024 characters.
  1467  	Description string `json:"description,omitempty"`
  1468  	// Etag: The etag for this OS policy assignment. If this is provided on update,
  1469  	// it must match the server's etag.
  1470  	Etag string `json:"etag,omitempty"`
  1471  	// InstanceFilter: Required. Filter to select VMs.
  1472  	InstanceFilter *OSPolicyAssignmentInstanceFilter `json:"instanceFilter,omitempty"`
  1473  	// Name: Resource name. Format:
  1474  	// `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_polic
  1475  	// y_assignment_id}` This field is ignored when you create an OS policy
  1476  	// assignment.
  1477  	Name string `json:"name,omitempty"`
  1478  	// OsPolicies: Required. List of OS policies to be applied to the VMs.
  1479  	OsPolicies []*OSPolicy `json:"osPolicies,omitempty"`
  1480  	// Reconciling: Output only. Indicates that reconciliation is in progress for
  1481  	// the revision. This value is `true` when the `rollout_state` is one of: *
  1482  	// IN_PROGRESS * CANCELLING
  1483  	Reconciling bool `json:"reconciling,omitempty"`
  1484  	// RevisionCreateTime: Output only. The timestamp that the revision was
  1485  	// created.
  1486  	RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
  1487  	// RevisionId: Output only. The assignment revision ID A new revision is
  1488  	// committed whenever a rollout is triggered for a OS policy assignment
  1489  	RevisionId string `json:"revisionId,omitempty"`
  1490  	// Rollout: Required. Rollout to deploy the OS policy assignment. A rollout is
  1491  	// triggered in the following situations: 1) OSPolicyAssignment is created. 2)
  1492  	// OSPolicyAssignment is updated and the update contains changes to one of the
  1493  	// following fields: - instance_filter - os_policies 3) OSPolicyAssignment is
  1494  	// deleted.
  1495  	Rollout *OSPolicyAssignmentRollout `json:"rollout,omitempty"`
  1496  	// RolloutState: Output only. OS policy assignment rollout state
  1497  	//
  1498  	// Possible values:
  1499  	//   "ROLLOUT_STATE_UNSPECIFIED" - Invalid value
  1500  	//   "IN_PROGRESS" - The rollout is in progress.
  1501  	//   "CANCELLING" - The rollout is being cancelled.
  1502  	//   "CANCELLED" - The rollout is cancelled.
  1503  	//   "SUCCEEDED" - The rollout has completed successfully.
  1504  	RolloutState string `json:"rolloutState,omitempty"`
  1505  	// Uid: Output only. Server generated unique id for the OS policy assignment
  1506  	// resource.
  1507  	Uid string `json:"uid,omitempty"`
  1508  
  1509  	// ServerResponse contains the HTTP response code and headers from the server.
  1510  	googleapi.ServerResponse `json:"-"`
  1511  	// ForceSendFields is a list of field names (e.g. "Baseline") to
  1512  	// unconditionally include in API requests. By default, fields with empty or
  1513  	// default values are omitted from API requests. See
  1514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1515  	// details.
  1516  	ForceSendFields []string `json:"-"`
  1517  	// NullFields is a list of field names (e.g. "Baseline") to include in API
  1518  	// requests with the JSON null value. By default, fields with empty values are
  1519  	// omitted from API requests. See
  1520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1521  	NullFields []string `json:"-"`
  1522  }
  1523  
  1524  func (s *OSPolicyAssignment) MarshalJSON() ([]byte, error) {
  1525  	type NoMethod OSPolicyAssignment
  1526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1527  }
  1528  
  1529  // OSPolicyAssignmentInstanceFilter: Filters to select target VMs for an
  1530  // assignment. If more than one filter criteria is specified below, a VM will
  1531  // be selected if and only if it satisfies all of them.
  1532  type OSPolicyAssignmentInstanceFilter struct {
  1533  	// All: Target all VMs in the project. If true, no other criteria is permitted.
  1534  	All bool `json:"all,omitempty"`
  1535  	// ExclusionLabels: List of label sets used for VM exclusion. If the list has
  1536  	// more than one label set, the VM is excluded if any of the label sets are
  1537  	// applicable for the VM.
  1538  	ExclusionLabels []*OSPolicyAssignmentLabelSet `json:"exclusionLabels,omitempty"`
  1539  	// InclusionLabels: List of label sets used for VM inclusion. If the list has
  1540  	// more than one `LabelSet`, the VM is included if any of the label sets are
  1541  	// applicable for the VM.
  1542  	InclusionLabels []*OSPolicyAssignmentLabelSet `json:"inclusionLabels,omitempty"`
  1543  	// Inventories: List of inventories to select VMs. A VM is selected if its
  1544  	// inventory data matches at least one of the following inventories.
  1545  	Inventories []*OSPolicyAssignmentInstanceFilterInventory `json:"inventories,omitempty"`
  1546  	// ForceSendFields is a list of field names (e.g. "All") to unconditionally
  1547  	// include in API requests. By default, fields with empty or default values are
  1548  	// omitted from API requests. See
  1549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1550  	// details.
  1551  	ForceSendFields []string `json:"-"`
  1552  	// NullFields is a list of field names (e.g. "All") to include in API requests
  1553  	// with the JSON null value. By default, fields with empty values are omitted
  1554  	// from API requests. See
  1555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1556  	NullFields []string `json:"-"`
  1557  }
  1558  
  1559  func (s *OSPolicyAssignmentInstanceFilter) MarshalJSON() ([]byte, error) {
  1560  	type NoMethod OSPolicyAssignmentInstanceFilter
  1561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1562  }
  1563  
  1564  // OSPolicyAssignmentInstanceFilterInventory: VM inventory details.
  1565  type OSPolicyAssignmentInstanceFilterInventory struct {
  1566  	// OsShortName: Required. The OS short name
  1567  	OsShortName string `json:"osShortName,omitempty"`
  1568  	// OsVersion: The OS version Prefix matches are supported if asterisk(*) is
  1569  	// provided as the last character. For example, to match all versions with a
  1570  	// major version of `7`, specify the following value for this field `7.*` An
  1571  	// empty string matches all OS versions.
  1572  	OsVersion string `json:"osVersion,omitempty"`
  1573  	// ForceSendFields is a list of field names (e.g. "OsShortName") to
  1574  	// unconditionally include in API requests. By default, fields with empty or
  1575  	// default values are omitted from API requests. See
  1576  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1577  	// details.
  1578  	ForceSendFields []string `json:"-"`
  1579  	// NullFields is a list of field names (e.g. "OsShortName") to include in API
  1580  	// requests with the JSON null value. By default, fields with empty values are
  1581  	// omitted from API requests. See
  1582  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1583  	NullFields []string `json:"-"`
  1584  }
  1585  
  1586  func (s *OSPolicyAssignmentInstanceFilterInventory) MarshalJSON() ([]byte, error) {
  1587  	type NoMethod OSPolicyAssignmentInstanceFilterInventory
  1588  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1589  }
  1590  
  1591  // OSPolicyAssignmentLabelSet: Message representing label set. * A label is a
  1592  // key value pair set for a VM. * A LabelSet is a set of labels. * Labels
  1593  // within a LabelSet are ANDed. In other words, a LabelSet is applicable for a
  1594  // VM only if it matches all the labels in the LabelSet. * Example: A LabelSet
  1595  // with 2 labels: `env=prod` and `type=webserver` will only be applicable for
  1596  // those VMs with both labels present.
  1597  type OSPolicyAssignmentLabelSet struct {
  1598  	// Labels: Labels are identified by key/value pairs in this map. A VM should
  1599  	// contain all the key/value pairs specified in this map to be selected.
  1600  	Labels map[string]string `json:"labels,omitempty"`
  1601  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  1602  	// include in API requests. By default, fields with empty or default values are
  1603  	// omitted from API requests. See
  1604  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1605  	// details.
  1606  	ForceSendFields []string `json:"-"`
  1607  	// NullFields is a list of field names (e.g. "Labels") to include in API
  1608  	// requests with the JSON null value. By default, fields with empty values are
  1609  	// omitted from API requests. See
  1610  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1611  	NullFields []string `json:"-"`
  1612  }
  1613  
  1614  func (s *OSPolicyAssignmentLabelSet) MarshalJSON() ([]byte, error) {
  1615  	type NoMethod OSPolicyAssignmentLabelSet
  1616  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1617  }
  1618  
  1619  // OSPolicyAssignmentOperationMetadata: OS policy assignment operation metadata
  1620  // provided by OS policy assignment API methods that return long running
  1621  // operations.
  1622  type OSPolicyAssignmentOperationMetadata struct {
  1623  	// ApiMethod: The OS policy assignment API method.
  1624  	//
  1625  	// Possible values:
  1626  	//   "API_METHOD_UNSPECIFIED" - Invalid value
  1627  	//   "CREATE" - Create OS policy assignment API method
  1628  	//   "UPDATE" - Update OS policy assignment API method
  1629  	//   "DELETE" - Delete OS policy assignment API method
  1630  	ApiMethod string `json:"apiMethod,omitempty"`
  1631  	// OsPolicyAssignment: Reference to the `OSPolicyAssignment` API resource.
  1632  	// Format:
  1633  	// `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_polic
  1634  	// y_assignment_id@revision_id}`
  1635  	OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
  1636  	// RolloutStartTime: Rollout start time
  1637  	RolloutStartTime string `json:"rolloutStartTime,omitempty"`
  1638  	// RolloutState: State of the rollout
  1639  	//
  1640  	// Possible values:
  1641  	//   "ROLLOUT_STATE_UNSPECIFIED" - Invalid value
  1642  	//   "IN_PROGRESS" - The rollout is in progress.
  1643  	//   "CANCELLING" - The rollout is being cancelled.
  1644  	//   "CANCELLED" - The rollout is cancelled.
  1645  	//   "SUCCEEDED" - The rollout has completed successfully.
  1646  	RolloutState string `json:"rolloutState,omitempty"`
  1647  	// RolloutUpdateTime: Rollout update time
  1648  	RolloutUpdateTime string `json:"rolloutUpdateTime,omitempty"`
  1649  	// ForceSendFields is a list of field names (e.g. "ApiMethod") to
  1650  	// unconditionally include in API requests. By default, fields with empty or
  1651  	// default values are omitted from API requests. See
  1652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1653  	// details.
  1654  	ForceSendFields []string `json:"-"`
  1655  	// NullFields is a list of field names (e.g. "ApiMethod") to include in API
  1656  	// requests with the JSON null value. By default, fields with empty values are
  1657  	// omitted from API requests. See
  1658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1659  	NullFields []string `json:"-"`
  1660  }
  1661  
  1662  func (s *OSPolicyAssignmentOperationMetadata) MarshalJSON() ([]byte, error) {
  1663  	type NoMethod OSPolicyAssignmentOperationMetadata
  1664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1665  }
  1666  
  1667  // OSPolicyAssignmentReport: A report of the OS policy assignment status for a
  1668  // given instance.
  1669  type OSPolicyAssignmentReport struct {
  1670  	// Instance: The Compute Engine VM instance name.
  1671  	Instance string `json:"instance,omitempty"`
  1672  	// LastRunId: Unique identifier of the last attempted run to apply the OS
  1673  	// policies associated with this assignment on the VM. This ID is logged by the
  1674  	// OS Config agent while applying the OS policies associated with this
  1675  	// assignment on the VM. NOTE: If the service is unable to successfully connect
  1676  	// to the agent for this run, then this id will not be available in the agent
  1677  	// logs.
  1678  	LastRunId string `json:"lastRunId,omitempty"`
  1679  	// Name: The `OSPolicyAssignmentReport` API resource name. Format:
  1680  	// `projects/{project_number}/locations/{location}/instances/{instance_id}/osPol
  1681  	// icyAssignments/{os_policy_assignment_id}/report`
  1682  	Name string `json:"name,omitempty"`
  1683  	// OsPolicyAssignment: Reference to the `OSPolicyAssignment` API resource that
  1684  	// the `OSPolicy` belongs to. Format:
  1685  	// `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_polic
  1686  	// y_assignment_id@revision_id}`
  1687  	OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
  1688  	// OsPolicyCompliances: Compliance data for each `OSPolicy` that is applied to
  1689  	// the VM.
  1690  	OsPolicyCompliances []*OSPolicyAssignmentReportOSPolicyCompliance `json:"osPolicyCompliances,omitempty"`
  1691  	// UpdateTime: Timestamp for when the report was last generated.
  1692  	UpdateTime string `json:"updateTime,omitempty"`
  1693  
  1694  	// ServerResponse contains the HTTP response code and headers from the server.
  1695  	googleapi.ServerResponse `json:"-"`
  1696  	// ForceSendFields is a list of field names (e.g. "Instance") to
  1697  	// unconditionally include in API requests. By default, fields with empty or
  1698  	// default values are omitted from API requests. See
  1699  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1700  	// details.
  1701  	ForceSendFields []string `json:"-"`
  1702  	// NullFields is a list of field names (e.g. "Instance") to include in API
  1703  	// requests with the JSON null value. By default, fields with empty values are
  1704  	// omitted from API requests. See
  1705  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1706  	NullFields []string `json:"-"`
  1707  }
  1708  
  1709  func (s *OSPolicyAssignmentReport) MarshalJSON() ([]byte, error) {
  1710  	type NoMethod OSPolicyAssignmentReport
  1711  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1712  }
  1713  
  1714  // OSPolicyAssignmentReportOSPolicyCompliance: Compliance data for an OS policy
  1715  type OSPolicyAssignmentReportOSPolicyCompliance struct {
  1716  	// ComplianceState: The compliance state of the OS policy.
  1717  	//
  1718  	// Possible values:
  1719  	//   "UNKNOWN" - The policy is in an unknown compliance state. Refer to the
  1720  	// field `compliance_state_reason` to learn the exact reason for the policy to
  1721  	// be in this compliance state.
  1722  	//   "COMPLIANT" - Policy is compliant. The policy is compliant if all the
  1723  	// underlying resources are also compliant.
  1724  	//   "NON_COMPLIANT" - Policy is non-compliant. The policy is non-compliant if
  1725  	// one or more underlying resources are non-compliant.
  1726  	ComplianceState string `json:"complianceState,omitempty"`
  1727  	// ComplianceStateReason: The reason for the OS policy to be in an unknown
  1728  	// compliance state. This field is always populated when `compliance_state` is
  1729  	// `UNKNOWN`. If populated, the field can contain one of the following values:
  1730  	// * `vm-not-running`: The VM was not running. *
  1731  	// `os-policies-not-supported-by-agent`: The version of the OS Config agent
  1732  	// running on the VM does not support running OS policies. *
  1733  	// `no-agent-detected`: The OS Config agent is not detected for the VM. *
  1734  	// `resource-execution-errors`: The OS Config agent encountered errors while
  1735  	// executing one or more resources in the policy. See
  1736  	// `os_policy_resource_compliances` for details. * `task-timeout`: The task
  1737  	// sent to the agent to apply the policy timed out. * `unexpected-agent-state`:
  1738  	// The OS Config agent did not report the final status of the task that
  1739  	// attempted to apply the policy. Instead, the agent unexpectedly started
  1740  	// working on a different task. This mostly happens when the agent or VM
  1741  	// unexpectedly restarts while applying OS policies. *
  1742  	// `internal-service-errors`: Internal service errors were encountered while
  1743  	// attempting to apply the policy.
  1744  	ComplianceStateReason string `json:"complianceStateReason,omitempty"`
  1745  	// OsPolicyId: The OS policy id
  1746  	OsPolicyId string `json:"osPolicyId,omitempty"`
  1747  	// OsPolicyResourceCompliances: Compliance data for each resource within the
  1748  	// policy that is applied to the VM.
  1749  	OsPolicyResourceCompliances []*OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance `json:"osPolicyResourceCompliances,omitempty"`
  1750  	// ForceSendFields is a list of field names (e.g. "ComplianceState") to
  1751  	// unconditionally include in API requests. By default, fields with empty or
  1752  	// default values are omitted from API requests. See
  1753  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1754  	// details.
  1755  	ForceSendFields []string `json:"-"`
  1756  	// NullFields is a list of field names (e.g. "ComplianceState") to include in
  1757  	// API requests with the JSON null value. By default, fields with empty values
  1758  	// are omitted from API requests. See
  1759  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1760  	NullFields []string `json:"-"`
  1761  }
  1762  
  1763  func (s *OSPolicyAssignmentReportOSPolicyCompliance) MarshalJSON() ([]byte, error) {
  1764  	type NoMethod OSPolicyAssignmentReportOSPolicyCompliance
  1765  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1766  }
  1767  
  1768  // OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance:
  1769  // Compliance data for an OS policy resource.
  1770  type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance struct {
  1771  	// ComplianceState: The compliance state of the resource.
  1772  	//
  1773  	// Possible values:
  1774  	//   "UNKNOWN" - The resource is in an unknown compliance state. To get more
  1775  	// details about why the policy is in this state, review the output of the
  1776  	// `compliance_state_reason` field.
  1777  	//   "COMPLIANT" - Resource is compliant.
  1778  	//   "NON_COMPLIANT" - Resource is non-compliant.
  1779  	ComplianceState string `json:"complianceState,omitempty"`
  1780  	// ComplianceStateReason: A reason for the resource to be in the given
  1781  	// compliance state. This field is always populated when `compliance_state` is
  1782  	// `UNKNOWN`. The following values are supported when `compliance_state ==
  1783  	// UNKNOWN` * `execution-errors`: Errors were encountered by the agent while
  1784  	// executing the resource and the compliance state couldn't be determined. *
  1785  	// `execution-skipped-by-agent`: Resource execution was skipped by the agent
  1786  	// because errors were encountered while executing prior resources in the OS
  1787  	// policy. * `os-policy-execution-attempt-failed`: The execution of the OS
  1788  	// policy containing this resource failed and the compliance state couldn't be
  1789  	// determined.
  1790  	ComplianceStateReason string `json:"complianceStateReason,omitempty"`
  1791  	// ConfigSteps: Ordered list of configuration completed by the agent for the OS
  1792  	// policy resource.
  1793  	ConfigSteps []*OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep `json:"configSteps,omitempty"`
  1794  	// ExecResourceOutput: ExecResource specific output.
  1795  	ExecResourceOutput *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput `json:"execResourceOutput,omitempty"`
  1796  	// OsPolicyResourceId: The ID of the OS policy resource.
  1797  	OsPolicyResourceId string `json:"osPolicyResourceId,omitempty"`
  1798  	// ForceSendFields is a list of field names (e.g. "ComplianceState") to
  1799  	// unconditionally include in API requests. By default, fields with empty or
  1800  	// default values are omitted from API requests. See
  1801  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1802  	// details.
  1803  	ForceSendFields []string `json:"-"`
  1804  	// NullFields is a list of field names (e.g. "ComplianceState") to include in
  1805  	// API requests with the JSON null value. By default, fields with empty values
  1806  	// are omitted from API requests. See
  1807  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1808  	NullFields []string `json:"-"`
  1809  }
  1810  
  1811  func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance) MarshalJSON() ([]byte, error) {
  1812  	type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance
  1813  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1814  }
  1815  
  1816  // OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResou
  1817  // rceOutput: ExecResource specific output.
  1818  type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput struct {
  1819  	// EnforcementOutput: Output from enforcement phase output file (if run).
  1820  	// Output size is limited to 100K bytes.
  1821  	EnforcementOutput string `json:"enforcementOutput,omitempty"`
  1822  	// ForceSendFields is a list of field names (e.g. "EnforcementOutput") to
  1823  	// unconditionally include in API requests. By default, fields with empty or
  1824  	// default values are omitted from API requests. See
  1825  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1826  	// details.
  1827  	ForceSendFields []string `json:"-"`
  1828  	// NullFields is a list of field names (e.g. "EnforcementOutput") to include in
  1829  	// API requests with the JSON null value. By default, fields with empty values
  1830  	// are omitted from API requests. See
  1831  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1832  	NullFields []string `json:"-"`
  1833  }
  1834  
  1835  func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput) MarshalJSON() ([]byte, error) {
  1836  	type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput
  1837  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1838  }
  1839  
  1840  // OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyR
  1841  // esourceConfigStep: Step performed by the OS Config agent for configuring an
  1842  // `OSPolicy` resource to its desired state.
  1843  type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep struct {
  1844  	// ErrorMessage: An error message recorded during the execution of this step.
  1845  	// Only populated if errors were encountered during this step execution.
  1846  	ErrorMessage string `json:"errorMessage,omitempty"`
  1847  	// Type: Configuration step type.
  1848  	//
  1849  	// Possible values:
  1850  	//   "TYPE_UNSPECIFIED" - Default value. This value is unused.
  1851  	//   "VALIDATION" - Checks for resource conflicts such as schema errors.
  1852  	//   "DESIRED_STATE_CHECK" - Checks the current status of the desired state for
  1853  	// a resource.
  1854  	//   "DESIRED_STATE_ENFORCEMENT" - Enforces the desired state for a resource
  1855  	// that is not in desired state.
  1856  	//   "DESIRED_STATE_CHECK_POST_ENFORCEMENT" - Re-checks the status of the
  1857  	// desired state. This check is done for a resource after the enforcement of
  1858  	// all OS policies. This step is used to determine the final desired state
  1859  	// status for the resource. It accounts for any resources that might have
  1860  	// drifted from their desired state due to side effects from executing other
  1861  	// resources.
  1862  	Type string `json:"type,omitempty"`
  1863  	// ForceSendFields is a list of field names (e.g. "ErrorMessage") to
  1864  	// unconditionally include in API requests. By default, fields with empty or
  1865  	// default values are omitted from API requests. See
  1866  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1867  	// details.
  1868  	ForceSendFields []string `json:"-"`
  1869  	// NullFields is a list of field names (e.g. "ErrorMessage") to include in API
  1870  	// requests with the JSON null value. By default, fields with empty values are
  1871  	// omitted from API requests. See
  1872  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1873  	NullFields []string `json:"-"`
  1874  }
  1875  
  1876  func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep) MarshalJSON() ([]byte, error) {
  1877  	type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep
  1878  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1879  }
  1880  
  1881  // OSPolicyAssignmentRollout: Message to configure the rollout at the zonal
  1882  // level for the OS policy assignment.
  1883  type OSPolicyAssignmentRollout struct {
  1884  	// DisruptionBudget: Required. The maximum number (or percentage) of VMs per
  1885  	// zone to disrupt at any given moment.
  1886  	DisruptionBudget *FixedOrPercent `json:"disruptionBudget,omitempty"`
  1887  	// MinWaitDuration: Required. This determines the minimum duration of time to
  1888  	// wait after the configuration changes are applied through the current
  1889  	// rollout. A VM continues to count towards the `disruption_budget` at least
  1890  	// until this duration of time has passed after configuration changes are
  1891  	// applied.
  1892  	MinWaitDuration string `json:"minWaitDuration,omitempty"`
  1893  	// ForceSendFields is a list of field names (e.g. "DisruptionBudget") to
  1894  	// unconditionally include in API requests. By default, fields with empty or
  1895  	// default values are omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1897  	// details.
  1898  	ForceSendFields []string `json:"-"`
  1899  	// NullFields is a list of field names (e.g. "DisruptionBudget") to include in
  1900  	// API requests with the JSON null value. By default, fields with empty values
  1901  	// are omitted from API requests. See
  1902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1903  	NullFields []string `json:"-"`
  1904  }
  1905  
  1906  func (s *OSPolicyAssignmentRollout) MarshalJSON() ([]byte, error) {
  1907  	type NoMethod OSPolicyAssignmentRollout
  1908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1909  }
  1910  
  1911  // OSPolicyInventoryFilter: Filtering criteria to select VMs based on inventory
  1912  // details.
  1913  type OSPolicyInventoryFilter struct {
  1914  	// OsShortName: Required. The OS short name
  1915  	OsShortName string `json:"osShortName,omitempty"`
  1916  	// OsVersion: The OS version Prefix matches are supported if asterisk(*) is
  1917  	// provided as the last character. For example, to match all versions with a
  1918  	// major version of `7`, specify the following value for this field `7.*` An
  1919  	// empty string matches all OS versions.
  1920  	OsVersion string `json:"osVersion,omitempty"`
  1921  	// ForceSendFields is a list of field names (e.g. "OsShortName") to
  1922  	// unconditionally include in API requests. By default, fields with empty or
  1923  	// default values are omitted from API requests. See
  1924  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1925  	// details.
  1926  	ForceSendFields []string `json:"-"`
  1927  	// NullFields is a list of field names (e.g. "OsShortName") to include in API
  1928  	// requests with the JSON null value. By default, fields with empty values are
  1929  	// omitted from API requests. See
  1930  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1931  	NullFields []string `json:"-"`
  1932  }
  1933  
  1934  func (s *OSPolicyInventoryFilter) MarshalJSON() ([]byte, error) {
  1935  	type NoMethod OSPolicyInventoryFilter
  1936  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1937  }
  1938  
  1939  // OSPolicyResource: An OS policy resource is used to define the desired state
  1940  // configuration and provides a specific functionality like installing/removing
  1941  // packages, executing a script etc. The system ensures that resources are
  1942  // always in their desired state by taking necessary actions if they have
  1943  // drifted from their desired state.
  1944  type OSPolicyResource struct {
  1945  	// Exec: Exec resource
  1946  	Exec *OSPolicyResourceExecResource `json:"exec,omitempty"`
  1947  	// File: File resource
  1948  	File *OSPolicyResourceFileResource `json:"file,omitempty"`
  1949  	// Id: Required. The id of the resource with the following restrictions: * Must
  1950  	// contain only lowercase letters, numbers, and hyphens. * Must start with a
  1951  	// letter. * Must be between 1-63 characters. * Must end with a number or a
  1952  	// letter. * Must be unique within the OS policy.
  1953  	Id string `json:"id,omitempty"`
  1954  	// Pkg: Package resource
  1955  	Pkg *OSPolicyResourcePackageResource `json:"pkg,omitempty"`
  1956  	// Repository: Package repository resource
  1957  	Repository *OSPolicyResourceRepositoryResource `json:"repository,omitempty"`
  1958  	// ForceSendFields is a list of field names (e.g. "Exec") to unconditionally
  1959  	// include in API requests. By default, fields with empty or default values are
  1960  	// omitted from API requests. See
  1961  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1962  	// details.
  1963  	ForceSendFields []string `json:"-"`
  1964  	// NullFields is a list of field names (e.g. "Exec") to include in API requests
  1965  	// with the JSON null value. By default, fields with empty values are omitted
  1966  	// from API requests. See
  1967  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1968  	NullFields []string `json:"-"`
  1969  }
  1970  
  1971  func (s *OSPolicyResource) MarshalJSON() ([]byte, error) {
  1972  	type NoMethod OSPolicyResource
  1973  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1974  }
  1975  
  1976  // OSPolicyResourceExecResource: A resource that allows executing scripts on
  1977  // the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both
  1978  // stages accept a script as an argument to execute. When the `ExecResource` is
  1979  // applied by the agent, it first executes the script in the `validate` stage.
  1980  // The `validate` stage can signal that the `ExecResource` is already in the
  1981  // desired state by returning an exit code of `100`. If the `ExecResource` is
  1982  // not in the desired state, it should return an exit code of `101`. Any other
  1983  // exit code returned by this stage is considered an error. If the
  1984  // `ExecResource` is not in the desired state based on the exit code from the
  1985  // `validate` stage, the agent proceeds to execute the script from the
  1986  // `enforce` stage. If the `ExecResource` is already in the desired state, the
  1987  // `enforce` stage will not be run. Similar to `validate` stage, the `enforce`
  1988  // stage should return an exit code of `100` to indicate that the resource in
  1989  // now in its desired state. Any other exit code is considered an error. NOTE:
  1990  // An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an
  1991  // explicit indicator of `in desired state`, `not in desired state` and errors.
  1992  // Because, for example, Powershell will always return an exit code of `0`
  1993  // unless an `exit` statement is provided in the script. So, for reasons of
  1994  // consistency and being explicit, exit codes `100` and `101` were chosen.
  1995  type OSPolicyResourceExecResource struct {
  1996  	// Enforce: What to run to bring this resource into the desired state. An exit
  1997  	// code of 100 indicates "success", any other exit code indicates a failure
  1998  	// running enforce.
  1999  	Enforce *OSPolicyResourceExecResourceExec `json:"enforce,omitempty"`
  2000  	// Validate: Required. What to run to validate this resource is in the desired
  2001  	// state. An exit code of 100 indicates "in desired state", and exit code of
  2002  	// 101 indicates "not in desired state". Any other exit code indicates a
  2003  	// failure running validate.
  2004  	Validate *OSPolicyResourceExecResourceExec `json:"validate,omitempty"`
  2005  	// ForceSendFields is a list of field names (e.g. "Enforce") to unconditionally
  2006  	// include in API requests. By default, fields with empty or default values are
  2007  	// omitted from API requests. See
  2008  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2009  	// details.
  2010  	ForceSendFields []string `json:"-"`
  2011  	// NullFields is a list of field names (e.g. "Enforce") to include in API
  2012  	// requests with the JSON null value. By default, fields with empty values are
  2013  	// omitted from API requests. See
  2014  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2015  	NullFields []string `json:"-"`
  2016  }
  2017  
  2018  func (s *OSPolicyResourceExecResource) MarshalJSON() ([]byte, error) {
  2019  	type NoMethod OSPolicyResourceExecResource
  2020  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2021  }
  2022  
  2023  // OSPolicyResourceExecResourceExec: A file or script to execute.
  2024  type OSPolicyResourceExecResourceExec struct {
  2025  	// Args: Optional arguments to pass to the source during execution.
  2026  	Args []string `json:"args,omitempty"`
  2027  	// File: A remote or local file.
  2028  	File *OSPolicyResourceFile `json:"file,omitempty"`
  2029  	// Interpreter: Required. The script interpreter to use.
  2030  	//
  2031  	// Possible values:
  2032  	//   "INTERPRETER_UNSPECIFIED" - Invalid value, the request will return
  2033  	// validation error.
  2034  	//   "NONE" - If an interpreter is not specified, the source is executed
  2035  	// directly. This execution, without an interpreter, only succeeds for
  2036  	// executables and scripts that have shebang lines.
  2037  	//   "SHELL" - Indicates that the script runs with `/bin/sh` on Linux and
  2038  	// `cmd.exe` on Windows.
  2039  	//   "POWERSHELL" - Indicates that the script runs with PowerShell.
  2040  	Interpreter string `json:"interpreter,omitempty"`
  2041  	// OutputFilePath: Only recorded for enforce Exec. Path to an output file (that
  2042  	// is created by this Exec) whose content will be recorded in
  2043  	// OSPolicyResourceCompliance after a successful run. Absence or failure to
  2044  	// read this file will result in this ExecResource being non-compliant. Output
  2045  	// file size is limited to 100K bytes.
  2046  	OutputFilePath string `json:"outputFilePath,omitempty"`
  2047  	// Script: An inline script. The size of the script is limited to 32KiB.
  2048  	Script string `json:"script,omitempty"`
  2049  	// ForceSendFields is a list of field names (e.g. "Args") to unconditionally
  2050  	// include in API requests. By default, fields with empty or default values are
  2051  	// omitted from API requests. See
  2052  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2053  	// details.
  2054  	ForceSendFields []string `json:"-"`
  2055  	// NullFields is a list of field names (e.g. "Args") to include in API requests
  2056  	// with the JSON null value. By default, fields with empty values are omitted
  2057  	// from API requests. See
  2058  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2059  	NullFields []string `json:"-"`
  2060  }
  2061  
  2062  func (s *OSPolicyResourceExecResourceExec) MarshalJSON() ([]byte, error) {
  2063  	type NoMethod OSPolicyResourceExecResourceExec
  2064  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2065  }
  2066  
  2067  // OSPolicyResourceFile: A remote or local file.
  2068  type OSPolicyResourceFile struct {
  2069  	// AllowInsecure: Defaults to false. When false, files are subject to
  2070  	// validations based on the file type: Remote: A checksum must be specified.
  2071  	// Cloud Storage: An object generation number must be specified.
  2072  	AllowInsecure bool `json:"allowInsecure,omitempty"`
  2073  	// Gcs: A Cloud Storage object.
  2074  	Gcs *OSPolicyResourceFileGcs `json:"gcs,omitempty"`
  2075  	// LocalPath: A local path within the VM to use.
  2076  	LocalPath string `json:"localPath,omitempty"`
  2077  	// Remote: A generic remote file.
  2078  	Remote *OSPolicyResourceFileRemote `json:"remote,omitempty"`
  2079  	// ForceSendFields is a list of field names (e.g. "AllowInsecure") to
  2080  	// unconditionally include in API requests. By default, fields with empty or
  2081  	// default values are omitted from API requests. See
  2082  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2083  	// details.
  2084  	ForceSendFields []string `json:"-"`
  2085  	// NullFields is a list of field names (e.g. "AllowInsecure") to include in API
  2086  	// requests with the JSON null value. By default, fields with empty values are
  2087  	// omitted from API requests. See
  2088  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2089  	NullFields []string `json:"-"`
  2090  }
  2091  
  2092  func (s *OSPolicyResourceFile) MarshalJSON() ([]byte, error) {
  2093  	type NoMethod OSPolicyResourceFile
  2094  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2095  }
  2096  
  2097  // OSPolicyResourceFileGcs: Specifies a file available as a Cloud Storage
  2098  // Object.
  2099  type OSPolicyResourceFileGcs struct {
  2100  	// Bucket: Required. Bucket of the Cloud Storage object.
  2101  	Bucket string `json:"bucket,omitempty"`
  2102  	// Generation: Generation number of the Cloud Storage object.
  2103  	Generation int64 `json:"generation,omitempty,string"`
  2104  	// Object: Required. Name of the Cloud Storage object.
  2105  	Object string `json:"object,omitempty"`
  2106  	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
  2107  	// include in API requests. By default, fields with empty or default values are
  2108  	// omitted from API requests. See
  2109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2110  	// details.
  2111  	ForceSendFields []string `json:"-"`
  2112  	// NullFields is a list of field names (e.g. "Bucket") to include in API
  2113  	// requests with the JSON null value. By default, fields with empty values are
  2114  	// omitted from API requests. See
  2115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2116  	NullFields []string `json:"-"`
  2117  }
  2118  
  2119  func (s *OSPolicyResourceFileGcs) MarshalJSON() ([]byte, error) {
  2120  	type NoMethod OSPolicyResourceFileGcs
  2121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2122  }
  2123  
  2124  // OSPolicyResourceFileRemote: Specifies a file available via some URI.
  2125  type OSPolicyResourceFileRemote struct {
  2126  	// Sha256Checksum: SHA256 checksum of the remote file.
  2127  	Sha256Checksum string `json:"sha256Checksum,omitempty"`
  2128  	// Uri: Required. URI from which to fetch the object. It should contain both
  2129  	// the protocol and path following the format `{protocol}://{location}`.
  2130  	Uri string `json:"uri,omitempty"`
  2131  	// ForceSendFields is a list of field names (e.g. "Sha256Checksum") to
  2132  	// unconditionally include in API requests. By default, fields with empty or
  2133  	// default values are omitted from API requests. See
  2134  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2135  	// details.
  2136  	ForceSendFields []string `json:"-"`
  2137  	// NullFields is a list of field names (e.g. "Sha256Checksum") to include in
  2138  	// API requests with the JSON null value. By default, fields with empty values
  2139  	// are omitted from API requests. See
  2140  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2141  	NullFields []string `json:"-"`
  2142  }
  2143  
  2144  func (s *OSPolicyResourceFileRemote) MarshalJSON() ([]byte, error) {
  2145  	type NoMethod OSPolicyResourceFileRemote
  2146  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2147  }
  2148  
  2149  // OSPolicyResourceFileResource: A resource that manages the state of a file.
  2150  type OSPolicyResourceFileResource struct {
  2151  	// Content: A a file with this content. The size of the content is limited to
  2152  	// 32KiB.
  2153  	Content string `json:"content,omitempty"`
  2154  	// File: A remote or local source.
  2155  	File *OSPolicyResourceFile `json:"file,omitempty"`
  2156  	// Path: Required. The absolute path of the file within the VM.
  2157  	Path string `json:"path,omitempty"`
  2158  	// Permissions: Consists of three octal digits which represent, in order, the
  2159  	// permissions of the owner, group, and other users for the file (similarly to
  2160  	// the numeric mode used in the linux chmod utility). Each digit represents a
  2161  	// three bit number with the 4 bit corresponding to the read permissions, the 2
  2162  	// bit corresponds to the write bit, and the one bit corresponds to the execute
  2163  	// permission. Default behavior is 755. Below are some examples of permissions
  2164  	// and their associated values: read, write, and execute: 7 read and execute: 5
  2165  	// read and write: 6 read only: 4
  2166  	Permissions string `json:"permissions,omitempty"`
  2167  	// State: Required. Desired state of the file.
  2168  	//
  2169  	// Possible values:
  2170  	//   "DESIRED_STATE_UNSPECIFIED" - Unspecified is invalid.
  2171  	//   "PRESENT" - Ensure file at path is present.
  2172  	//   "ABSENT" - Ensure file at path is absent.
  2173  	//   "CONTENTS_MATCH" - Ensure the contents of the file at path matches. If the
  2174  	// file does not exist it will be created.
  2175  	State string `json:"state,omitempty"`
  2176  	// ForceSendFields is a list of field names (e.g. "Content") to unconditionally
  2177  	// include in API requests. By default, fields with empty or default values are
  2178  	// omitted from API requests. See
  2179  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2180  	// details.
  2181  	ForceSendFields []string `json:"-"`
  2182  	// NullFields is a list of field names (e.g. "Content") to include in API
  2183  	// requests with the JSON null value. By default, fields with empty values are
  2184  	// omitted from API requests. See
  2185  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2186  	NullFields []string `json:"-"`
  2187  }
  2188  
  2189  func (s *OSPolicyResourceFileResource) MarshalJSON() ([]byte, error) {
  2190  	type NoMethod OSPolicyResourceFileResource
  2191  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2192  }
  2193  
  2194  // OSPolicyResourceGroup: Resource groups provide a mechanism to group OS
  2195  // policy resources. Resource groups enable OS policy authors to create a
  2196  // single OS policy to be applied to VMs running different operating Systems.
  2197  // When the OS policy is applied to a target VM, the appropriate resource group
  2198  // within the OS policy is selected based on the `OSFilter` specified within
  2199  // the resource group.
  2200  type OSPolicyResourceGroup struct {
  2201  	// InventoryFilters: List of inventory filters for the resource group. The
  2202  	// resources in this resource group are applied to the target VM if it
  2203  	// satisfies at least one of the following inventory filters. For example, to
  2204  	// apply this resource group to VMs running either `RHEL` or `CentOS` operating
  2205  	// systems, specify 2 items for the list with following values:
  2206  	// inventory_filters[0].os_short_name='rhel' and
  2207  	// inventory_filters[1].os_short_name='centos' If the list is empty, this
  2208  	// resource group will be applied to the target VM unconditionally.
  2209  	InventoryFilters []*OSPolicyInventoryFilter `json:"inventoryFilters,omitempty"`
  2210  	// Resources: Required. List of resources configured for this resource group.
  2211  	// The resources are executed in the exact order specified here.
  2212  	Resources []*OSPolicyResource `json:"resources,omitempty"`
  2213  	// ForceSendFields is a list of field names (e.g. "InventoryFilters") to
  2214  	// unconditionally include in API requests. By default, fields with empty or
  2215  	// default values are omitted from API requests. See
  2216  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2217  	// details.
  2218  	ForceSendFields []string `json:"-"`
  2219  	// NullFields is a list of field names (e.g. "InventoryFilters") to include in
  2220  	// API requests with the JSON null value. By default, fields with empty values
  2221  	// are omitted from API requests. See
  2222  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2223  	NullFields []string `json:"-"`
  2224  }
  2225  
  2226  func (s *OSPolicyResourceGroup) MarshalJSON() ([]byte, error) {
  2227  	type NoMethod OSPolicyResourceGroup
  2228  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2229  }
  2230  
  2231  // OSPolicyResourcePackageResource: A resource that manages a system package.
  2232  type OSPolicyResourcePackageResource struct {
  2233  	// Apt: A package managed by Apt.
  2234  	Apt *OSPolicyResourcePackageResourceAPT `json:"apt,omitempty"`
  2235  	// Deb: A deb package file.
  2236  	Deb *OSPolicyResourcePackageResourceDeb `json:"deb,omitempty"`
  2237  	// DesiredState: Required. The desired state the agent should maintain for this
  2238  	// package.
  2239  	//
  2240  	// Possible values:
  2241  	//   "DESIRED_STATE_UNSPECIFIED" - Unspecified is invalid.
  2242  	//   "INSTALLED" - Ensure that the package is installed.
  2243  	//   "REMOVED" - The agent ensures that the package is not installed and
  2244  	// uninstalls it if detected.
  2245  	DesiredState string `json:"desiredState,omitempty"`
  2246  	// Googet: A package managed by GooGet.
  2247  	Googet *OSPolicyResourcePackageResourceGooGet `json:"googet,omitempty"`
  2248  	// Msi: An MSI package.
  2249  	Msi *OSPolicyResourcePackageResourceMSI `json:"msi,omitempty"`
  2250  	// Rpm: An rpm package file.
  2251  	Rpm *OSPolicyResourcePackageResourceRPM `json:"rpm,omitempty"`
  2252  	// Yum: A package managed by YUM.
  2253  	Yum *OSPolicyResourcePackageResourceYUM `json:"yum,omitempty"`
  2254  	// Zypper: A package managed by Zypper.
  2255  	Zypper *OSPolicyResourcePackageResourceZypper `json:"zypper,omitempty"`
  2256  	// ForceSendFields is a list of field names (e.g. "Apt") to unconditionally
  2257  	// include in API requests. By default, fields with empty or default values are
  2258  	// omitted from API requests. See
  2259  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2260  	// details.
  2261  	ForceSendFields []string `json:"-"`
  2262  	// NullFields is a list of field names (e.g. "Apt") to include in API requests
  2263  	// with the JSON null value. By default, fields with empty values are omitted
  2264  	// from API requests. See
  2265  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2266  	NullFields []string `json:"-"`
  2267  }
  2268  
  2269  func (s *OSPolicyResourcePackageResource) MarshalJSON() ([]byte, error) {
  2270  	type NoMethod OSPolicyResourcePackageResource
  2271  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2272  }
  2273  
  2274  // OSPolicyResourcePackageResourceAPT: A package managed by APT. - install:
  2275  // `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove
  2276  // [name]`
  2277  type OSPolicyResourcePackageResourceAPT struct {
  2278  	// Name: Required. Package name.
  2279  	Name string `json:"name,omitempty"`
  2280  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2281  	// include in API requests. By default, fields with empty or default values are
  2282  	// omitted from API requests. See
  2283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2284  	// details.
  2285  	ForceSendFields []string `json:"-"`
  2286  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2287  	// with the JSON null value. By default, fields with empty values are omitted
  2288  	// from API requests. See
  2289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2290  	NullFields []string `json:"-"`
  2291  }
  2292  
  2293  func (s *OSPolicyResourcePackageResourceAPT) MarshalJSON() ([]byte, error) {
  2294  	type NoMethod OSPolicyResourcePackageResourceAPT
  2295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2296  }
  2297  
  2298  // OSPolicyResourcePackageResourceDeb: A deb package file. dpkg packages only
  2299  // support INSTALLED state.
  2300  type OSPolicyResourcePackageResourceDeb struct {
  2301  	// PullDeps: Whether dependencies should also be installed. - install when
  2302  	// false: `dpkg -i package` - install when true: `apt-get update && apt-get -y
  2303  	// install package.deb`
  2304  	PullDeps bool `json:"pullDeps,omitempty"`
  2305  	// Source: Required. A deb package.
  2306  	Source *OSPolicyResourceFile `json:"source,omitempty"`
  2307  	// ForceSendFields is a list of field names (e.g. "PullDeps") to
  2308  	// unconditionally include in API requests. By default, fields with empty or
  2309  	// default values are omitted from API requests. See
  2310  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2311  	// details.
  2312  	ForceSendFields []string `json:"-"`
  2313  	// NullFields is a list of field names (e.g. "PullDeps") to include in API
  2314  	// requests with the JSON null value. By default, fields with empty values are
  2315  	// omitted from API requests. See
  2316  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2317  	NullFields []string `json:"-"`
  2318  }
  2319  
  2320  func (s *OSPolicyResourcePackageResourceDeb) MarshalJSON() ([]byte, error) {
  2321  	type NoMethod OSPolicyResourcePackageResourceDeb
  2322  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2323  }
  2324  
  2325  // OSPolicyResourcePackageResourceGooGet: A package managed by GooGet. -
  2326  // install: `googet -noconfirm install package` - remove: `googet -noconfirm
  2327  // remove package`
  2328  type OSPolicyResourcePackageResourceGooGet struct {
  2329  	// Name: Required. Package name.
  2330  	Name string `json:"name,omitempty"`
  2331  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2332  	// include in API requests. By default, fields with empty or default values are
  2333  	// omitted from API requests. See
  2334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2335  	// details.
  2336  	ForceSendFields []string `json:"-"`
  2337  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2338  	// with the JSON null value. By default, fields with empty values are omitted
  2339  	// from API requests. See
  2340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2341  	NullFields []string `json:"-"`
  2342  }
  2343  
  2344  func (s *OSPolicyResourcePackageResourceGooGet) MarshalJSON() ([]byte, error) {
  2345  	type NoMethod OSPolicyResourcePackageResourceGooGet
  2346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2347  }
  2348  
  2349  // OSPolicyResourcePackageResourceMSI: An MSI package. MSI packages only
  2350  // support INSTALLED state.
  2351  type OSPolicyResourcePackageResourceMSI struct {
  2352  	// Properties: Additional properties to use during installation. This should be
  2353  	// in the format of Property=Setting. Appended to the defaults of
  2354  	// `ACTION=INSTALL REBOOT=ReallySuppress`.
  2355  	Properties []string `json:"properties,omitempty"`
  2356  	// Source: Required. The MSI package.
  2357  	Source *OSPolicyResourceFile `json:"source,omitempty"`
  2358  	// ForceSendFields is a list of field names (e.g. "Properties") to
  2359  	// unconditionally include in API requests. By default, fields with empty or
  2360  	// default values are omitted from API requests. See
  2361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2362  	// details.
  2363  	ForceSendFields []string `json:"-"`
  2364  	// NullFields is a list of field names (e.g. "Properties") to include in API
  2365  	// requests with the JSON null value. By default, fields with empty values are
  2366  	// omitted from API requests. See
  2367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2368  	NullFields []string `json:"-"`
  2369  }
  2370  
  2371  func (s *OSPolicyResourcePackageResourceMSI) MarshalJSON() ([]byte, error) {
  2372  	type NoMethod OSPolicyResourcePackageResourceMSI
  2373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2374  }
  2375  
  2376  // OSPolicyResourcePackageResourceRPM: An RPM package file. RPM packages only
  2377  // support INSTALLED state.
  2378  type OSPolicyResourcePackageResourceRPM struct {
  2379  	// PullDeps: Whether dependencies should also be installed. - install when
  2380  	// false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum
  2381  	// -y install package.rpm` or `zypper -y install package.rpm`
  2382  	PullDeps bool `json:"pullDeps,omitempty"`
  2383  	// Source: Required. An rpm package.
  2384  	Source *OSPolicyResourceFile `json:"source,omitempty"`
  2385  	// ForceSendFields is a list of field names (e.g. "PullDeps") to
  2386  	// unconditionally include in API requests. By default, fields with empty or
  2387  	// default values are omitted from API requests. See
  2388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2389  	// details.
  2390  	ForceSendFields []string `json:"-"`
  2391  	// NullFields is a list of field names (e.g. "PullDeps") to include in API
  2392  	// requests with the JSON null value. By default, fields with empty values are
  2393  	// omitted from API requests. See
  2394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2395  	NullFields []string `json:"-"`
  2396  }
  2397  
  2398  func (s *OSPolicyResourcePackageResourceRPM) MarshalJSON() ([]byte, error) {
  2399  	type NoMethod OSPolicyResourcePackageResourceRPM
  2400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2401  }
  2402  
  2403  // OSPolicyResourcePackageResourceYUM: A package managed by YUM. - install:
  2404  // `yum -y install package` - remove: `yum -y remove package`
  2405  type OSPolicyResourcePackageResourceYUM struct {
  2406  	// Name: Required. Package name.
  2407  	Name string `json:"name,omitempty"`
  2408  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2409  	// include in API requests. By default, fields with empty or default values are
  2410  	// omitted from API requests. See
  2411  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2412  	// details.
  2413  	ForceSendFields []string `json:"-"`
  2414  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2415  	// with the JSON null value. By default, fields with empty values are omitted
  2416  	// from API requests. See
  2417  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2418  	NullFields []string `json:"-"`
  2419  }
  2420  
  2421  func (s *OSPolicyResourcePackageResourceYUM) MarshalJSON() ([]byte, error) {
  2422  	type NoMethod OSPolicyResourcePackageResourceYUM
  2423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2424  }
  2425  
  2426  // OSPolicyResourcePackageResourceZypper: A package managed by Zypper. -
  2427  // install: `zypper -y install package` - remove: `zypper -y rm package`
  2428  type OSPolicyResourcePackageResourceZypper struct {
  2429  	// Name: Required. Package name.
  2430  	Name string `json:"name,omitempty"`
  2431  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2432  	// include in API requests. By default, fields with empty or default values are
  2433  	// omitted from API requests. See
  2434  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2435  	// details.
  2436  	ForceSendFields []string `json:"-"`
  2437  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2438  	// with the JSON null value. By default, fields with empty values are omitted
  2439  	// from API requests. See
  2440  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2441  	NullFields []string `json:"-"`
  2442  }
  2443  
  2444  func (s *OSPolicyResourcePackageResourceZypper) MarshalJSON() ([]byte, error) {
  2445  	type NoMethod OSPolicyResourcePackageResourceZypper
  2446  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2447  }
  2448  
  2449  // OSPolicyResourceRepositoryResource: A resource that manages a package
  2450  // repository.
  2451  type OSPolicyResourceRepositoryResource struct {
  2452  	// Apt: An Apt Repository.
  2453  	Apt *OSPolicyResourceRepositoryResourceAptRepository `json:"apt,omitempty"`
  2454  	// Goo: A Goo Repository.
  2455  	Goo *OSPolicyResourceRepositoryResourceGooRepository `json:"goo,omitempty"`
  2456  	// Yum: A Yum Repository.
  2457  	Yum *OSPolicyResourceRepositoryResourceYumRepository `json:"yum,omitempty"`
  2458  	// Zypper: A Zypper Repository.
  2459  	Zypper *OSPolicyResourceRepositoryResourceZypperRepository `json:"zypper,omitempty"`
  2460  	// ForceSendFields is a list of field names (e.g. "Apt") to unconditionally
  2461  	// include in API requests. By default, fields with empty or default values are
  2462  	// omitted from API requests. See
  2463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2464  	// details.
  2465  	ForceSendFields []string `json:"-"`
  2466  	// NullFields is a list of field names (e.g. "Apt") to include in API requests
  2467  	// with the JSON null value. By default, fields with empty values are omitted
  2468  	// from API requests. See
  2469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2470  	NullFields []string `json:"-"`
  2471  }
  2472  
  2473  func (s *OSPolicyResourceRepositoryResource) MarshalJSON() ([]byte, error) {
  2474  	type NoMethod OSPolicyResourceRepositoryResource
  2475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2476  }
  2477  
  2478  // OSPolicyResourceRepositoryResourceAptRepository: Represents a single apt
  2479  // package repository. These will be added to a repo file that will be managed
  2480  // at `/etc/apt/sources.list.d/google_osconfig.list`.
  2481  type OSPolicyResourceRepositoryResourceAptRepository struct {
  2482  	// ArchiveType: Required. Type of archive files in this repository.
  2483  	//
  2484  	// Possible values:
  2485  	//   "ARCHIVE_TYPE_UNSPECIFIED" - Unspecified is invalid.
  2486  	//   "DEB" - Deb indicates that the archive contains binary files.
  2487  	//   "DEB_SRC" - Deb-src indicates that the archive contains source files.
  2488  	ArchiveType string `json:"archiveType,omitempty"`
  2489  	// Components: Required. List of components for this repository. Must contain
  2490  	// at least one item.
  2491  	Components []string `json:"components,omitempty"`
  2492  	// Distribution: Required. Distribution of this repository.
  2493  	Distribution string `json:"distribution,omitempty"`
  2494  	// GpgKey: URI of the key file for this repository. The agent maintains a
  2495  	// keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
  2496  	GpgKey string `json:"gpgKey,omitempty"`
  2497  	// Uri: Required. URI for this repository.
  2498  	Uri string `json:"uri,omitempty"`
  2499  	// ForceSendFields is a list of field names (e.g. "ArchiveType") to
  2500  	// unconditionally include in API requests. By default, fields with empty or
  2501  	// default values are omitted from API requests. See
  2502  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2503  	// details.
  2504  	ForceSendFields []string `json:"-"`
  2505  	// NullFields is a list of field names (e.g. "ArchiveType") to include in API
  2506  	// requests with the JSON null value. By default, fields with empty values are
  2507  	// omitted from API requests. See
  2508  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2509  	NullFields []string `json:"-"`
  2510  }
  2511  
  2512  func (s *OSPolicyResourceRepositoryResourceAptRepository) MarshalJSON() ([]byte, error) {
  2513  	type NoMethod OSPolicyResourceRepositoryResourceAptRepository
  2514  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2515  }
  2516  
  2517  // OSPolicyResourceRepositoryResourceGooRepository: Represents a Goo package
  2518  // repository. These are added to a repo file that is managed at
  2519  // `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
  2520  type OSPolicyResourceRepositoryResourceGooRepository struct {
  2521  	// Name: Required. The name of the repository.
  2522  	Name string `json:"name,omitempty"`
  2523  	// Url: Required. The url of the repository.
  2524  	Url string `json:"url,omitempty"`
  2525  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2526  	// include in API requests. By default, fields with empty or default values are
  2527  	// omitted from API requests. See
  2528  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2529  	// details.
  2530  	ForceSendFields []string `json:"-"`
  2531  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2532  	// with the JSON null value. By default, fields with empty values are omitted
  2533  	// from API requests. See
  2534  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2535  	NullFields []string `json:"-"`
  2536  }
  2537  
  2538  func (s *OSPolicyResourceRepositoryResourceGooRepository) MarshalJSON() ([]byte, error) {
  2539  	type NoMethod OSPolicyResourceRepositoryResourceGooRepository
  2540  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2541  }
  2542  
  2543  // OSPolicyResourceRepositoryResourceYumRepository: Represents a single yum
  2544  // package repository. These are added to a repo file that is managed at
  2545  // `/etc/yum.repos.d/google_osconfig.repo`.
  2546  type OSPolicyResourceRepositoryResourceYumRepository struct {
  2547  	// BaseUrl: Required. The location of the repository directory.
  2548  	BaseUrl string `json:"baseUrl,omitempty"`
  2549  	// DisplayName: The display name of the repository.
  2550  	DisplayName string `json:"displayName,omitempty"`
  2551  	// GpgKeys: URIs of GPG keys.
  2552  	GpgKeys []string `json:"gpgKeys,omitempty"`
  2553  	// Id: Required. A one word, unique name for this repository. This is the `repo
  2554  	// id` in the yum config file and also the `display_name` if `display_name` is
  2555  	// omitted. This id is also used as the unique identifier when checking for
  2556  	// resource conflicts.
  2557  	Id string `json:"id,omitempty"`
  2558  	// ForceSendFields is a list of field names (e.g. "BaseUrl") to unconditionally
  2559  	// include in API requests. By default, fields with empty or default values are
  2560  	// omitted from API requests. See
  2561  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2562  	// details.
  2563  	ForceSendFields []string `json:"-"`
  2564  	// NullFields is a list of field names (e.g. "BaseUrl") to include in API
  2565  	// requests with the JSON null value. By default, fields with empty values are
  2566  	// omitted from API requests. See
  2567  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2568  	NullFields []string `json:"-"`
  2569  }
  2570  
  2571  func (s *OSPolicyResourceRepositoryResourceYumRepository) MarshalJSON() ([]byte, error) {
  2572  	type NoMethod OSPolicyResourceRepositoryResourceYumRepository
  2573  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2574  }
  2575  
  2576  // OSPolicyResourceRepositoryResourceZypperRepository: Represents a single
  2577  // zypper package repository. These are added to a repo file that is managed at
  2578  // `/etc/zypp/repos.d/google_osconfig.repo`.
  2579  type OSPolicyResourceRepositoryResourceZypperRepository struct {
  2580  	// BaseUrl: Required. The location of the repository directory.
  2581  	BaseUrl string `json:"baseUrl,omitempty"`
  2582  	// DisplayName: The display name of the repository.
  2583  	DisplayName string `json:"displayName,omitempty"`
  2584  	// GpgKeys: URIs of GPG keys.
  2585  	GpgKeys []string `json:"gpgKeys,omitempty"`
  2586  	// Id: Required. A one word, unique name for this repository. This is the `repo
  2587  	// id` in the zypper config file and also the `display_name` if `display_name`
  2588  	// is omitted. This id is also used as the unique identifier when checking for
  2589  	// GuestPolicy conflicts.
  2590  	Id string `json:"id,omitempty"`
  2591  	// ForceSendFields is a list of field names (e.g. "BaseUrl") to unconditionally
  2592  	// include in API requests. By default, fields with empty or default values are
  2593  	// omitted from API requests. See
  2594  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2595  	// details.
  2596  	ForceSendFields []string `json:"-"`
  2597  	// NullFields is a list of field names (e.g. "BaseUrl") to include in API
  2598  	// requests with the JSON null value. By default, fields with empty values are
  2599  	// omitted from API requests. See
  2600  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2601  	NullFields []string `json:"-"`
  2602  }
  2603  
  2604  func (s *OSPolicyResourceRepositoryResourceZypperRepository) MarshalJSON() ([]byte, error) {
  2605  	type NoMethod OSPolicyResourceRepositoryResourceZypperRepository
  2606  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2607  }
  2608  
  2609  // OneTimeSchedule: Sets the time for a one time patch deployment. Timestamp is
  2610  // in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format.
  2611  type OneTimeSchedule struct {
  2612  	// ExecuteTime: Required. The desired patch job execution time.
  2613  	ExecuteTime string `json:"executeTime,omitempty"`
  2614  	// ForceSendFields is a list of field names (e.g. "ExecuteTime") to
  2615  	// unconditionally include in API requests. By default, fields with empty or
  2616  	// default values are omitted from API requests. See
  2617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2618  	// details.
  2619  	ForceSendFields []string `json:"-"`
  2620  	// NullFields is a list of field names (e.g. "ExecuteTime") to include in API
  2621  	// requests with the JSON null value. By default, fields with empty values are
  2622  	// omitted from API requests. See
  2623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2624  	NullFields []string `json:"-"`
  2625  }
  2626  
  2627  func (s *OneTimeSchedule) MarshalJSON() ([]byte, error) {
  2628  	type NoMethod OneTimeSchedule
  2629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2630  }
  2631  
  2632  // Operation: This resource represents a long-running operation that is the
  2633  // result of a network API call.
  2634  type Operation struct {
  2635  	// Done: If the value is `false`, it means the operation is still in progress.
  2636  	// If `true`, the operation is completed, and either `error` or `response` is
  2637  	// available.
  2638  	Done bool `json:"done,omitempty"`
  2639  	// Error: The error result of the operation in case of failure or cancellation.
  2640  	Error *Status `json:"error,omitempty"`
  2641  	// Metadata: Service-specific metadata associated with the operation. It
  2642  	// typically contains progress information and common metadata such as create
  2643  	// time. Some services might not provide such metadata. Any method that returns
  2644  	// a long-running operation should document the metadata type, if any.
  2645  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2646  	// Name: The server-assigned name, which is only unique within the same service
  2647  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2648  	// should be a resource name ending with `operations/{unique_id}`.
  2649  	Name string `json:"name,omitempty"`
  2650  	// Response: The normal, successful response of the operation. If the original
  2651  	// method returns no data on success, such as `Delete`, the response is
  2652  	// `google.protobuf.Empty`. If the original method is standard
  2653  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2654  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2655  	// original method name. For example, if the original method name is
  2656  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2657  	Response googleapi.RawMessage `json:"response,omitempty"`
  2658  
  2659  	// ServerResponse contains the HTTP response code and headers from the server.
  2660  	googleapi.ServerResponse `json:"-"`
  2661  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2662  	// include in API requests. By default, fields with empty or default values are
  2663  	// omitted from API requests. See
  2664  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2665  	// details.
  2666  	ForceSendFields []string `json:"-"`
  2667  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2668  	// with the JSON null value. By default, fields with empty values are omitted
  2669  	// from API requests. See
  2670  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2671  	NullFields []string `json:"-"`
  2672  }
  2673  
  2674  func (s *Operation) MarshalJSON() ([]byte, error) {
  2675  	type NoMethod Operation
  2676  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2677  }
  2678  
  2679  // PatchConfig: Patch configuration specifications. Contains details on how to
  2680  // apply the patch(es) to a VM instance.
  2681  type PatchConfig struct {
  2682  	// Apt: Apt update settings. Use this setting to override the default `apt`
  2683  	// patch rules.
  2684  	Apt *AptSettings `json:"apt,omitempty"`
  2685  	// Goo: Goo update settings. Use this setting to override the default `goo`
  2686  	// patch rules.
  2687  	Goo *GooSettings `json:"goo,omitempty"`
  2688  	// MigInstancesAllowed: Allows the patch job to run on Managed instance groups
  2689  	// (MIGs).
  2690  	MigInstancesAllowed bool `json:"migInstancesAllowed,omitempty"`
  2691  	// PostStep: The `ExecStep` to run after the patch update.
  2692  	PostStep *ExecStep `json:"postStep,omitempty"`
  2693  	// PreStep: The `ExecStep` to run before the patch update.
  2694  	PreStep *ExecStep `json:"preStep,omitempty"`
  2695  	// RebootConfig: Post-patch reboot settings.
  2696  	//
  2697  	// Possible values:
  2698  	//   "REBOOT_CONFIG_UNSPECIFIED" - The default behavior is DEFAULT.
  2699  	//   "DEFAULT" - The agent decides if a reboot is necessary by checking signals
  2700  	// such as registry keys on Windows or `/var/run/reboot-required` on APT based
  2701  	// systems. On RPM based systems, a set of core system package install times
  2702  	// are compared with system boot time.
  2703  	//   "ALWAYS" - Always reboot the machine after the update completes.
  2704  	//   "NEVER" - Never reboot the machine after the update completes.
  2705  	RebootConfig string `json:"rebootConfig,omitempty"`
  2706  	// WindowsUpdate: Windows update settings. Use this override the default
  2707  	// windows patch rules.
  2708  	WindowsUpdate *WindowsUpdateSettings `json:"windowsUpdate,omitempty"`
  2709  	// Yum: Yum update settings. Use this setting to override the default `yum`
  2710  	// patch rules.
  2711  	Yum *YumSettings `json:"yum,omitempty"`
  2712  	// Zypper: Zypper update settings. Use this setting to override the default
  2713  	// `zypper` patch rules.
  2714  	Zypper *ZypperSettings `json:"zypper,omitempty"`
  2715  	// ForceSendFields is a list of field names (e.g. "Apt") to unconditionally
  2716  	// include in API requests. By default, fields with empty or default values are
  2717  	// omitted from API requests. See
  2718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2719  	// details.
  2720  	ForceSendFields []string `json:"-"`
  2721  	// NullFields is a list of field names (e.g. "Apt") to include in API requests
  2722  	// with the JSON null value. By default, fields with empty values are omitted
  2723  	// from API requests. See
  2724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2725  	NullFields []string `json:"-"`
  2726  }
  2727  
  2728  func (s *PatchConfig) MarshalJSON() ([]byte, error) {
  2729  	type NoMethod PatchConfig
  2730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2731  }
  2732  
  2733  // PatchDeployment: Patch deployments are configurations that individual patch
  2734  // jobs use to complete a patch. These configurations include instance filter,
  2735  // package repository settings, and a schedule. For more information about
  2736  // creating and managing patch deployments, see Scheduling patch jobs
  2737  // (https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs).
  2738  type PatchDeployment struct {
  2739  	// CreateTime: Output only. Time the patch deployment was created. Timestamp is
  2740  	// in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format.
  2741  	CreateTime string `json:"createTime,omitempty"`
  2742  	// Description: Optional. Description of the patch deployment. Length of the
  2743  	// description is limited to 1024 characters.
  2744  	Description string `json:"description,omitempty"`
  2745  	// Duration: Optional. Duration of the patch. After the duration ends, the
  2746  	// patch times out.
  2747  	Duration string `json:"duration,omitempty"`
  2748  	// InstanceFilter: Required. VM instances to patch.
  2749  	InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
  2750  	// LastExecuteTime: Output only. The last time a patch job was started by this
  2751  	// deployment. Timestamp is in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt)
  2752  	// text format.
  2753  	LastExecuteTime string `json:"lastExecuteTime,omitempty"`
  2754  	// Name: Unique name for the patch deployment resource in a project. The patch
  2755  	// deployment name is in the form:
  2756  	// `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field
  2757  	// is ignored when you create a new patch deployment.
  2758  	Name string `json:"name,omitempty"`
  2759  	// OneTimeSchedule: Required. Schedule a one-time execution.
  2760  	OneTimeSchedule *OneTimeSchedule `json:"oneTimeSchedule,omitempty"`
  2761  	// PatchConfig: Optional. Patch configuration that is applied.
  2762  	PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
  2763  	// RecurringSchedule: Required. Schedule recurring executions.
  2764  	RecurringSchedule *RecurringSchedule `json:"recurringSchedule,omitempty"`
  2765  	// Rollout: Optional. Rollout strategy of the patch job.
  2766  	Rollout *PatchRollout `json:"rollout,omitempty"`
  2767  	// State: Output only. Current state of the patch deployment.
  2768  	//
  2769  	// Possible values:
  2770  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
  2771  	// is omitted.
  2772  	//   "ACTIVE" - Active value means that patch deployment generates Patch Jobs.
  2773  	//   "PAUSED" - Paused value means that patch deployment does not generate
  2774  	// Patch jobs. Requires user action to move in and out from this state.
  2775  	State string `json:"state,omitempty"`
  2776  	// UpdateTime: Output only. Time the patch deployment was last updated.
  2777  	// Timestamp is in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format.
  2778  	UpdateTime string `json:"updateTime,omitempty"`
  2779  
  2780  	// ServerResponse contains the HTTP response code and headers from the server.
  2781  	googleapi.ServerResponse `json:"-"`
  2782  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2783  	// unconditionally include in API requests. By default, fields with empty or
  2784  	// default values are omitted from API requests. See
  2785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2786  	// details.
  2787  	ForceSendFields []string `json:"-"`
  2788  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2789  	// requests with the JSON null value. By default, fields with empty values are
  2790  	// omitted from API requests. See
  2791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2792  	NullFields []string `json:"-"`
  2793  }
  2794  
  2795  func (s *PatchDeployment) MarshalJSON() ([]byte, error) {
  2796  	type NoMethod PatchDeployment
  2797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2798  }
  2799  
  2800  // PatchInstanceFilter: A filter to target VM instances for patching. The
  2801  // targeted VMs must meet all criteria specified. So if both labels and zones
  2802  // are specified, the patch job targets only VMs with those labels and in those
  2803  // zones.
  2804  type PatchInstanceFilter struct {
  2805  	// All: Target all VM instances in the project. If true, no other criteria is
  2806  	// permitted.
  2807  	All bool `json:"all,omitempty"`
  2808  	// GroupLabels: Targets VM instances matching ANY of these GroupLabels. This
  2809  	// allows targeting of disparate groups of VM instances.
  2810  	GroupLabels []*PatchInstanceFilterGroupLabel `json:"groupLabels,omitempty"`
  2811  	// InstanceNamePrefixes: Targets VMs whose name starts with one of these
  2812  	// prefixes. Similar to labels, this is another way to group VMs when targeting
  2813  	// configs, for example prefix="prod-".
  2814  	InstanceNamePrefixes []string `json:"instanceNamePrefixes,omitempty"`
  2815  	// Instances: Targets any of the VM instances specified. Instances are
  2816  	// specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
  2817  	// `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
  2818  	// `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/ins
  2819  	// tances/[INSTANCE_NAME]`
  2820  	Instances []string `json:"instances,omitempty"`
  2821  	// Zones: Targets VM instances in ANY of these zones. Leave empty to target VM
  2822  	// instances in any zone.
  2823  	Zones []string `json:"zones,omitempty"`
  2824  	// ForceSendFields is a list of field names (e.g. "All") to unconditionally
  2825  	// include in API requests. By default, fields with empty or default values are
  2826  	// omitted from API requests. See
  2827  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2828  	// details.
  2829  	ForceSendFields []string `json:"-"`
  2830  	// NullFields is a list of field names (e.g. "All") to include in API requests
  2831  	// with the JSON null value. By default, fields with empty values are omitted
  2832  	// from API requests. See
  2833  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2834  	NullFields []string `json:"-"`
  2835  }
  2836  
  2837  func (s *PatchInstanceFilter) MarshalJSON() ([]byte, error) {
  2838  	type NoMethod PatchInstanceFilter
  2839  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2840  }
  2841  
  2842  // PatchInstanceFilterGroupLabel: Targets a group of VM instances by using
  2843  // their assigned labels
  2844  // (https://cloud.google.com/compute/docs/labeling-resources). Labels are
  2845  // key-value pairs. A `GroupLabel` is a combination of labels that is used to
  2846  // target VMs for a patch job. For example, a patch job can target VMs that
  2847  // have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means
  2848  // that the patch job is applied to VMs that have both the labels `env=test`
  2849  // and `app=web`.
  2850  type PatchInstanceFilterGroupLabel struct {
  2851  	// Labels: Compute Engine instance labels that must be present for a VM
  2852  	// instance to be targeted by this filter.
  2853  	Labels map[string]string `json:"labels,omitempty"`
  2854  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  2855  	// include in API requests. By default, fields with empty or default values are
  2856  	// omitted from API requests. See
  2857  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2858  	// details.
  2859  	ForceSendFields []string `json:"-"`
  2860  	// NullFields is a list of field names (e.g. "Labels") to include in API
  2861  	// requests with the JSON null value. By default, fields with empty values are
  2862  	// omitted from API requests. See
  2863  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2864  	NullFields []string `json:"-"`
  2865  }
  2866  
  2867  func (s *PatchInstanceFilterGroupLabel) MarshalJSON() ([]byte, error) {
  2868  	type NoMethod PatchInstanceFilterGroupLabel
  2869  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2870  }
  2871  
  2872  // PatchJob: A high level representation of a patch job that is either in
  2873  // progress or has completed. Instance details are not included in the job. To
  2874  // paginate through instance details, use `ListPatchJobInstanceDetails`. For
  2875  // more information about patch jobs, see Creating patch jobs
  2876  // (https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
  2877  type PatchJob struct {
  2878  	// CreateTime: Time this patch job was created.
  2879  	CreateTime string `json:"createTime,omitempty"`
  2880  	// Description: Description of the patch job. Length of the description is
  2881  	// limited to 1024 characters.
  2882  	Description string `json:"description,omitempty"`
  2883  	// DisplayName: Display name for this patch job. This is not a unique
  2884  	// identifier.
  2885  	DisplayName string `json:"displayName,omitempty"`
  2886  	// DryRun: If this patch job is a dry run, the agent reports that it has
  2887  	// finished without running any updates on the VM instance.
  2888  	DryRun bool `json:"dryRun,omitempty"`
  2889  	// Duration: Duration of the patch job. After the duration ends, the patch job
  2890  	// times out.
  2891  	Duration string `json:"duration,omitempty"`
  2892  	// ErrorMessage: If this patch job failed, this message provides information
  2893  	// about the failure.
  2894  	ErrorMessage string `json:"errorMessage,omitempty"`
  2895  	// InstanceDetailsSummary: Summary of instance details.
  2896  	InstanceDetailsSummary *PatchJobInstanceDetailsSummary `json:"instanceDetailsSummary,omitempty"`
  2897  	// InstanceFilter: Instances to patch.
  2898  	InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
  2899  	// Name: Unique identifier for this patch job in the form
  2900  	// `projects/*/patchJobs/*`
  2901  	Name string `json:"name,omitempty"`
  2902  	// PatchConfig: Patch configuration being applied.
  2903  	PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
  2904  	// PatchDeployment: Output only. Name of the patch deployment that created this
  2905  	// patch job.
  2906  	PatchDeployment string `json:"patchDeployment,omitempty"`
  2907  	// PercentComplete: Reflects the overall progress of the patch job in the range
  2908  	// of 0.0 being no progress to 100.0 being complete.
  2909  	PercentComplete float64 `json:"percentComplete,omitempty"`
  2910  	// Rollout: Rollout strategy being applied.
  2911  	Rollout *PatchRollout `json:"rollout,omitempty"`
  2912  	// State: The current state of the PatchJob.
  2913  	//
  2914  	// Possible values:
  2915  	//   "STATE_UNSPECIFIED" - State must be specified.
  2916  	//   "STARTED" - The patch job was successfully initiated.
  2917  	//   "INSTANCE_LOOKUP" - The patch job is looking up instances to run the patch
  2918  	// on.
  2919  	//   "PATCHING" - Instances are being patched.
  2920  	//   "SUCCEEDED" - Patch job completed successfully.
  2921  	//   "COMPLETED_WITH_ERRORS" - Patch job completed but there were errors.
  2922  	//   "CANCELED" - The patch job was canceled.
  2923  	//   "TIMED_OUT" - The patch job timed out.
  2924  	State string `json:"state,omitempty"`
  2925  	// UpdateTime: Last time this patch job was updated.
  2926  	UpdateTime string `json:"updateTime,omitempty"`
  2927  
  2928  	// ServerResponse contains the HTTP response code and headers from the server.
  2929  	googleapi.ServerResponse `json:"-"`
  2930  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2931  	// unconditionally include in API requests. By default, fields with empty or
  2932  	// default values are omitted from API requests. See
  2933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2934  	// details.
  2935  	ForceSendFields []string `json:"-"`
  2936  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2937  	// requests with the JSON null value. By default, fields with empty values are
  2938  	// omitted from API requests. See
  2939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2940  	NullFields []string `json:"-"`
  2941  }
  2942  
  2943  func (s *PatchJob) MarshalJSON() ([]byte, error) {
  2944  	type NoMethod PatchJob
  2945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2946  }
  2947  
  2948  func (s *PatchJob) UnmarshalJSON(data []byte) error {
  2949  	type NoMethod PatchJob
  2950  	var s1 struct {
  2951  		PercentComplete gensupport.JSONFloat64 `json:"percentComplete"`
  2952  		*NoMethod
  2953  	}
  2954  	s1.NoMethod = (*NoMethod)(s)
  2955  	if err := json.Unmarshal(data, &s1); err != nil {
  2956  		return err
  2957  	}
  2958  	s.PercentComplete = float64(s1.PercentComplete)
  2959  	return nil
  2960  }
  2961  
  2962  // PatchJobInstanceDetails: Patch details for a VM instance. For more
  2963  // information about reviewing VM instance details, see Listing all VM instance
  2964  // details for a specific patch job
  2965  // (https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).
  2966  type PatchJobInstanceDetails struct {
  2967  	// AttemptCount: The number of times the agent that the agent attempts to apply
  2968  	// the patch.
  2969  	AttemptCount int64 `json:"attemptCount,omitempty,string"`
  2970  	// FailureReason: If the patch fails, this field provides the reason.
  2971  	FailureReason string `json:"failureReason,omitempty"`
  2972  	// InstanceSystemId: The unique identifier for the instance. This identifier is
  2973  	// defined by the server.
  2974  	InstanceSystemId string `json:"instanceSystemId,omitempty"`
  2975  	// Name: The instance name in the form `projects/*/zones/*/instances/*`
  2976  	Name string `json:"name,omitempty"`
  2977  	// State: Current state of instance patch.
  2978  	//
  2979  	// Possible values:
  2980  	//   "PATCH_STATE_UNSPECIFIED" - Unspecified.
  2981  	//   "PENDING" - The instance is not yet notified.
  2982  	//   "INACTIVE" - Instance is inactive and cannot be patched.
  2983  	//   "NOTIFIED" - The instance is notified that it should be patched.
  2984  	//   "STARTED" - The instance has started the patching process.
  2985  	//   "DOWNLOADING_PATCHES" - The instance is downloading patches.
  2986  	//   "APPLYING_PATCHES" - The instance is applying patches.
  2987  	//   "REBOOTING" - The instance is rebooting.
  2988  	//   "SUCCEEDED" - The instance has completed applying patches.
  2989  	//   "SUCCEEDED_REBOOT_REQUIRED" - The instance has completed applying patches
  2990  	// but a reboot is required.
  2991  	//   "FAILED" - The instance has failed to apply the patch.
  2992  	//   "ACKED" - The instance acked the notification and will start shortly.
  2993  	//   "TIMED_OUT" - The instance exceeded the time out while applying the patch.
  2994  	//   "RUNNING_PRE_PATCH_STEP" - The instance is running the pre-patch step.
  2995  	//   "RUNNING_POST_PATCH_STEP" - The instance is running the post-patch step.
  2996  	//   "NO_AGENT_DETECTED" - The service could not detect the presence of the
  2997  	// agent. Check to ensure that the agent is installed, running, and able to
  2998  	// communicate with the service.
  2999  	State string `json:"state,omitempty"`
  3000  	// ForceSendFields is a list of field names (e.g. "AttemptCount") to
  3001  	// unconditionally include in API requests. By default, fields with empty or
  3002  	// default values are omitted from API requests. See
  3003  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3004  	// details.
  3005  	ForceSendFields []string `json:"-"`
  3006  	// NullFields is a list of field names (e.g. "AttemptCount") to include in API
  3007  	// requests with the JSON null value. By default, fields with empty values are
  3008  	// omitted from API requests. See
  3009  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3010  	NullFields []string `json:"-"`
  3011  }
  3012  
  3013  func (s *PatchJobInstanceDetails) MarshalJSON() ([]byte, error) {
  3014  	type NoMethod PatchJobInstanceDetails
  3015  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3016  }
  3017  
  3018  // PatchJobInstanceDetailsSummary: A summary of the current patch state across
  3019  // all instances that this patch job affects. Contains counts of instances in
  3020  // different states. These states map to `InstancePatchState`. List patch job
  3021  // instance details to see the specific states of each instance.
  3022  type PatchJobInstanceDetailsSummary struct {
  3023  	// AckedInstanceCount: Number of instances that have acked and will start
  3024  	// shortly.
  3025  	AckedInstanceCount int64 `json:"ackedInstanceCount,omitempty,string"`
  3026  	// ApplyingPatchesInstanceCount: Number of instances that are applying patches.
  3027  	ApplyingPatchesInstanceCount int64 `json:"applyingPatchesInstanceCount,omitempty,string"`
  3028  	// DownloadingPatchesInstanceCount: Number of instances that are downloading
  3029  	// patches.
  3030  	DownloadingPatchesInstanceCount int64 `json:"downloadingPatchesInstanceCount,omitempty,string"`
  3031  	// FailedInstanceCount: Number of instances that failed.
  3032  	FailedInstanceCount int64 `json:"failedInstanceCount,omitempty,string"`
  3033  	// InactiveInstanceCount: Number of instances that are inactive.
  3034  	InactiveInstanceCount int64 `json:"inactiveInstanceCount,omitempty,string"`
  3035  	// NoAgentDetectedInstanceCount: Number of instances that do not appear to be
  3036  	// running the agent. Check to ensure that the agent is installed, running, and
  3037  	// able to communicate with the service.
  3038  	NoAgentDetectedInstanceCount int64 `json:"noAgentDetectedInstanceCount,omitempty,string"`
  3039  	// NotifiedInstanceCount: Number of instances notified about patch job.
  3040  	NotifiedInstanceCount int64 `json:"notifiedInstanceCount,omitempty,string"`
  3041  	// PendingInstanceCount: Number of instances pending patch job.
  3042  	PendingInstanceCount int64 `json:"pendingInstanceCount,omitempty,string"`
  3043  	// PostPatchStepInstanceCount: Number of instances that are running the
  3044  	// post-patch step.
  3045  	PostPatchStepInstanceCount int64 `json:"postPatchStepInstanceCount,omitempty,string"`
  3046  	// PrePatchStepInstanceCount: Number of instances that are running the
  3047  	// pre-patch step.
  3048  	PrePatchStepInstanceCount int64 `json:"prePatchStepInstanceCount,omitempty,string"`
  3049  	// RebootingInstanceCount: Number of instances rebooting.
  3050  	RebootingInstanceCount int64 `json:"rebootingInstanceCount,omitempty,string"`
  3051  	// StartedInstanceCount: Number of instances that have started.
  3052  	StartedInstanceCount int64 `json:"startedInstanceCount,omitempty,string"`
  3053  	// SucceededInstanceCount: Number of instances that have completed
  3054  	// successfully.
  3055  	SucceededInstanceCount int64 `json:"succeededInstanceCount,omitempty,string"`
  3056  	// SucceededRebootRequiredInstanceCount: Number of instances that require
  3057  	// reboot.
  3058  	SucceededRebootRequiredInstanceCount int64 `json:"succeededRebootRequiredInstanceCount,omitempty,string"`
  3059  	// TimedOutInstanceCount: Number of instances that exceeded the time out while
  3060  	// applying the patch.
  3061  	TimedOutInstanceCount int64 `json:"timedOutInstanceCount,omitempty,string"`
  3062  	// ForceSendFields is a list of field names (e.g. "AckedInstanceCount") to
  3063  	// unconditionally include in API requests. By default, fields with empty or
  3064  	// default values are omitted from API requests. See
  3065  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3066  	// details.
  3067  	ForceSendFields []string `json:"-"`
  3068  	// NullFields is a list of field names (e.g. "AckedInstanceCount") to include
  3069  	// in API requests with the JSON null value. By default, fields with empty
  3070  	// values are omitted from API requests. See
  3071  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3072  	NullFields []string `json:"-"`
  3073  }
  3074  
  3075  func (s *PatchJobInstanceDetailsSummary) MarshalJSON() ([]byte, error) {
  3076  	type NoMethod PatchJobInstanceDetailsSummary
  3077  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3078  }
  3079  
  3080  // PatchRollout: Patch rollout configuration specifications. Contains details
  3081  // on the concurrency control when applying patch(es) to all targeted VMs.
  3082  type PatchRollout struct {
  3083  	// DisruptionBudget: The maximum number (or percentage) of VMs per zone to
  3084  	// disrupt at any given moment. The number of VMs calculated from multiplying
  3085  	// the percentage by the total number of VMs in a zone is rounded up. During
  3086  	// patching, a VM is considered disrupted from the time the agent is notified
  3087  	// to begin until patching has completed. This disruption time includes the
  3088  	// time to complete reboot and any post-patch steps. A VM contributes to the
  3089  	// disruption budget if its patching operation fails either when applying the
  3090  	// patches, running pre or post patch steps, or if it fails to respond with a
  3091  	// success notification before timing out. VMs that are not running or do not
  3092  	// have an active agent do not count toward this disruption budget. For
  3093  	// zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the
  3094  	// patch job stops, because continuing to the next zone requires completion of
  3095  	// the patch process in the previous zone. For example, if the disruption
  3096  	// budget has a fixed value of `10`, and 8 VMs fail to patch in the current
  3097  	// zone, the patch job continues to patch 2 VMs at a time until the zone is
  3098  	// completed. When that zone is completed successfully, patching begins with 10
  3099  	// VMs at a time in the next zone. If 10 VMs in the next zone fail to patch,
  3100  	// the patch job stops.
  3101  	DisruptionBudget *FixedOrPercent `json:"disruptionBudget,omitempty"`
  3102  	// Mode: Mode of the patch rollout.
  3103  	//
  3104  	// Possible values:
  3105  	//   "MODE_UNSPECIFIED" - Mode must be specified.
  3106  	//   "ZONE_BY_ZONE" - Patches are applied one zone at a time. The patch job
  3107  	// begins in the region with the lowest number of targeted VMs. Within the
  3108  	// region, patching begins in the zone with the lowest number of targeted VMs.
  3109  	// If multiple regions (or zones within a region) have the same number of
  3110  	// targeted VMs, a tie-breaker is achieved by sorting the regions or zones in
  3111  	// alphabetical order.
  3112  	//   "CONCURRENT_ZONES" - Patches are applied to VMs in all zones at the same
  3113  	// time.
  3114  	Mode string `json:"mode,omitempty"`
  3115  	// ForceSendFields is a list of field names (e.g. "DisruptionBudget") to
  3116  	// unconditionally include in API requests. By default, fields with empty or
  3117  	// default values are omitted from API requests. See
  3118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3119  	// details.
  3120  	ForceSendFields []string `json:"-"`
  3121  	// NullFields is a list of field names (e.g. "DisruptionBudget") to include in
  3122  	// API requests with the JSON null value. By default, fields with empty values
  3123  	// are omitted from API requests. See
  3124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3125  	NullFields []string `json:"-"`
  3126  }
  3127  
  3128  func (s *PatchRollout) MarshalJSON() ([]byte, error) {
  3129  	type NoMethod PatchRollout
  3130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3131  }
  3132  
  3133  // PausePatchDeploymentRequest: A request message for pausing a patch
  3134  // deployment.
  3135  type PausePatchDeploymentRequest struct {
  3136  }
  3137  
  3138  // ProjectFeatureSettings: ProjectFeatureSettings represents the VM Manager
  3139  // feature settings in a project. For more information, see Enable full VM
  3140  // Manager functionality.
  3141  type ProjectFeatureSettings struct {
  3142  	// Name: Required. Immutable. Name specifies the URL for the
  3143  	// ProjectFeatureSettings resource:
  3144  	// projects/project_id/locations/global/projectFeatureSettings.
  3145  	Name string `json:"name,omitempty"`
  3146  	// PatchAndConfigFeatureSet: Set PatchAndConfigFeatureSet for the project.
  3147  	//
  3148  	// Possible values:
  3149  	//   "PATCH_AND_CONFIG_FEATURE_SET_UNSPECIFIED" - Not specified placeholder
  3150  	//   "OSCONFIG_B" - Enables only the basic set of VM Manager features in the
  3151  	// project.
  3152  	//   "OSCONFIG_C" - Enables all VM Manager features in the project.
  3153  	PatchAndConfigFeatureSet string `json:"patchAndConfigFeatureSet,omitempty"`
  3154  
  3155  	// ServerResponse contains the HTTP response code and headers from the server.
  3156  	googleapi.ServerResponse `json:"-"`
  3157  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  3158  	// include in API requests. By default, fields with empty or default values are
  3159  	// omitted from API requests. See
  3160  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3161  	// details.
  3162  	ForceSendFields []string `json:"-"`
  3163  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  3164  	// with the JSON null value. By default, fields with empty values are omitted
  3165  	// from API requests. See
  3166  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3167  	NullFields []string `json:"-"`
  3168  }
  3169  
  3170  func (s *ProjectFeatureSettings) MarshalJSON() ([]byte, error) {
  3171  	type NoMethod ProjectFeatureSettings
  3172  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3173  }
  3174  
  3175  // RecurringSchedule: Sets the time for recurring patch deployments.
  3176  type RecurringSchedule struct {
  3177  	// EndTime: Optional. The end time at which a recurring patch deployment
  3178  	// schedule is no longer active.
  3179  	EndTime string `json:"endTime,omitempty"`
  3180  	// Frequency: Required. The frequency unit of this recurring schedule.
  3181  	//
  3182  	// Possible values:
  3183  	//   "FREQUENCY_UNSPECIFIED" - Invalid. A frequency must be specified.
  3184  	//   "WEEKLY" - Indicates that the frequency of recurrence should be expressed
  3185  	// in terms of weeks.
  3186  	//   "MONTHLY" - Indicates that the frequency of recurrence should be expressed
  3187  	// in terms of months.
  3188  	//   "DAILY" - Indicates that the frequency of recurrence should be expressed
  3189  	// in terms of days.
  3190  	Frequency string `json:"frequency,omitempty"`
  3191  	// LastExecuteTime: Output only. The time the last patch job ran successfully.
  3192  	LastExecuteTime string `json:"lastExecuteTime,omitempty"`
  3193  	// Monthly: Required. Schedule with monthly executions.
  3194  	Monthly *MonthlySchedule `json:"monthly,omitempty"`
  3195  	// NextExecuteTime: Output only. The time the next patch job is scheduled to
  3196  	// run.
  3197  	NextExecuteTime string `json:"nextExecuteTime,omitempty"`
  3198  	// StartTime: Optional. The time that the recurring schedule becomes effective.
  3199  	// Defaults to `create_time` of the patch deployment.
  3200  	StartTime string `json:"startTime,omitempty"`
  3201  	// TimeOfDay: Required. Time of the day to run a recurring deployment.
  3202  	TimeOfDay *TimeOfDay `json:"timeOfDay,omitempty"`
  3203  	// TimeZone: Required. Defines the time zone that `time_of_day` is relative to.
  3204  	// The rules for daylight saving time are determined by the chosen time zone.
  3205  	TimeZone *TimeZone `json:"timeZone,omitempty"`
  3206  	// Weekly: Required. Schedule with weekly executions.
  3207  	Weekly *WeeklySchedule `json:"weekly,omitempty"`
  3208  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  3209  	// include in API requests. By default, fields with empty or default values are
  3210  	// omitted from API requests. See
  3211  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3212  	// details.
  3213  	ForceSendFields []string `json:"-"`
  3214  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  3215  	// requests with the JSON null value. By default, fields with empty values are
  3216  	// omitted from API requests. See
  3217  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3218  	NullFields []string `json:"-"`
  3219  }
  3220  
  3221  func (s *RecurringSchedule) MarshalJSON() ([]byte, error) {
  3222  	type NoMethod RecurringSchedule
  3223  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3224  }
  3225  
  3226  // ResumePatchDeploymentRequest: A request message for resuming a patch
  3227  // deployment.
  3228  type ResumePatchDeploymentRequest struct {
  3229  }
  3230  
  3231  // Status: The `Status` type defines a logical error model that is suitable for
  3232  // different programming environments, including REST APIs and RPC APIs. It is
  3233  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  3234  // pieces of data: error code, error message, and error details. You can find
  3235  // out more about this error model and how to work with it in the API Design
  3236  // Guide (https://cloud.google.com/apis/design/errors).
  3237  type Status struct {
  3238  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3239  	Code int64 `json:"code,omitempty"`
  3240  	// Details: A list of messages that carry the error details. There is a common
  3241  	// set of message types for APIs to use.
  3242  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3243  	// Message: A developer-facing error message, which should be in English. Any
  3244  	// user-facing error message should be localized and sent in the
  3245  	// google.rpc.Status.details field, or localized by the client.
  3246  	Message string `json:"message,omitempty"`
  3247  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3248  	// include in API requests. By default, fields with empty or default values are
  3249  	// omitted from API requests. See
  3250  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3251  	// details.
  3252  	ForceSendFields []string `json:"-"`
  3253  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3254  	// with the JSON null value. By default, fields with empty values are omitted
  3255  	// from API requests. See
  3256  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3257  	NullFields []string `json:"-"`
  3258  }
  3259  
  3260  func (s *Status) MarshalJSON() ([]byte, error) {
  3261  	type NoMethod Status
  3262  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3263  }
  3264  
  3265  // TimeOfDay: Represents a time of day. The date and time zone are either not
  3266  // significant or are specified elsewhere. An API may choose to allow leap
  3267  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  3268  type TimeOfDay struct {
  3269  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  3270  	// choose to allow the value "24:00:00" for scenarios like business closing
  3271  	// time.
  3272  	Hours int64 `json:"hours,omitempty"`
  3273  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  3274  	Minutes int64 `json:"minutes,omitempty"`
  3275  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  3276  	Nanos int64 `json:"nanos,omitempty"`
  3277  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  3278  	// API may allow the value 60 if it allows leap-seconds.
  3279  	Seconds int64 `json:"seconds,omitempty"`
  3280  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  3281  	// include in API requests. By default, fields with empty or default values are
  3282  	// omitted from API requests. See
  3283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3284  	// details.
  3285  	ForceSendFields []string `json:"-"`
  3286  	// NullFields is a list of field names (e.g. "Hours") to include in API
  3287  	// requests with the JSON null value. By default, fields with empty values are
  3288  	// omitted from API requests. See
  3289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3290  	NullFields []string `json:"-"`
  3291  }
  3292  
  3293  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  3294  	type NoMethod TimeOfDay
  3295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3296  }
  3297  
  3298  // TimeZone: Represents a time zone from the IANA Time Zone Database
  3299  // (https://www.iana.org/time-zones).
  3300  type TimeZone struct {
  3301  	// Id: IANA Time Zone Database time zone, e.g. "America/New_York".
  3302  	Id string `json:"id,omitempty"`
  3303  	// Version: Optional. IANA Time Zone Database version number, e.g. "2019a".
  3304  	Version string `json:"version,omitempty"`
  3305  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3306  	// include in API requests. By default, fields with empty or default values are
  3307  	// omitted from API requests. See
  3308  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3309  	// details.
  3310  	ForceSendFields []string `json:"-"`
  3311  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3312  	// with the JSON null value. By default, fields with empty values are omitted
  3313  	// from API requests. See
  3314  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3315  	NullFields []string `json:"-"`
  3316  }
  3317  
  3318  func (s *TimeZone) MarshalJSON() ([]byte, error) {
  3319  	type NoMethod TimeZone
  3320  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3321  }
  3322  
  3323  // VulnerabilityReport: This API resource represents the vulnerability report
  3324  // for a specified Compute Engine virtual machine (VM) instance at a given
  3325  // point in time. For more information, see Vulnerability reports
  3326  // (https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).
  3327  type VulnerabilityReport struct {
  3328  	// Name: Output only. The `vulnerabilityReport` API resource name. Format:
  3329  	// `projects/{project_number}/locations/{location}/instances/{instance_id}/vulne
  3330  	// rabilityReport`
  3331  	Name string `json:"name,omitempty"`
  3332  	// UpdateTime: Output only. The timestamp for when the last vulnerability
  3333  	// report was generated for the VM.
  3334  	UpdateTime string `json:"updateTime,omitempty"`
  3335  	// Vulnerabilities: Output only. List of vulnerabilities affecting the VM.
  3336  	Vulnerabilities []*VulnerabilityReportVulnerability `json:"vulnerabilities,omitempty"`
  3337  
  3338  	// ServerResponse contains the HTTP response code and headers from the server.
  3339  	googleapi.ServerResponse `json:"-"`
  3340  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  3341  	// include in API requests. By default, fields with empty or default values are
  3342  	// omitted from API requests. See
  3343  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3344  	// details.
  3345  	ForceSendFields []string `json:"-"`
  3346  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  3347  	// with the JSON null value. By default, fields with empty values are omitted
  3348  	// from API requests. See
  3349  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3350  	NullFields []string `json:"-"`
  3351  }
  3352  
  3353  func (s *VulnerabilityReport) MarshalJSON() ([]byte, error) {
  3354  	type NoMethod VulnerabilityReport
  3355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3356  }
  3357  
  3358  // VulnerabilityReportVulnerability: A vulnerability affecting the VM instance.
  3359  type VulnerabilityReportVulnerability struct {
  3360  	// AvailableInventoryItemIds: Corresponds to the `AVAILABLE_PACKAGE` inventory
  3361  	// item on the VM. If the vulnerability report was not updated after the VM
  3362  	// inventory update, these values might not display in VM inventory. If there
  3363  	// is no available fix, the field is empty. The `inventory_item` value
  3364  	// specifies the latest `SoftwarePackage` available to the VM that fixes the
  3365  	// vulnerability.
  3366  	AvailableInventoryItemIds []string `json:"availableInventoryItemIds,omitempty"`
  3367  	// CreateTime: The timestamp for when the vulnerability was first detected.
  3368  	CreateTime string `json:"createTime,omitempty"`
  3369  	// Details: Contains metadata as per the upstream feed of the operating system
  3370  	// and NVD.
  3371  	Details *VulnerabilityReportVulnerabilityDetails `json:"details,omitempty"`
  3372  	// InstalledInventoryItemIds: Corresponds to the `INSTALLED_PACKAGE` inventory
  3373  	// item on the VM. This field displays the inventory items affected by this
  3374  	// vulnerability. If the vulnerability report was not updated after the VM
  3375  	// inventory update, these values might not display in VM inventory. For some
  3376  	// distros, this field may be empty.
  3377  	InstalledInventoryItemIds []string `json:"installedInventoryItemIds,omitempty"`
  3378  	// Items: List of items affected by the vulnerability.
  3379  	Items []*VulnerabilityReportVulnerabilityItem `json:"items,omitempty"`
  3380  	// UpdateTime: The timestamp for when the vulnerability was last modified.
  3381  	UpdateTime string `json:"updateTime,omitempty"`
  3382  	// ForceSendFields is a list of field names (e.g. "AvailableInventoryItemIds")
  3383  	// to unconditionally include in API requests. By default, fields with empty or
  3384  	// default values are omitted from API requests. See
  3385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3386  	// details.
  3387  	ForceSendFields []string `json:"-"`
  3388  	// NullFields is a list of field names (e.g. "AvailableInventoryItemIds") to
  3389  	// include in API requests with the JSON null value. By default, fields with
  3390  	// empty values are omitted from API requests. See
  3391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3392  	NullFields []string `json:"-"`
  3393  }
  3394  
  3395  func (s *VulnerabilityReportVulnerability) MarshalJSON() ([]byte, error) {
  3396  	type NoMethod VulnerabilityReportVulnerability
  3397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3398  }
  3399  
  3400  // VulnerabilityReportVulnerabilityDetails: Contains metadata information for
  3401  // the vulnerability. This information is collected from the upstream feed of
  3402  // the operating system.
  3403  type VulnerabilityReportVulnerabilityDetails struct {
  3404  	// Cve: The CVE of the vulnerability. CVE cannot be empty and the combination
  3405  	// of should be unique across vulnerabilities for a VM.
  3406  	Cve string `json:"cve,omitempty"`
  3407  	// CvssV2Score: The CVSS V2 score of this vulnerability. CVSS V2 score is on a
  3408  	// scale of 0 - 10 where 0 indicates low severity and 10 indicates high
  3409  	// severity.
  3410  	CvssV2Score float64 `json:"cvssV2Score,omitempty"`
  3411  	// CvssV3: The full description of the CVSSv3 for this vulnerability from NVD.
  3412  	CvssV3 *CVSSv3 `json:"cvssV3,omitempty"`
  3413  	// Description: The note or description describing the vulnerability from the
  3414  	// distro.
  3415  	Description string `json:"description,omitempty"`
  3416  	// References: Corresponds to the references attached to the
  3417  	// `VulnerabilityDetails`.
  3418  	References []*VulnerabilityReportVulnerabilityDetailsReference `json:"references,omitempty"`
  3419  	// Severity: Assigned severity/impact ranking from the distro.
  3420  	Severity string `json:"severity,omitempty"`
  3421  	// ForceSendFields is a list of field names (e.g. "Cve") to unconditionally
  3422  	// include in API requests. By default, fields with empty or default values are
  3423  	// omitted from API requests. See
  3424  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3425  	// details.
  3426  	ForceSendFields []string `json:"-"`
  3427  	// NullFields is a list of field names (e.g. "Cve") to include in API requests
  3428  	// with the JSON null value. By default, fields with empty values are omitted
  3429  	// from API requests. See
  3430  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3431  	NullFields []string `json:"-"`
  3432  }
  3433  
  3434  func (s *VulnerabilityReportVulnerabilityDetails) MarshalJSON() ([]byte, error) {
  3435  	type NoMethod VulnerabilityReportVulnerabilityDetails
  3436  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3437  }
  3438  
  3439  func (s *VulnerabilityReportVulnerabilityDetails) UnmarshalJSON(data []byte) error {
  3440  	type NoMethod VulnerabilityReportVulnerabilityDetails
  3441  	var s1 struct {
  3442  		CvssV2Score gensupport.JSONFloat64 `json:"cvssV2Score"`
  3443  		*NoMethod
  3444  	}
  3445  	s1.NoMethod = (*NoMethod)(s)
  3446  	if err := json.Unmarshal(data, &s1); err != nil {
  3447  		return err
  3448  	}
  3449  	s.CvssV2Score = float64(s1.CvssV2Score)
  3450  	return nil
  3451  }
  3452  
  3453  // VulnerabilityReportVulnerabilityDetailsReference: A reference for this
  3454  // vulnerability.
  3455  type VulnerabilityReportVulnerabilityDetailsReference struct {
  3456  	// Source: The source of the reference e.g. NVD.
  3457  	Source string `json:"source,omitempty"`
  3458  	// Url: The url of the reference.
  3459  	Url string `json:"url,omitempty"`
  3460  	// ForceSendFields is a list of field names (e.g. "Source") to unconditionally
  3461  	// include in API requests. By default, fields with empty or default values are
  3462  	// omitted from API requests. See
  3463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3464  	// details.
  3465  	ForceSendFields []string `json:"-"`
  3466  	// NullFields is a list of field names (e.g. "Source") to include in API
  3467  	// requests with the JSON null value. By default, fields with empty values are
  3468  	// omitted from API requests. See
  3469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3470  	NullFields []string `json:"-"`
  3471  }
  3472  
  3473  func (s *VulnerabilityReportVulnerabilityDetailsReference) MarshalJSON() ([]byte, error) {
  3474  	type NoMethod VulnerabilityReportVulnerabilityDetailsReference
  3475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3476  }
  3477  
  3478  // VulnerabilityReportVulnerabilityItem: OS inventory item that is affected by
  3479  // a vulnerability or fixed as a result of a vulnerability.
  3480  type VulnerabilityReportVulnerabilityItem struct {
  3481  	// AvailableInventoryItemId: Corresponds to the `AVAILABLE_PACKAGE` inventory
  3482  	// item on the VM. If the vulnerability report was not updated after the VM
  3483  	// inventory update, these values might not display in VM inventory. If there
  3484  	// is no available fix, the field is empty. The `inventory_item` value
  3485  	// specifies the latest `SoftwarePackage` available to the VM that fixes the
  3486  	// vulnerability.
  3487  	AvailableInventoryItemId string `json:"availableInventoryItemId,omitempty"`
  3488  	// FixedCpeUri: The recommended CPE URI (https://cpe.mitre.org/specification/)
  3489  	// update that contains a fix for this vulnerability.
  3490  	FixedCpeUri string `json:"fixedCpeUri,omitempty"`
  3491  	// InstalledInventoryItemId: Corresponds to the `INSTALLED_PACKAGE` inventory
  3492  	// item on the VM. This field displays the inventory items affected by this
  3493  	// vulnerability. If the vulnerability report was not updated after the VM
  3494  	// inventory update, these values might not display in VM inventory. For some
  3495  	// operating systems, this field might be empty.
  3496  	InstalledInventoryItemId string `json:"installedInventoryItemId,omitempty"`
  3497  	// UpstreamFix: The upstream OS patch, packages or KB that fixes the
  3498  	// vulnerability.
  3499  	UpstreamFix string `json:"upstreamFix,omitempty"`
  3500  	// ForceSendFields is a list of field names (e.g. "AvailableInventoryItemId")
  3501  	// to unconditionally include in API requests. By default, fields with empty or
  3502  	// default values are omitted from API requests. See
  3503  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3504  	// details.
  3505  	ForceSendFields []string `json:"-"`
  3506  	// NullFields is a list of field names (e.g. "AvailableInventoryItemId") to
  3507  	// include in API requests with the JSON null value. By default, fields with
  3508  	// empty values are omitted from API requests. See
  3509  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3510  	NullFields []string `json:"-"`
  3511  }
  3512  
  3513  func (s *VulnerabilityReportVulnerabilityItem) MarshalJSON() ([]byte, error) {
  3514  	type NoMethod VulnerabilityReportVulnerabilityItem
  3515  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3516  }
  3517  
  3518  // WeekDayOfMonth: Represents one week day in a month. An example is "the 4th
  3519  // Sunday".
  3520  type WeekDayOfMonth struct {
  3521  	// DayOfWeek: Required. A day of the week.
  3522  	//
  3523  	// Possible values:
  3524  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  3525  	//   "MONDAY" - Monday
  3526  	//   "TUESDAY" - Tuesday
  3527  	//   "WEDNESDAY" - Wednesday
  3528  	//   "THURSDAY" - Thursday
  3529  	//   "FRIDAY" - Friday
  3530  	//   "SATURDAY" - Saturday
  3531  	//   "SUNDAY" - Sunday
  3532  	DayOfWeek string `json:"dayOfWeek,omitempty"`
  3533  	// DayOffset: Optional. Represents the number of days before or after the given
  3534  	// week day of month that the patch deployment is scheduled for. For example if
  3535  	// `week_ordinal` and `day_of_week` values point to the second Tuesday of the
  3536  	// month and the `day_offset` value is set to `3`, patch deployment takes place
  3537  	// three days after the second Tuesday of the month. If this value is negative,
  3538  	// for example -5, patches are deployed five days before the second Tuesday of
  3539  	// the month. Allowed values are in range [-30, 30].
  3540  	DayOffset int64 `json:"dayOffset,omitempty"`
  3541  	// WeekOrdinal: Required. Week number in a month. 1-4 indicates the 1st to 4th
  3542  	// week of the month. -1 indicates the last week of the month.
  3543  	WeekOrdinal int64 `json:"weekOrdinal,omitempty"`
  3544  	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
  3545  	// unconditionally include in API requests. By default, fields with empty or
  3546  	// default values are omitted from API requests. See
  3547  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3548  	// details.
  3549  	ForceSendFields []string `json:"-"`
  3550  	// NullFields is a list of field names (e.g. "DayOfWeek") to include in API
  3551  	// requests with the JSON null value. By default, fields with empty values are
  3552  	// omitted from API requests. See
  3553  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3554  	NullFields []string `json:"-"`
  3555  }
  3556  
  3557  func (s *WeekDayOfMonth) MarshalJSON() ([]byte, error) {
  3558  	type NoMethod WeekDayOfMonth
  3559  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3560  }
  3561  
  3562  // WeeklySchedule: Represents a weekly schedule.
  3563  type WeeklySchedule struct {
  3564  	// DayOfWeek: Required. Day of the week.
  3565  	//
  3566  	// Possible values:
  3567  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  3568  	//   "MONDAY" - Monday
  3569  	//   "TUESDAY" - Tuesday
  3570  	//   "WEDNESDAY" - Wednesday
  3571  	//   "THURSDAY" - Thursday
  3572  	//   "FRIDAY" - Friday
  3573  	//   "SATURDAY" - Saturday
  3574  	//   "SUNDAY" - Sunday
  3575  	DayOfWeek string `json:"dayOfWeek,omitempty"`
  3576  	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
  3577  	// unconditionally include in API requests. By default, fields with empty or
  3578  	// default values are omitted from API requests. See
  3579  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3580  	// details.
  3581  	ForceSendFields []string `json:"-"`
  3582  	// NullFields is a list of field names (e.g. "DayOfWeek") to include in API
  3583  	// requests with the JSON null value. By default, fields with empty values are
  3584  	// omitted from API requests. See
  3585  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3586  	NullFields []string `json:"-"`
  3587  }
  3588  
  3589  func (s *WeeklySchedule) MarshalJSON() ([]byte, error) {
  3590  	type NoMethod WeeklySchedule
  3591  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3592  }
  3593  
  3594  // WindowsUpdateSettings: Windows patching is performed using the Windows
  3595  // Update Agent.
  3596  type WindowsUpdateSettings struct {
  3597  	// Classifications: Only apply updates of these windows update classifications.
  3598  	// If empty, all updates are applied.
  3599  	//
  3600  	// Possible values:
  3601  	//   "CLASSIFICATION_UNSPECIFIED" - Invalid. If classifications are included,
  3602  	// they must be specified.
  3603  	//   "CRITICAL" - "A widely released fix for a specific problem that addresses
  3604  	// a critical, non-security-related bug." [1]
  3605  	//   "SECURITY" - "A widely released fix for a product-specific,
  3606  	// security-related vulnerability. Security vulnerabilities are rated by their
  3607  	// severity. The severity rating is indicated in the Microsoft security
  3608  	// bulletin as critical, important, moderate, or low." [1]
  3609  	//   "DEFINITION" - "A widely released and frequent software update that
  3610  	// contains additions to a product's definition database. Definition databases
  3611  	// are often used to detect objects that have specific attributes, such as
  3612  	// malicious code, phishing websites, or junk mail." [1]
  3613  	//   "DRIVER" - "Software that controls the input and output of a device." [1]
  3614  	//   "FEATURE_PACK" - "New product functionality that is first distributed
  3615  	// outside the context of a product release and that is typically included in
  3616  	// the next full product release." [1]
  3617  	//   "SERVICE_PACK" - "A tested, cumulative set of all hotfixes, security
  3618  	// updates, critical updates, and updates. Additionally, service packs may
  3619  	// contain additional fixes for problems that are found internally since the
  3620  	// release of the product. Service packs my also contain a limited number of
  3621  	// customer-requested design changes or features." [1]
  3622  	//   "TOOL" - "A utility or feature that helps complete a task or set of
  3623  	// tasks." [1]
  3624  	//   "UPDATE_ROLLUP" - "A tested, cumulative set of hotfixes, security updates,
  3625  	// critical updates, and updates that are packaged together for easy
  3626  	// deployment. A rollup generally targets a specific area, such as security, or
  3627  	// a component of a product, such as Internet Information Services (IIS)." [1]
  3628  	//   "UPDATE" - "A widely released fix for a specific problem. An update
  3629  	// addresses a noncritical, non-security-related bug." [1]
  3630  	Classifications []string `json:"classifications,omitempty"`
  3631  	// Excludes: List of KBs to exclude from update.
  3632  	Excludes []string `json:"excludes,omitempty"`
  3633  	// ExclusivePatches: An exclusive list of kbs to be updated. These are the only
  3634  	// patches that will be updated. This field must not be used with other patch
  3635  	// configurations.
  3636  	ExclusivePatches []string `json:"exclusivePatches,omitempty"`
  3637  	// ForceSendFields is a list of field names (e.g. "Classifications") to
  3638  	// unconditionally include in API requests. By default, fields with empty or
  3639  	// default values are omitted from API requests. See
  3640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3641  	// details.
  3642  	ForceSendFields []string `json:"-"`
  3643  	// NullFields is a list of field names (e.g. "Classifications") to include in
  3644  	// API requests with the JSON null value. By default, fields with empty values
  3645  	// are omitted from API requests. See
  3646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3647  	NullFields []string `json:"-"`
  3648  }
  3649  
  3650  func (s *WindowsUpdateSettings) MarshalJSON() ([]byte, error) {
  3651  	type NoMethod WindowsUpdateSettings
  3652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3653  }
  3654  
  3655  // YumSettings: Yum patching is performed by executing `yum update`. Additional
  3656  // options can be set to control how this is executed. Note that not all
  3657  // settings are supported on all platforms.
  3658  type YumSettings struct {
  3659  	// Excludes: List of packages to exclude from update. These packages are
  3660  	// excluded by using the yum `--exclude` flag.
  3661  	Excludes []string `json:"excludes,omitempty"`
  3662  	// ExclusivePackages: An exclusive list of packages to be updated. These are
  3663  	// the only packages that will be updated. If these packages are not installed,
  3664  	// they will be ignored. This field must not be specified with any other patch
  3665  	// configuration fields.
  3666  	ExclusivePackages []string `json:"exclusivePackages,omitempty"`
  3667  	// Minimal: Will cause patch to run `yum update-minimal` instead.
  3668  	Minimal bool `json:"minimal,omitempty"`
  3669  	// Security: Adds the `--security` flag to `yum update`. Not supported on all
  3670  	// platforms.
  3671  	Security bool `json:"security,omitempty"`
  3672  	// ForceSendFields is a list of field names (e.g. "Excludes") to
  3673  	// unconditionally include in API requests. By default, fields with empty or
  3674  	// default values are omitted from API requests. See
  3675  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3676  	// details.
  3677  	ForceSendFields []string `json:"-"`
  3678  	// NullFields is a list of field names (e.g. "Excludes") to include in API
  3679  	// requests with the JSON null value. By default, fields with empty values are
  3680  	// omitted from API requests. See
  3681  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3682  	NullFields []string `json:"-"`
  3683  }
  3684  
  3685  func (s *YumSettings) MarshalJSON() ([]byte, error) {
  3686  	type NoMethod YumSettings
  3687  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3688  }
  3689  
  3690  // ZypperSettings: Zypper patching is performed by running `zypper patch`. See
  3691  // also https://en.opensuse.org/SDB:Zypper_manual.
  3692  type ZypperSettings struct {
  3693  	// Categories: Install only patches with these categories. Common categories
  3694  	// include security, recommended, and feature.
  3695  	Categories []string `json:"categories,omitempty"`
  3696  	// Excludes: List of patches to exclude from update.
  3697  	Excludes []string `json:"excludes,omitempty"`
  3698  	// ExclusivePatches: An exclusive list of patches to be updated. These are the
  3699  	// only patches that will be installed using 'zypper patch patch:' command.
  3700  	// This field must not be used with any other patch configuration fields.
  3701  	ExclusivePatches []string `json:"exclusivePatches,omitempty"`
  3702  	// Severities: Install only patches with these severities. Common severities
  3703  	// include critical, important, moderate, and low.
  3704  	Severities []string `json:"severities,omitempty"`
  3705  	// WithOptional: Adds the `--with-optional` flag to `zypper patch`.
  3706  	WithOptional bool `json:"withOptional,omitempty"`
  3707  	// WithUpdate: Adds the `--with-update` flag, to `zypper patch`.
  3708  	WithUpdate bool `json:"withUpdate,omitempty"`
  3709  	// ForceSendFields is a list of field names (e.g. "Categories") to
  3710  	// unconditionally include in API requests. By default, fields with empty or
  3711  	// default values are omitted from API requests. See
  3712  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3713  	// details.
  3714  	ForceSendFields []string `json:"-"`
  3715  	// NullFields is a list of field names (e.g. "Categories") to include in API
  3716  	// requests with the JSON null value. By default, fields with empty values are
  3717  	// omitted from API requests. See
  3718  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3719  	NullFields []string `json:"-"`
  3720  }
  3721  
  3722  func (s *ZypperSettings) MarshalJSON() ([]byte, error) {
  3723  	type NoMethod ZypperSettings
  3724  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3725  }
  3726  
  3727  type ProjectsLocationsGlobalGetProjectFeatureSettingsCall struct {
  3728  	s            *Service
  3729  	name         string
  3730  	urlParams_   gensupport.URLParams
  3731  	ifNoneMatch_ string
  3732  	ctx_         context.Context
  3733  	header_      http.Header
  3734  }
  3735  
  3736  // GetProjectFeatureSettings: GetProjectFeatureSettings returns the VM Manager
  3737  // feature settings for a project.
  3738  //
  3739  //   - name: Name specifies the URL for the ProjectFeatureSettings resource:
  3740  //     projects/project_id/locations/global/projectFeatureSettings.
  3741  func (r *ProjectsLocationsGlobalService) GetProjectFeatureSettings(name string) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
  3742  	c := &ProjectsLocationsGlobalGetProjectFeatureSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3743  	c.name = name
  3744  	return c
  3745  }
  3746  
  3747  // Fields allows partial responses to be retrieved. See
  3748  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3749  // details.
  3750  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
  3751  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3752  	return c
  3753  }
  3754  
  3755  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3756  // object's ETag matches the given value. This is useful for getting updates
  3757  // only after the object has changed since the last request.
  3758  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
  3759  	c.ifNoneMatch_ = entityTag
  3760  	return c
  3761  }
  3762  
  3763  // Context sets the context to be used in this call's Do method.
  3764  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Context(ctx context.Context) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
  3765  	c.ctx_ = ctx
  3766  	return c
  3767  }
  3768  
  3769  // Header returns a http.Header that can be modified by the caller to add
  3770  // headers to the request.
  3771  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Header() http.Header {
  3772  	if c.header_ == nil {
  3773  		c.header_ = make(http.Header)
  3774  	}
  3775  	return c.header_
  3776  }
  3777  
  3778  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) doRequest(alt string) (*http.Response, error) {
  3779  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3780  	if c.ifNoneMatch_ != "" {
  3781  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3782  	}
  3783  	var body io.Reader = nil
  3784  	c.urlParams_.Set("alt", alt)
  3785  	c.urlParams_.Set("prettyPrint", "false")
  3786  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3787  	urls += "?" + c.urlParams_.Encode()
  3788  	req, err := http.NewRequest("GET", urls, body)
  3789  	if err != nil {
  3790  		return nil, err
  3791  	}
  3792  	req.Header = reqHeaders
  3793  	googleapi.Expand(req.URL, map[string]string{
  3794  		"name": c.name,
  3795  	})
  3796  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3797  }
  3798  
  3799  // Do executes the "osconfig.projects.locations.global.getProjectFeatureSettings" call.
  3800  // Any non-2xx status code is an error. Response headers are in either
  3801  // *ProjectFeatureSettings.ServerResponse.Header or (if a response was returned
  3802  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3803  // check whether the returned error was because http.StatusNotModified was
  3804  // returned.
  3805  func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectFeatureSettings, error) {
  3806  	gensupport.SetOptions(c.urlParams_, opts...)
  3807  	res, err := c.doRequest("json")
  3808  	if res != nil && res.StatusCode == http.StatusNotModified {
  3809  		if res.Body != nil {
  3810  			res.Body.Close()
  3811  		}
  3812  		return nil, gensupport.WrapError(&googleapi.Error{
  3813  			Code:   res.StatusCode,
  3814  			Header: res.Header,
  3815  		})
  3816  	}
  3817  	if err != nil {
  3818  		return nil, err
  3819  	}
  3820  	defer googleapi.CloseBody(res)
  3821  	if err := googleapi.CheckResponse(res); err != nil {
  3822  		return nil, gensupport.WrapError(err)
  3823  	}
  3824  	ret := &ProjectFeatureSettings{
  3825  		ServerResponse: googleapi.ServerResponse{
  3826  			Header:         res.Header,
  3827  			HTTPStatusCode: res.StatusCode,
  3828  		},
  3829  	}
  3830  	target := &ret
  3831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3832  		return nil, err
  3833  	}
  3834  	return ret, nil
  3835  }
  3836  
  3837  type ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall struct {
  3838  	s                      *Service
  3839  	name                   string
  3840  	projectfeaturesettings *ProjectFeatureSettings
  3841  	urlParams_             gensupport.URLParams
  3842  	ctx_                   context.Context
  3843  	header_                http.Header
  3844  }
  3845  
  3846  // UpdateProjectFeatureSettings: UpdateProjectFeatureSettings sets the VM
  3847  // Manager features for a project.
  3848  //
  3849  //   - name: Immutable. Name specifies the URL for the ProjectFeatureSettings
  3850  //     resource: projects/project_id/locations/global/projectFeatureSettings.
  3851  func (r *ProjectsLocationsGlobalService) UpdateProjectFeatureSettings(name string, projectfeaturesettings *ProjectFeatureSettings) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
  3852  	c := &ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3853  	c.name = name
  3854  	c.projectfeaturesettings = projectfeaturesettings
  3855  	return c
  3856  }
  3857  
  3858  // UpdateMask sets the optional parameter "updateMask": Field mask that
  3859  // controls which fields of the ProjectFeatureSettings should be updated.
  3860  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
  3861  	c.urlParams_.Set("updateMask", updateMask)
  3862  	return c
  3863  }
  3864  
  3865  // Fields allows partial responses to be retrieved. See
  3866  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3867  // details.
  3868  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
  3869  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3870  	return c
  3871  }
  3872  
  3873  // Context sets the context to be used in this call's Do method.
  3874  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Context(ctx context.Context) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
  3875  	c.ctx_ = ctx
  3876  	return c
  3877  }
  3878  
  3879  // Header returns a http.Header that can be modified by the caller to add
  3880  // headers to the request.
  3881  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Header() http.Header {
  3882  	if c.header_ == nil {
  3883  		c.header_ = make(http.Header)
  3884  	}
  3885  	return c.header_
  3886  }
  3887  
  3888  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) doRequest(alt string) (*http.Response, error) {
  3889  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3890  	var body io.Reader = nil
  3891  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectfeaturesettings)
  3892  	if err != nil {
  3893  		return nil, err
  3894  	}
  3895  	c.urlParams_.Set("alt", alt)
  3896  	c.urlParams_.Set("prettyPrint", "false")
  3897  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3898  	urls += "?" + c.urlParams_.Encode()
  3899  	req, err := http.NewRequest("PATCH", urls, body)
  3900  	if err != nil {
  3901  		return nil, err
  3902  	}
  3903  	req.Header = reqHeaders
  3904  	googleapi.Expand(req.URL, map[string]string{
  3905  		"name": c.name,
  3906  	})
  3907  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3908  }
  3909  
  3910  // Do executes the "osconfig.projects.locations.global.updateProjectFeatureSettings" call.
  3911  // Any non-2xx status code is an error. Response headers are in either
  3912  // *ProjectFeatureSettings.ServerResponse.Header or (if a response was returned
  3913  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3914  // check whether the returned error was because http.StatusNotModified was
  3915  // returned.
  3916  func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectFeatureSettings, error) {
  3917  	gensupport.SetOptions(c.urlParams_, opts...)
  3918  	res, err := c.doRequest("json")
  3919  	if res != nil && res.StatusCode == http.StatusNotModified {
  3920  		if res.Body != nil {
  3921  			res.Body.Close()
  3922  		}
  3923  		return nil, gensupport.WrapError(&googleapi.Error{
  3924  			Code:   res.StatusCode,
  3925  			Header: res.Header,
  3926  		})
  3927  	}
  3928  	if err != nil {
  3929  		return nil, err
  3930  	}
  3931  	defer googleapi.CloseBody(res)
  3932  	if err := googleapi.CheckResponse(res); err != nil {
  3933  		return nil, gensupport.WrapError(err)
  3934  	}
  3935  	ret := &ProjectFeatureSettings{
  3936  		ServerResponse: googleapi.ServerResponse{
  3937  			Header:         res.Header,
  3938  			HTTPStatusCode: res.StatusCode,
  3939  		},
  3940  	}
  3941  	target := &ret
  3942  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3943  		return nil, err
  3944  	}
  3945  	return ret, nil
  3946  }
  3947  
  3948  type ProjectsLocationsInstancesInventoriesGetCall struct {
  3949  	s            *Service
  3950  	name         string
  3951  	urlParams_   gensupport.URLParams
  3952  	ifNoneMatch_ string
  3953  	ctx_         context.Context
  3954  	header_      http.Header
  3955  }
  3956  
  3957  // Get: Get inventory data for the specified VM instance. If the VM has no
  3958  // associated inventory, the message `NOT_FOUND` is returned.
  3959  //
  3960  //   - name: API resource name for inventory resource. Format:
  3961  //     `projects/{project}/locations/{location}/instances/{instance}/inventory`
  3962  //     For `{project}`, either `project-number` or `project-id` can be provided.
  3963  //     For `{instance}`, either Compute Engine `instance-id` or `instance-name`
  3964  //     can be provided.
  3965  func (r *ProjectsLocationsInstancesInventoriesService) Get(name string) *ProjectsLocationsInstancesInventoriesGetCall {
  3966  	c := &ProjectsLocationsInstancesInventoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3967  	c.name = name
  3968  	return c
  3969  }
  3970  
  3971  // View sets the optional parameter "view": Inventory view indicating what
  3972  // information should be included in the inventory resource. If unspecified,
  3973  // the default view is BASIC.
  3974  //
  3975  // Possible values:
  3976  //
  3977  //	"INVENTORY_VIEW_UNSPECIFIED" - The default value. The API defaults to the
  3978  //
  3979  // BASIC view.
  3980  //
  3981  //	"BASIC" - Returns the basic inventory information that includes `os_info`.
  3982  //	"FULL" - Returns all fields.
  3983  func (c *ProjectsLocationsInstancesInventoriesGetCall) View(view string) *ProjectsLocationsInstancesInventoriesGetCall {
  3984  	c.urlParams_.Set("view", view)
  3985  	return c
  3986  }
  3987  
  3988  // Fields allows partial responses to be retrieved. See
  3989  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3990  // details.
  3991  func (c *ProjectsLocationsInstancesInventoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesInventoriesGetCall {
  3992  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3993  	return c
  3994  }
  3995  
  3996  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3997  // object's ETag matches the given value. This is useful for getting updates
  3998  // only after the object has changed since the last request.
  3999  func (c *ProjectsLocationsInstancesInventoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesInventoriesGetCall {
  4000  	c.ifNoneMatch_ = entityTag
  4001  	return c
  4002  }
  4003  
  4004  // Context sets the context to be used in this call's Do method.
  4005  func (c *ProjectsLocationsInstancesInventoriesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesInventoriesGetCall {
  4006  	c.ctx_ = ctx
  4007  	return c
  4008  }
  4009  
  4010  // Header returns a http.Header that can be modified by the caller to add
  4011  // headers to the request.
  4012  func (c *ProjectsLocationsInstancesInventoriesGetCall) Header() http.Header {
  4013  	if c.header_ == nil {
  4014  		c.header_ = make(http.Header)
  4015  	}
  4016  	return c.header_
  4017  }
  4018  
  4019  func (c *ProjectsLocationsInstancesInventoriesGetCall) doRequest(alt string) (*http.Response, error) {
  4020  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4021  	if c.ifNoneMatch_ != "" {
  4022  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4023  	}
  4024  	var body io.Reader = nil
  4025  	c.urlParams_.Set("alt", alt)
  4026  	c.urlParams_.Set("prettyPrint", "false")
  4027  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4028  	urls += "?" + c.urlParams_.Encode()
  4029  	req, err := http.NewRequest("GET", urls, body)
  4030  	if err != nil {
  4031  		return nil, err
  4032  	}
  4033  	req.Header = reqHeaders
  4034  	googleapi.Expand(req.URL, map[string]string{
  4035  		"name": c.name,
  4036  	})
  4037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4038  }
  4039  
  4040  // Do executes the "osconfig.projects.locations.instances.inventories.get" call.
  4041  // Any non-2xx status code is an error. Response headers are in either
  4042  // *Inventory.ServerResponse.Header or (if a response was returned at all) in
  4043  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4044  // whether the returned error was because http.StatusNotModified was returned.
  4045  func (c *ProjectsLocationsInstancesInventoriesGetCall) Do(opts ...googleapi.CallOption) (*Inventory, error) {
  4046  	gensupport.SetOptions(c.urlParams_, opts...)
  4047  	res, err := c.doRequest("json")
  4048  	if res != nil && res.StatusCode == http.StatusNotModified {
  4049  		if res.Body != nil {
  4050  			res.Body.Close()
  4051  		}
  4052  		return nil, gensupport.WrapError(&googleapi.Error{
  4053  			Code:   res.StatusCode,
  4054  			Header: res.Header,
  4055  		})
  4056  	}
  4057  	if err != nil {
  4058  		return nil, err
  4059  	}
  4060  	defer googleapi.CloseBody(res)
  4061  	if err := googleapi.CheckResponse(res); err != nil {
  4062  		return nil, gensupport.WrapError(err)
  4063  	}
  4064  	ret := &Inventory{
  4065  		ServerResponse: googleapi.ServerResponse{
  4066  			Header:         res.Header,
  4067  			HTTPStatusCode: res.StatusCode,
  4068  		},
  4069  	}
  4070  	target := &ret
  4071  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4072  		return nil, err
  4073  	}
  4074  	return ret, nil
  4075  }
  4076  
  4077  type ProjectsLocationsInstancesInventoriesListCall struct {
  4078  	s            *Service
  4079  	parent       string
  4080  	urlParams_   gensupport.URLParams
  4081  	ifNoneMatch_ string
  4082  	ctx_         context.Context
  4083  	header_      http.Header
  4084  }
  4085  
  4086  // List: List inventory data for all VM instances in the specified zone.
  4087  //
  4088  //   - parent: The parent resource name. Format:
  4089  //     `projects/{project}/locations/{location}/instances/-` For `{project}`,
  4090  //     either `project-number` or `project-id` can be provided.
  4091  func (r *ProjectsLocationsInstancesInventoriesService) List(parent string) *ProjectsLocationsInstancesInventoriesListCall {
  4092  	c := &ProjectsLocationsInstancesInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4093  	c.parent = parent
  4094  	return c
  4095  }
  4096  
  4097  // Filter sets the optional parameter "filter": If provided, this field
  4098  // specifies the criteria that must be met by a `Inventory` API resource to be
  4099  // included in the response.
  4100  func (c *ProjectsLocationsInstancesInventoriesListCall) Filter(filter string) *ProjectsLocationsInstancesInventoriesListCall {
  4101  	c.urlParams_.Set("filter", filter)
  4102  	return c
  4103  }
  4104  
  4105  // PageSize sets the optional parameter "pageSize": The maximum number of
  4106  // results to return.
  4107  func (c *ProjectsLocationsInstancesInventoriesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesInventoriesListCall {
  4108  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4109  	return c
  4110  }
  4111  
  4112  // PageToken sets the optional parameter "pageToken": A pagination token
  4113  // returned from a previous call to `ListInventories` that indicates where this
  4114  // listing should continue from.
  4115  func (c *ProjectsLocationsInstancesInventoriesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesInventoriesListCall {
  4116  	c.urlParams_.Set("pageToken", pageToken)
  4117  	return c
  4118  }
  4119  
  4120  // View sets the optional parameter "view": Inventory view indicating what
  4121  // information should be included in the inventory resource. If unspecified,
  4122  // the default view is BASIC.
  4123  //
  4124  // Possible values:
  4125  //
  4126  //	"INVENTORY_VIEW_UNSPECIFIED" - The default value. The API defaults to the
  4127  //
  4128  // BASIC view.
  4129  //
  4130  //	"BASIC" - Returns the basic inventory information that includes `os_info`.
  4131  //	"FULL" - Returns all fields.
  4132  func (c *ProjectsLocationsInstancesInventoriesListCall) View(view string) *ProjectsLocationsInstancesInventoriesListCall {
  4133  	c.urlParams_.Set("view", view)
  4134  	return c
  4135  }
  4136  
  4137  // Fields allows partial responses to be retrieved. See
  4138  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4139  // details.
  4140  func (c *ProjectsLocationsInstancesInventoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesInventoriesListCall {
  4141  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4142  	return c
  4143  }
  4144  
  4145  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4146  // object's ETag matches the given value. This is useful for getting updates
  4147  // only after the object has changed since the last request.
  4148  func (c *ProjectsLocationsInstancesInventoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesInventoriesListCall {
  4149  	c.ifNoneMatch_ = entityTag
  4150  	return c
  4151  }
  4152  
  4153  // Context sets the context to be used in this call's Do method.
  4154  func (c *ProjectsLocationsInstancesInventoriesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesInventoriesListCall {
  4155  	c.ctx_ = ctx
  4156  	return c
  4157  }
  4158  
  4159  // Header returns a http.Header that can be modified by the caller to add
  4160  // headers to the request.
  4161  func (c *ProjectsLocationsInstancesInventoriesListCall) Header() http.Header {
  4162  	if c.header_ == nil {
  4163  		c.header_ = make(http.Header)
  4164  	}
  4165  	return c.header_
  4166  }
  4167  
  4168  func (c *ProjectsLocationsInstancesInventoriesListCall) doRequest(alt string) (*http.Response, error) {
  4169  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4170  	if c.ifNoneMatch_ != "" {
  4171  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4172  	}
  4173  	var body io.Reader = nil
  4174  	c.urlParams_.Set("alt", alt)
  4175  	c.urlParams_.Set("prettyPrint", "false")
  4176  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/inventories")
  4177  	urls += "?" + c.urlParams_.Encode()
  4178  	req, err := http.NewRequest("GET", urls, body)
  4179  	if err != nil {
  4180  		return nil, err
  4181  	}
  4182  	req.Header = reqHeaders
  4183  	googleapi.Expand(req.URL, map[string]string{
  4184  		"parent": c.parent,
  4185  	})
  4186  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4187  }
  4188  
  4189  // Do executes the "osconfig.projects.locations.instances.inventories.list" call.
  4190  // Any non-2xx status code is an error. Response headers are in either
  4191  // *ListInventoriesResponse.ServerResponse.Header or (if a response was
  4192  // returned at all) in error.(*googleapi.Error).Header. Use
  4193  // googleapi.IsNotModified to check whether the returned error was because
  4194  // http.StatusNotModified was returned.
  4195  func (c *ProjectsLocationsInstancesInventoriesListCall) Do(opts ...googleapi.CallOption) (*ListInventoriesResponse, error) {
  4196  	gensupport.SetOptions(c.urlParams_, opts...)
  4197  	res, err := c.doRequest("json")
  4198  	if res != nil && res.StatusCode == http.StatusNotModified {
  4199  		if res.Body != nil {
  4200  			res.Body.Close()
  4201  		}
  4202  		return nil, gensupport.WrapError(&googleapi.Error{
  4203  			Code:   res.StatusCode,
  4204  			Header: res.Header,
  4205  		})
  4206  	}
  4207  	if err != nil {
  4208  		return nil, err
  4209  	}
  4210  	defer googleapi.CloseBody(res)
  4211  	if err := googleapi.CheckResponse(res); err != nil {
  4212  		return nil, gensupport.WrapError(err)
  4213  	}
  4214  	ret := &ListInventoriesResponse{
  4215  		ServerResponse: googleapi.ServerResponse{
  4216  			Header:         res.Header,
  4217  			HTTPStatusCode: res.StatusCode,
  4218  		},
  4219  	}
  4220  	target := &ret
  4221  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4222  		return nil, err
  4223  	}
  4224  	return ret, nil
  4225  }
  4226  
  4227  // Pages invokes f for each page of results.
  4228  // A non-nil error returned from f will halt the iteration.
  4229  // The provided context supersedes any context provided to the Context method.
  4230  func (c *ProjectsLocationsInstancesInventoriesListCall) Pages(ctx context.Context, f func(*ListInventoriesResponse) error) error {
  4231  	c.ctx_ = ctx
  4232  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4233  	for {
  4234  		x, err := c.Do()
  4235  		if err != nil {
  4236  			return err
  4237  		}
  4238  		if err := f(x); err != nil {
  4239  			return err
  4240  		}
  4241  		if x.NextPageToken == "" {
  4242  			return nil
  4243  		}
  4244  		c.PageToken(x.NextPageToken)
  4245  	}
  4246  }
  4247  
  4248  type ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall struct {
  4249  	s            *Service
  4250  	name         string
  4251  	urlParams_   gensupport.URLParams
  4252  	ifNoneMatch_ string
  4253  	ctx_         context.Context
  4254  	header_      http.Header
  4255  }
  4256  
  4257  // Get: Get the OS policy assignment report for the specified Compute Engine VM
  4258  // instance.
  4259  //
  4260  //   - name: API resource name for OS policy assignment report. Format:
  4261  //     `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssi
  4262  //     gnments/{assignment}/report` For `{project}`, either `project-number` or
  4263  //     `project-id` can be provided. For `{instance_id}`, either Compute Engine
  4264  //     `instance-id` or `instance-name` can be provided. For `{assignment_id}`,
  4265  //     the OSPolicyAssignment id must be provided.
  4266  func (r *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService) Get(name string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
  4267  	c := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4268  	c.name = name
  4269  	return c
  4270  }
  4271  
  4272  // Fields allows partial responses to be retrieved. See
  4273  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4274  // details.
  4275  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
  4276  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4277  	return c
  4278  }
  4279  
  4280  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4281  // object's ETag matches the given value. This is useful for getting updates
  4282  // only after the object has changed since the last request.
  4283  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
  4284  	c.ifNoneMatch_ = entityTag
  4285  	return c
  4286  }
  4287  
  4288  // Context sets the context to be used in this call's Do method.
  4289  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
  4290  	c.ctx_ = ctx
  4291  	return c
  4292  }
  4293  
  4294  // Header returns a http.Header that can be modified by the caller to add
  4295  // headers to the request.
  4296  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Header() http.Header {
  4297  	if c.header_ == nil {
  4298  		c.header_ = make(http.Header)
  4299  	}
  4300  	return c.header_
  4301  }
  4302  
  4303  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) doRequest(alt string) (*http.Response, error) {
  4304  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4305  	if c.ifNoneMatch_ != "" {
  4306  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4307  	}
  4308  	var body io.Reader = nil
  4309  	c.urlParams_.Set("alt", alt)
  4310  	c.urlParams_.Set("prettyPrint", "false")
  4311  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4312  	urls += "?" + c.urlParams_.Encode()
  4313  	req, err := http.NewRequest("GET", urls, body)
  4314  	if err != nil {
  4315  		return nil, err
  4316  	}
  4317  	req.Header = reqHeaders
  4318  	googleapi.Expand(req.URL, map[string]string{
  4319  		"name": c.name,
  4320  	})
  4321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4322  }
  4323  
  4324  // Do executes the "osconfig.projects.locations.instances.osPolicyAssignments.reports.get" call.
  4325  // Any non-2xx status code is an error. Response headers are in either
  4326  // *OSPolicyAssignmentReport.ServerResponse.Header or (if a response was
  4327  // returned at all) in error.(*googleapi.Error).Header. Use
  4328  // googleapi.IsNotModified to check whether the returned error was because
  4329  // http.StatusNotModified was returned.
  4330  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Do(opts ...googleapi.CallOption) (*OSPolicyAssignmentReport, error) {
  4331  	gensupport.SetOptions(c.urlParams_, opts...)
  4332  	res, err := c.doRequest("json")
  4333  	if res != nil && res.StatusCode == http.StatusNotModified {
  4334  		if res.Body != nil {
  4335  			res.Body.Close()
  4336  		}
  4337  		return nil, gensupport.WrapError(&googleapi.Error{
  4338  			Code:   res.StatusCode,
  4339  			Header: res.Header,
  4340  		})
  4341  	}
  4342  	if err != nil {
  4343  		return nil, err
  4344  	}
  4345  	defer googleapi.CloseBody(res)
  4346  	if err := googleapi.CheckResponse(res); err != nil {
  4347  		return nil, gensupport.WrapError(err)
  4348  	}
  4349  	ret := &OSPolicyAssignmentReport{
  4350  		ServerResponse: googleapi.ServerResponse{
  4351  			Header:         res.Header,
  4352  			HTTPStatusCode: res.StatusCode,
  4353  		},
  4354  	}
  4355  	target := &ret
  4356  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4357  		return nil, err
  4358  	}
  4359  	return ret, nil
  4360  }
  4361  
  4362  type ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall struct {
  4363  	s            *Service
  4364  	parent       string
  4365  	urlParams_   gensupport.URLParams
  4366  	ifNoneMatch_ string
  4367  	ctx_         context.Context
  4368  	header_      http.Header
  4369  }
  4370  
  4371  // List: List OS policy assignment reports for all Compute Engine VM instances
  4372  // in the specified zone.
  4373  //
  4374  //   - parent: The parent resource name. Format:
  4375  //     `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssig
  4376  //     nments/{assignment}/reports` For `{project}`, either `project-number` or
  4377  //     `project-id` can be provided. For `{instance}`, either `instance-name`,
  4378  //     `instance-id`, or `-` can be provided. If '-' is provided, the response
  4379  //     will include OSPolicyAssignmentReports for all instances in the
  4380  //     project/location. For `{assignment}`, either `assignment-id` or `-` can be
  4381  //     provided. If '-' is provided, the response will include
  4382  //     OSPolicyAssignmentReports for all OSPolicyAssignments in the
  4383  //     project/location. Either {instance} or {assignment} must be `-`. For
  4384  //     example:
  4385  //     `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssig
  4386  //     nments/-/reports` returns all reports for the instance
  4387  //     `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{a
  4388  //     ssignment-id}/reports` returns all the reports for the given assignment
  4389  //     across all instances.
  4390  //     `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/
  4391  //     reports` returns all the reports for all assignments across all instances.
  4392  func (r *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService) List(parent string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4393  	c := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4394  	c.parent = parent
  4395  	return c
  4396  }
  4397  
  4398  // Filter sets the optional parameter "filter": If provided, this field
  4399  // specifies the criteria that must be met by the `OSPolicyAssignmentReport`
  4400  // API resource that is included in the response.
  4401  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Filter(filter string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4402  	c.urlParams_.Set("filter", filter)
  4403  	return c
  4404  }
  4405  
  4406  // PageSize sets the optional parameter "pageSize": The maximum number of
  4407  // results to return.
  4408  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4409  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4410  	return c
  4411  }
  4412  
  4413  // PageToken sets the optional parameter "pageToken": A pagination token
  4414  // returned from a previous call to the `ListOSPolicyAssignmentReports` method
  4415  // that indicates where this listing should continue from.
  4416  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4417  	c.urlParams_.Set("pageToken", pageToken)
  4418  	return c
  4419  }
  4420  
  4421  // Fields allows partial responses to be retrieved. See
  4422  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4423  // details.
  4424  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4425  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4426  	return c
  4427  }
  4428  
  4429  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4430  // object's ETag matches the given value. This is useful for getting updates
  4431  // only after the object has changed since the last request.
  4432  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4433  	c.ifNoneMatch_ = entityTag
  4434  	return c
  4435  }
  4436  
  4437  // Context sets the context to be used in this call's Do method.
  4438  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
  4439  	c.ctx_ = ctx
  4440  	return c
  4441  }
  4442  
  4443  // Header returns a http.Header that can be modified by the caller to add
  4444  // headers to the request.
  4445  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Header() http.Header {
  4446  	if c.header_ == nil {
  4447  		c.header_ = make(http.Header)
  4448  	}
  4449  	return c.header_
  4450  }
  4451  
  4452  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) doRequest(alt string) (*http.Response, error) {
  4453  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4454  	if c.ifNoneMatch_ != "" {
  4455  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4456  	}
  4457  	var body io.Reader = nil
  4458  	c.urlParams_.Set("alt", alt)
  4459  	c.urlParams_.Set("prettyPrint", "false")
  4460  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports")
  4461  	urls += "?" + c.urlParams_.Encode()
  4462  	req, err := http.NewRequest("GET", urls, body)
  4463  	if err != nil {
  4464  		return nil, err
  4465  	}
  4466  	req.Header = reqHeaders
  4467  	googleapi.Expand(req.URL, map[string]string{
  4468  		"parent": c.parent,
  4469  	})
  4470  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4471  }
  4472  
  4473  // Do executes the "osconfig.projects.locations.instances.osPolicyAssignments.reports.list" call.
  4474  // Any non-2xx status code is an error. Response headers are in either
  4475  // *ListOSPolicyAssignmentReportsResponse.ServerResponse.Header or (if a
  4476  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4477  // googleapi.IsNotModified to check whether the returned error was because
  4478  // http.StatusNotModified was returned.
  4479  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentReportsResponse, error) {
  4480  	gensupport.SetOptions(c.urlParams_, opts...)
  4481  	res, err := c.doRequest("json")
  4482  	if res != nil && res.StatusCode == http.StatusNotModified {
  4483  		if res.Body != nil {
  4484  			res.Body.Close()
  4485  		}
  4486  		return nil, gensupport.WrapError(&googleapi.Error{
  4487  			Code:   res.StatusCode,
  4488  			Header: res.Header,
  4489  		})
  4490  	}
  4491  	if err != nil {
  4492  		return nil, err
  4493  	}
  4494  	defer googleapi.CloseBody(res)
  4495  	if err := googleapi.CheckResponse(res); err != nil {
  4496  		return nil, gensupport.WrapError(err)
  4497  	}
  4498  	ret := &ListOSPolicyAssignmentReportsResponse{
  4499  		ServerResponse: googleapi.ServerResponse{
  4500  			Header:         res.Header,
  4501  			HTTPStatusCode: res.StatusCode,
  4502  		},
  4503  	}
  4504  	target := &ret
  4505  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4506  		return nil, err
  4507  	}
  4508  	return ret, nil
  4509  }
  4510  
  4511  // Pages invokes f for each page of results.
  4512  // A non-nil error returned from f will halt the iteration.
  4513  // The provided context supersedes any context provided to the Context method.
  4514  func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentReportsResponse) error) error {
  4515  	c.ctx_ = ctx
  4516  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4517  	for {
  4518  		x, err := c.Do()
  4519  		if err != nil {
  4520  			return err
  4521  		}
  4522  		if err := f(x); err != nil {
  4523  			return err
  4524  		}
  4525  		if x.NextPageToken == "" {
  4526  			return nil
  4527  		}
  4528  		c.PageToken(x.NextPageToken)
  4529  	}
  4530  }
  4531  
  4532  type ProjectsLocationsInstancesVulnerabilityReportsGetCall struct {
  4533  	s            *Service
  4534  	name         string
  4535  	urlParams_   gensupport.URLParams
  4536  	ifNoneMatch_ string
  4537  	ctx_         context.Context
  4538  	header_      http.Header
  4539  }
  4540  
  4541  // Get: Gets the vulnerability report for the specified VM instance. Only VMs
  4542  // with inventory data have vulnerability reports associated with them.
  4543  //
  4544  //   - name: API resource name for vulnerability resource. Format:
  4545  //     `projects/{project}/locations/{location}/instances/{instance}/vulnerability
  4546  //     Report` For `{project}`, either `project-number` or `project-id` can be
  4547  //     provided. For `{instance}`, either Compute Engine `instance-id` or
  4548  //     `instance-name` can be provided.
  4549  func (r *ProjectsLocationsInstancesVulnerabilityReportsService) Get(name string) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
  4550  	c := &ProjectsLocationsInstancesVulnerabilityReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4551  	c.name = name
  4552  	return c
  4553  }
  4554  
  4555  // Fields allows partial responses to be retrieved. See
  4556  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4557  // details.
  4558  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
  4559  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4560  	return c
  4561  }
  4562  
  4563  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4564  // object's ETag matches the given value. This is useful for getting updates
  4565  // only after the object has changed since the last request.
  4566  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
  4567  	c.ifNoneMatch_ = entityTag
  4568  	return c
  4569  }
  4570  
  4571  // Context sets the context to be used in this call's Do method.
  4572  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
  4573  	c.ctx_ = ctx
  4574  	return c
  4575  }
  4576  
  4577  // Header returns a http.Header that can be modified by the caller to add
  4578  // headers to the request.
  4579  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Header() http.Header {
  4580  	if c.header_ == nil {
  4581  		c.header_ = make(http.Header)
  4582  	}
  4583  	return c.header_
  4584  }
  4585  
  4586  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) doRequest(alt string) (*http.Response, error) {
  4587  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4588  	if c.ifNoneMatch_ != "" {
  4589  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4590  	}
  4591  	var body io.Reader = nil
  4592  	c.urlParams_.Set("alt", alt)
  4593  	c.urlParams_.Set("prettyPrint", "false")
  4594  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4595  	urls += "?" + c.urlParams_.Encode()
  4596  	req, err := http.NewRequest("GET", urls, body)
  4597  	if err != nil {
  4598  		return nil, err
  4599  	}
  4600  	req.Header = reqHeaders
  4601  	googleapi.Expand(req.URL, map[string]string{
  4602  		"name": c.name,
  4603  	})
  4604  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4605  }
  4606  
  4607  // Do executes the "osconfig.projects.locations.instances.vulnerabilityReports.get" call.
  4608  // Any non-2xx status code is an error. Response headers are in either
  4609  // *VulnerabilityReport.ServerResponse.Header or (if a response was returned at
  4610  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4611  // check whether the returned error was because http.StatusNotModified was
  4612  // returned.
  4613  func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Do(opts ...googleapi.CallOption) (*VulnerabilityReport, error) {
  4614  	gensupport.SetOptions(c.urlParams_, opts...)
  4615  	res, err := c.doRequest("json")
  4616  	if res != nil && res.StatusCode == http.StatusNotModified {
  4617  		if res.Body != nil {
  4618  			res.Body.Close()
  4619  		}
  4620  		return nil, gensupport.WrapError(&googleapi.Error{
  4621  			Code:   res.StatusCode,
  4622  			Header: res.Header,
  4623  		})
  4624  	}
  4625  	if err != nil {
  4626  		return nil, err
  4627  	}
  4628  	defer googleapi.CloseBody(res)
  4629  	if err := googleapi.CheckResponse(res); err != nil {
  4630  		return nil, gensupport.WrapError(err)
  4631  	}
  4632  	ret := &VulnerabilityReport{
  4633  		ServerResponse: googleapi.ServerResponse{
  4634  			Header:         res.Header,
  4635  			HTTPStatusCode: res.StatusCode,
  4636  		},
  4637  	}
  4638  	target := &ret
  4639  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4640  		return nil, err
  4641  	}
  4642  	return ret, nil
  4643  }
  4644  
  4645  type ProjectsLocationsInstancesVulnerabilityReportsListCall struct {
  4646  	s            *Service
  4647  	parent       string
  4648  	urlParams_   gensupport.URLParams
  4649  	ifNoneMatch_ string
  4650  	ctx_         context.Context
  4651  	header_      http.Header
  4652  }
  4653  
  4654  // List: List vulnerability reports for all VM instances in the specified zone.
  4655  //
  4656  //   - parent: The parent resource name. Format:
  4657  //     `projects/{project}/locations/{location}/instances/-` For `{project}`,
  4658  //     either `project-number` or `project-id` can be provided.
  4659  func (r *ProjectsLocationsInstancesVulnerabilityReportsService) List(parent string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4660  	c := &ProjectsLocationsInstancesVulnerabilityReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4661  	c.parent = parent
  4662  	return c
  4663  }
  4664  
  4665  // Filter sets the optional parameter "filter": This field supports filtering
  4666  // by the severity level for the vulnerability. For a list of severity levels,
  4667  // see Severity levels for vulnerabilities
  4668  // (https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities).
  4669  // The filter field follows the rules described in the AIP-160
  4670  // (https://google.aip.dev/160) guidelines as follows: + **Filter for a
  4671  // specific severity type**: you can list reports that contain vulnerabilities
  4672  // that are classified as medium by specifying
  4673  // `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of
  4674  // severities** : you can list reports that have vulnerabilities that are
  4675  // classified as critical or high by specifying
  4676  // `vulnerabilities.details.severity:HIGH OR
  4677  // vulnerabilities.details.severity:CRITICAL`
  4678  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Filter(filter string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4679  	c.urlParams_.Set("filter", filter)
  4680  	return c
  4681  }
  4682  
  4683  // PageSize sets the optional parameter "pageSize": The maximum number of
  4684  // results to return.
  4685  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4686  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4687  	return c
  4688  }
  4689  
  4690  // PageToken sets the optional parameter "pageToken": A pagination token
  4691  // returned from a previous call to `ListVulnerabilityReports` that indicates
  4692  // where this listing should continue from.
  4693  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4694  	c.urlParams_.Set("pageToken", pageToken)
  4695  	return c
  4696  }
  4697  
  4698  // Fields allows partial responses to be retrieved. See
  4699  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4700  // details.
  4701  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4702  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4703  	return c
  4704  }
  4705  
  4706  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4707  // object's ETag matches the given value. This is useful for getting updates
  4708  // only after the object has changed since the last request.
  4709  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4710  	c.ifNoneMatch_ = entityTag
  4711  	return c
  4712  }
  4713  
  4714  // Context sets the context to be used in this call's Do method.
  4715  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
  4716  	c.ctx_ = ctx
  4717  	return c
  4718  }
  4719  
  4720  // Header returns a http.Header that can be modified by the caller to add
  4721  // headers to the request.
  4722  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Header() http.Header {
  4723  	if c.header_ == nil {
  4724  		c.header_ = make(http.Header)
  4725  	}
  4726  	return c.header_
  4727  }
  4728  
  4729  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) doRequest(alt string) (*http.Response, error) {
  4730  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4731  	if c.ifNoneMatch_ != "" {
  4732  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4733  	}
  4734  	var body io.Reader = nil
  4735  	c.urlParams_.Set("alt", alt)
  4736  	c.urlParams_.Set("prettyPrint", "false")
  4737  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vulnerabilityReports")
  4738  	urls += "?" + c.urlParams_.Encode()
  4739  	req, err := http.NewRequest("GET", urls, body)
  4740  	if err != nil {
  4741  		return nil, err
  4742  	}
  4743  	req.Header = reqHeaders
  4744  	googleapi.Expand(req.URL, map[string]string{
  4745  		"parent": c.parent,
  4746  	})
  4747  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4748  }
  4749  
  4750  // Do executes the "osconfig.projects.locations.instances.vulnerabilityReports.list" call.
  4751  // Any non-2xx status code is an error. Response headers are in either
  4752  // *ListVulnerabilityReportsResponse.ServerResponse.Header or (if a response
  4753  // was returned at all) in error.(*googleapi.Error).Header. Use
  4754  // googleapi.IsNotModified to check whether the returned error was because
  4755  // http.StatusNotModified was returned.
  4756  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Do(opts ...googleapi.CallOption) (*ListVulnerabilityReportsResponse, error) {
  4757  	gensupport.SetOptions(c.urlParams_, opts...)
  4758  	res, err := c.doRequest("json")
  4759  	if res != nil && res.StatusCode == http.StatusNotModified {
  4760  		if res.Body != nil {
  4761  			res.Body.Close()
  4762  		}
  4763  		return nil, gensupport.WrapError(&googleapi.Error{
  4764  			Code:   res.StatusCode,
  4765  			Header: res.Header,
  4766  		})
  4767  	}
  4768  	if err != nil {
  4769  		return nil, err
  4770  	}
  4771  	defer googleapi.CloseBody(res)
  4772  	if err := googleapi.CheckResponse(res); err != nil {
  4773  		return nil, gensupport.WrapError(err)
  4774  	}
  4775  	ret := &ListVulnerabilityReportsResponse{
  4776  		ServerResponse: googleapi.ServerResponse{
  4777  			Header:         res.Header,
  4778  			HTTPStatusCode: res.StatusCode,
  4779  		},
  4780  	}
  4781  	target := &ret
  4782  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4783  		return nil, err
  4784  	}
  4785  	return ret, nil
  4786  }
  4787  
  4788  // Pages invokes f for each page of results.
  4789  // A non-nil error returned from f will halt the iteration.
  4790  // The provided context supersedes any context provided to the Context method.
  4791  func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Pages(ctx context.Context, f func(*ListVulnerabilityReportsResponse) error) error {
  4792  	c.ctx_ = ctx
  4793  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4794  	for {
  4795  		x, err := c.Do()
  4796  		if err != nil {
  4797  			return err
  4798  		}
  4799  		if err := f(x); err != nil {
  4800  			return err
  4801  		}
  4802  		if x.NextPageToken == "" {
  4803  			return nil
  4804  		}
  4805  		c.PageToken(x.NextPageToken)
  4806  	}
  4807  }
  4808  
  4809  type ProjectsLocationsOsPolicyAssignmentsCreateCall struct {
  4810  	s                  *Service
  4811  	parent             string
  4812  	ospolicyassignment *OSPolicyAssignment
  4813  	urlParams_         gensupport.URLParams
  4814  	ctx_               context.Context
  4815  	header_            http.Header
  4816  }
  4817  
  4818  // Create: Create an OS policy assignment. This method also creates the first
  4819  // revision of the OS policy assignment. This method returns a long running
  4820  // operation (LRO) that contains the rollout details. The rollout can be
  4821  // cancelled by cancelling the LRO. For more information, see Method:
  4822  // projects.locations.osPolicyAssignments.operations.cancel
  4823  // (https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  4824  //
  4825  //   - parent: The parent resource name in the form:
  4826  //     projects/{project}/locations/{location}. Note: Specify the zone of your
  4827  //     VMs as the location.
  4828  func (r *ProjectsLocationsOsPolicyAssignmentsService) Create(parent string, ospolicyassignment *OSPolicyAssignment) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
  4829  	c := &ProjectsLocationsOsPolicyAssignmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4830  	c.parent = parent
  4831  	c.ospolicyassignment = ospolicyassignment
  4832  	return c
  4833  }
  4834  
  4835  // OsPolicyAssignmentId sets the optional parameter "osPolicyAssignmentId":
  4836  // Required. The logical name of the OS policy assignment in the project with
  4837  // the following restrictions: * Must contain only lowercase letters, numbers,
  4838  // and hyphens. * Must start with a letter. * Must be between 1-63 characters.
  4839  // * Must end with a number or a letter. * Must be unique within the project.
  4840  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) OsPolicyAssignmentId(osPolicyAssignmentId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
  4841  	c.urlParams_.Set("osPolicyAssignmentId", osPolicyAssignmentId)
  4842  	return c
  4843  }
  4844  
  4845  // RequestId sets the optional parameter "requestId": A unique identifier for
  4846  // this request. Restricted to 36 ASCII characters. A random UUID is
  4847  // recommended. This request is only idempotent if a `request_id` is provided.
  4848  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
  4849  	c.urlParams_.Set("requestId", requestId)
  4850  	return c
  4851  }
  4852  
  4853  // Fields allows partial responses to be retrieved. See
  4854  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4855  // details.
  4856  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
  4857  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4858  	return c
  4859  }
  4860  
  4861  // Context sets the context to be used in this call's Do method.
  4862  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
  4863  	c.ctx_ = ctx
  4864  	return c
  4865  }
  4866  
  4867  // Header returns a http.Header that can be modified by the caller to add
  4868  // headers to the request.
  4869  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Header() http.Header {
  4870  	if c.header_ == nil {
  4871  		c.header_ = make(http.Header)
  4872  	}
  4873  	return c.header_
  4874  }
  4875  
  4876  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) doRequest(alt string) (*http.Response, error) {
  4877  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4878  	var body io.Reader = nil
  4879  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ospolicyassignment)
  4880  	if err != nil {
  4881  		return nil, err
  4882  	}
  4883  	c.urlParams_.Set("alt", alt)
  4884  	c.urlParams_.Set("prettyPrint", "false")
  4885  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/osPolicyAssignments")
  4886  	urls += "?" + c.urlParams_.Encode()
  4887  	req, err := http.NewRequest("POST", urls, body)
  4888  	if err != nil {
  4889  		return nil, err
  4890  	}
  4891  	req.Header = reqHeaders
  4892  	googleapi.Expand(req.URL, map[string]string{
  4893  		"parent": c.parent,
  4894  	})
  4895  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4896  }
  4897  
  4898  // Do executes the "osconfig.projects.locations.osPolicyAssignments.create" call.
  4899  // Any non-2xx status code is an error. Response headers are in either
  4900  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4901  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4902  // whether the returned error was because http.StatusNotModified was returned.
  4903  func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4904  	gensupport.SetOptions(c.urlParams_, opts...)
  4905  	res, err := c.doRequest("json")
  4906  	if res != nil && res.StatusCode == http.StatusNotModified {
  4907  		if res.Body != nil {
  4908  			res.Body.Close()
  4909  		}
  4910  		return nil, gensupport.WrapError(&googleapi.Error{
  4911  			Code:   res.StatusCode,
  4912  			Header: res.Header,
  4913  		})
  4914  	}
  4915  	if err != nil {
  4916  		return nil, err
  4917  	}
  4918  	defer googleapi.CloseBody(res)
  4919  	if err := googleapi.CheckResponse(res); err != nil {
  4920  		return nil, gensupport.WrapError(err)
  4921  	}
  4922  	ret := &Operation{
  4923  		ServerResponse: googleapi.ServerResponse{
  4924  			Header:         res.Header,
  4925  			HTTPStatusCode: res.StatusCode,
  4926  		},
  4927  	}
  4928  	target := &ret
  4929  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4930  		return nil, err
  4931  	}
  4932  	return ret, nil
  4933  }
  4934  
  4935  type ProjectsLocationsOsPolicyAssignmentsDeleteCall struct {
  4936  	s          *Service
  4937  	name       string
  4938  	urlParams_ gensupport.URLParams
  4939  	ctx_       context.Context
  4940  	header_    http.Header
  4941  }
  4942  
  4943  // Delete: Delete the OS policy assignment. This method creates a new revision
  4944  // of the OS policy assignment. This method returns a long running operation
  4945  // (LRO) that contains the rollout details. The rollout can be cancelled by
  4946  // cancelling the LRO. If the LRO completes and is not cancelled, all revisions
  4947  // associated with the OS policy assignment are deleted. For more information,
  4948  // see Method: projects.locations.osPolicyAssignments.operations.cancel
  4949  // (https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  4950  //
  4951  // - name: The name of the OS policy assignment to be deleted.
  4952  func (r *ProjectsLocationsOsPolicyAssignmentsService) Delete(name string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
  4953  	c := &ProjectsLocationsOsPolicyAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4954  	c.name = name
  4955  	return c
  4956  }
  4957  
  4958  // RequestId sets the optional parameter "requestId": A unique identifier for
  4959  // this request. Restricted to 36 ASCII characters. A random UUID is
  4960  // recommended. This request is only idempotent if a `request_id` is provided.
  4961  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
  4962  	c.urlParams_.Set("requestId", requestId)
  4963  	return c
  4964  }
  4965  
  4966  // Fields allows partial responses to be retrieved. See
  4967  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4968  // details.
  4969  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
  4970  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4971  	return c
  4972  }
  4973  
  4974  // Context sets the context to be used in this call's Do method.
  4975  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
  4976  	c.ctx_ = ctx
  4977  	return c
  4978  }
  4979  
  4980  // Header returns a http.Header that can be modified by the caller to add
  4981  // headers to the request.
  4982  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Header() http.Header {
  4983  	if c.header_ == nil {
  4984  		c.header_ = make(http.Header)
  4985  	}
  4986  	return c.header_
  4987  }
  4988  
  4989  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4990  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4991  	var body io.Reader = nil
  4992  	c.urlParams_.Set("alt", alt)
  4993  	c.urlParams_.Set("prettyPrint", "false")
  4994  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4995  	urls += "?" + c.urlParams_.Encode()
  4996  	req, err := http.NewRequest("DELETE", urls, body)
  4997  	if err != nil {
  4998  		return nil, err
  4999  	}
  5000  	req.Header = reqHeaders
  5001  	googleapi.Expand(req.URL, map[string]string{
  5002  		"name": c.name,
  5003  	})
  5004  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5005  }
  5006  
  5007  // Do executes the "osconfig.projects.locations.osPolicyAssignments.delete" call.
  5008  // Any non-2xx status code is an error. Response headers are in either
  5009  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5010  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5011  // whether the returned error was because http.StatusNotModified was returned.
  5012  func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5013  	gensupport.SetOptions(c.urlParams_, opts...)
  5014  	res, err := c.doRequest("json")
  5015  	if res != nil && res.StatusCode == http.StatusNotModified {
  5016  		if res.Body != nil {
  5017  			res.Body.Close()
  5018  		}
  5019  		return nil, gensupport.WrapError(&googleapi.Error{
  5020  			Code:   res.StatusCode,
  5021  			Header: res.Header,
  5022  		})
  5023  	}
  5024  	if err != nil {
  5025  		return nil, err
  5026  	}
  5027  	defer googleapi.CloseBody(res)
  5028  	if err := googleapi.CheckResponse(res); err != nil {
  5029  		return nil, gensupport.WrapError(err)
  5030  	}
  5031  	ret := &Operation{
  5032  		ServerResponse: googleapi.ServerResponse{
  5033  			Header:         res.Header,
  5034  			HTTPStatusCode: res.StatusCode,
  5035  		},
  5036  	}
  5037  	target := &ret
  5038  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5039  		return nil, err
  5040  	}
  5041  	return ret, nil
  5042  }
  5043  
  5044  type ProjectsLocationsOsPolicyAssignmentsGetCall struct {
  5045  	s            *Service
  5046  	name         string
  5047  	urlParams_   gensupport.URLParams
  5048  	ifNoneMatch_ string
  5049  	ctx_         context.Context
  5050  	header_      http.Header
  5051  }
  5052  
  5053  // Get: Retrieve an existing OS policy assignment. This method always returns
  5054  // the latest revision. In order to retrieve a previous revision of the
  5055  // assignment, also provide the revision ID in the `name` parameter.
  5056  //
  5057  //   - name: The resource name of OS policy assignment. Format:
  5058  //     `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_ass
  5059  //     ignment}@{revisionId}`.
  5060  func (r *ProjectsLocationsOsPolicyAssignmentsService) Get(name string) *ProjectsLocationsOsPolicyAssignmentsGetCall {
  5061  	c := &ProjectsLocationsOsPolicyAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5062  	c.name = name
  5063  	return c
  5064  }
  5065  
  5066  // Fields allows partial responses to be retrieved. See
  5067  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5068  // details.
  5069  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsGetCall {
  5070  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5071  	return c
  5072  }
  5073  
  5074  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5075  // object's ETag matches the given value. This is useful for getting updates
  5076  // only after the object has changed since the last request.
  5077  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsGetCall {
  5078  	c.ifNoneMatch_ = entityTag
  5079  	return c
  5080  }
  5081  
  5082  // Context sets the context to be used in this call's Do method.
  5083  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsGetCall {
  5084  	c.ctx_ = ctx
  5085  	return c
  5086  }
  5087  
  5088  // Header returns a http.Header that can be modified by the caller to add
  5089  // headers to the request.
  5090  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Header() http.Header {
  5091  	if c.header_ == nil {
  5092  		c.header_ = make(http.Header)
  5093  	}
  5094  	return c.header_
  5095  }
  5096  
  5097  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
  5098  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5099  	if c.ifNoneMatch_ != "" {
  5100  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5101  	}
  5102  	var body io.Reader = nil
  5103  	c.urlParams_.Set("alt", alt)
  5104  	c.urlParams_.Set("prettyPrint", "false")
  5105  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5106  	urls += "?" + c.urlParams_.Encode()
  5107  	req, err := http.NewRequest("GET", urls, body)
  5108  	if err != nil {
  5109  		return nil, err
  5110  	}
  5111  	req.Header = reqHeaders
  5112  	googleapi.Expand(req.URL, map[string]string{
  5113  		"name": c.name,
  5114  	})
  5115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5116  }
  5117  
  5118  // Do executes the "osconfig.projects.locations.osPolicyAssignments.get" call.
  5119  // Any non-2xx status code is an error. Response headers are in either
  5120  // *OSPolicyAssignment.ServerResponse.Header or (if a response was returned at
  5121  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5122  // check whether the returned error was because http.StatusNotModified was
  5123  // returned.
  5124  func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*OSPolicyAssignment, error) {
  5125  	gensupport.SetOptions(c.urlParams_, opts...)
  5126  	res, err := c.doRequest("json")
  5127  	if res != nil && res.StatusCode == http.StatusNotModified {
  5128  		if res.Body != nil {
  5129  			res.Body.Close()
  5130  		}
  5131  		return nil, gensupport.WrapError(&googleapi.Error{
  5132  			Code:   res.StatusCode,
  5133  			Header: res.Header,
  5134  		})
  5135  	}
  5136  	if err != nil {
  5137  		return nil, err
  5138  	}
  5139  	defer googleapi.CloseBody(res)
  5140  	if err := googleapi.CheckResponse(res); err != nil {
  5141  		return nil, gensupport.WrapError(err)
  5142  	}
  5143  	ret := &OSPolicyAssignment{
  5144  		ServerResponse: googleapi.ServerResponse{
  5145  			Header:         res.Header,
  5146  			HTTPStatusCode: res.StatusCode,
  5147  		},
  5148  	}
  5149  	target := &ret
  5150  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5151  		return nil, err
  5152  	}
  5153  	return ret, nil
  5154  }
  5155  
  5156  type ProjectsLocationsOsPolicyAssignmentsListCall struct {
  5157  	s            *Service
  5158  	parent       string
  5159  	urlParams_   gensupport.URLParams
  5160  	ifNoneMatch_ string
  5161  	ctx_         context.Context
  5162  	header_      http.Header
  5163  }
  5164  
  5165  // List: List the OS policy assignments under the parent resource. For each OS
  5166  // policy assignment, the latest revision is returned.
  5167  //
  5168  // - parent: The parent resource name.
  5169  func (r *ProjectsLocationsOsPolicyAssignmentsService) List(parent string) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5170  	c := &ProjectsLocationsOsPolicyAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5171  	c.parent = parent
  5172  	return c
  5173  }
  5174  
  5175  // PageSize sets the optional parameter "pageSize": The maximum number of
  5176  // assignments to return.
  5177  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) PageSize(pageSize int64) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5178  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5179  	return c
  5180  }
  5181  
  5182  // PageToken sets the optional parameter "pageToken": A pagination token
  5183  // returned from a previous call to `ListOSPolicyAssignments` that indicates
  5184  // where this listing should continue from.
  5185  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) PageToken(pageToken string) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5186  	c.urlParams_.Set("pageToken", pageToken)
  5187  	return c
  5188  }
  5189  
  5190  // Fields allows partial responses to be retrieved. See
  5191  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5192  // details.
  5193  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5194  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5195  	return c
  5196  }
  5197  
  5198  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5199  // object's ETag matches the given value. This is useful for getting updates
  5200  // only after the object has changed since the last request.
  5201  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5202  	c.ifNoneMatch_ = entityTag
  5203  	return c
  5204  }
  5205  
  5206  // Context sets the context to be used in this call's Do method.
  5207  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsListCall {
  5208  	c.ctx_ = ctx
  5209  	return c
  5210  }
  5211  
  5212  // Header returns a http.Header that can be modified by the caller to add
  5213  // headers to the request.
  5214  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Header() http.Header {
  5215  	if c.header_ == nil {
  5216  		c.header_ = make(http.Header)
  5217  	}
  5218  	return c.header_
  5219  }
  5220  
  5221  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
  5222  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5223  	if c.ifNoneMatch_ != "" {
  5224  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5225  	}
  5226  	var body io.Reader = nil
  5227  	c.urlParams_.Set("alt", alt)
  5228  	c.urlParams_.Set("prettyPrint", "false")
  5229  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/osPolicyAssignments")
  5230  	urls += "?" + c.urlParams_.Encode()
  5231  	req, err := http.NewRequest("GET", urls, body)
  5232  	if err != nil {
  5233  		return nil, err
  5234  	}
  5235  	req.Header = reqHeaders
  5236  	googleapi.Expand(req.URL, map[string]string{
  5237  		"parent": c.parent,
  5238  	})
  5239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5240  }
  5241  
  5242  // Do executes the "osconfig.projects.locations.osPolicyAssignments.list" call.
  5243  // Any non-2xx status code is an error. Response headers are in either
  5244  // *ListOSPolicyAssignmentsResponse.ServerResponse.Header or (if a response was
  5245  // returned at all) in error.(*googleapi.Error).Header. Use
  5246  // googleapi.IsNotModified to check whether the returned error was because
  5247  // http.StatusNotModified was returned.
  5248  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentsResponse, error) {
  5249  	gensupport.SetOptions(c.urlParams_, opts...)
  5250  	res, err := c.doRequest("json")
  5251  	if res != nil && res.StatusCode == http.StatusNotModified {
  5252  		if res.Body != nil {
  5253  			res.Body.Close()
  5254  		}
  5255  		return nil, gensupport.WrapError(&googleapi.Error{
  5256  			Code:   res.StatusCode,
  5257  			Header: res.Header,
  5258  		})
  5259  	}
  5260  	if err != nil {
  5261  		return nil, err
  5262  	}
  5263  	defer googleapi.CloseBody(res)
  5264  	if err := googleapi.CheckResponse(res); err != nil {
  5265  		return nil, gensupport.WrapError(err)
  5266  	}
  5267  	ret := &ListOSPolicyAssignmentsResponse{
  5268  		ServerResponse: googleapi.ServerResponse{
  5269  			Header:         res.Header,
  5270  			HTTPStatusCode: res.StatusCode,
  5271  		},
  5272  	}
  5273  	target := &ret
  5274  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5275  		return nil, err
  5276  	}
  5277  	return ret, nil
  5278  }
  5279  
  5280  // Pages invokes f for each page of results.
  5281  // A non-nil error returned from f will halt the iteration.
  5282  // The provided context supersedes any context provided to the Context method.
  5283  func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentsResponse) error) error {
  5284  	c.ctx_ = ctx
  5285  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5286  	for {
  5287  		x, err := c.Do()
  5288  		if err != nil {
  5289  			return err
  5290  		}
  5291  		if err := f(x); err != nil {
  5292  			return err
  5293  		}
  5294  		if x.NextPageToken == "" {
  5295  			return nil
  5296  		}
  5297  		c.PageToken(x.NextPageToken)
  5298  	}
  5299  }
  5300  
  5301  type ProjectsLocationsOsPolicyAssignmentsListRevisionsCall struct {
  5302  	s            *Service
  5303  	name         string
  5304  	urlParams_   gensupport.URLParams
  5305  	ifNoneMatch_ string
  5306  	ctx_         context.Context
  5307  	header_      http.Header
  5308  }
  5309  
  5310  // ListRevisions: List the OS policy assignment revisions for a given OS policy
  5311  // assignment.
  5312  //
  5313  // - name: The name of the OS policy assignment to list revisions for.
  5314  func (r *ProjectsLocationsOsPolicyAssignmentsService) ListRevisions(name string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5315  	c := &ProjectsLocationsOsPolicyAssignmentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5316  	c.name = name
  5317  	return c
  5318  }
  5319  
  5320  // PageSize sets the optional parameter "pageSize": The maximum number of
  5321  // revisions to return.
  5322  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5323  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5324  	return c
  5325  }
  5326  
  5327  // PageToken sets the optional parameter "pageToken": A pagination token
  5328  // returned from a previous call to `ListOSPolicyAssignmentRevisions` that
  5329  // indicates where this listing should continue from.
  5330  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5331  	c.urlParams_.Set("pageToken", pageToken)
  5332  	return c
  5333  }
  5334  
  5335  // Fields allows partial responses to be retrieved. See
  5336  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5337  // details.
  5338  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5339  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5340  	return c
  5341  }
  5342  
  5343  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5344  // object's ETag matches the given value. This is useful for getting updates
  5345  // only after the object has changed since the last request.
  5346  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5347  	c.ifNoneMatch_ = entityTag
  5348  	return c
  5349  }
  5350  
  5351  // Context sets the context to be used in this call's Do method.
  5352  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
  5353  	c.ctx_ = ctx
  5354  	return c
  5355  }
  5356  
  5357  // Header returns a http.Header that can be modified by the caller to add
  5358  // headers to the request.
  5359  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Header() http.Header {
  5360  	if c.header_ == nil {
  5361  		c.header_ = make(http.Header)
  5362  	}
  5363  	return c.header_
  5364  }
  5365  
  5366  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
  5367  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5368  	if c.ifNoneMatch_ != "" {
  5369  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5370  	}
  5371  	var body io.Reader = nil
  5372  	c.urlParams_.Set("alt", alt)
  5373  	c.urlParams_.Set("prettyPrint", "false")
  5374  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions")
  5375  	urls += "?" + c.urlParams_.Encode()
  5376  	req, err := http.NewRequest("GET", urls, body)
  5377  	if err != nil {
  5378  		return nil, err
  5379  	}
  5380  	req.Header = reqHeaders
  5381  	googleapi.Expand(req.URL, map[string]string{
  5382  		"name": c.name,
  5383  	})
  5384  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5385  }
  5386  
  5387  // Do executes the "osconfig.projects.locations.osPolicyAssignments.listRevisions" call.
  5388  // Any non-2xx status code is an error. Response headers are in either
  5389  // *ListOSPolicyAssignmentRevisionsResponse.ServerResponse.Header or (if a
  5390  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5391  // googleapi.IsNotModified to check whether the returned error was because
  5392  // http.StatusNotModified was returned.
  5393  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentRevisionsResponse, error) {
  5394  	gensupport.SetOptions(c.urlParams_, opts...)
  5395  	res, err := c.doRequest("json")
  5396  	if res != nil && res.StatusCode == http.StatusNotModified {
  5397  		if res.Body != nil {
  5398  			res.Body.Close()
  5399  		}
  5400  		return nil, gensupport.WrapError(&googleapi.Error{
  5401  			Code:   res.StatusCode,
  5402  			Header: res.Header,
  5403  		})
  5404  	}
  5405  	if err != nil {
  5406  		return nil, err
  5407  	}
  5408  	defer googleapi.CloseBody(res)
  5409  	if err := googleapi.CheckResponse(res); err != nil {
  5410  		return nil, gensupport.WrapError(err)
  5411  	}
  5412  	ret := &ListOSPolicyAssignmentRevisionsResponse{
  5413  		ServerResponse: googleapi.ServerResponse{
  5414  			Header:         res.Header,
  5415  			HTTPStatusCode: res.StatusCode,
  5416  		},
  5417  	}
  5418  	target := &ret
  5419  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5420  		return nil, err
  5421  	}
  5422  	return ret, nil
  5423  }
  5424  
  5425  // Pages invokes f for each page of results.
  5426  // A non-nil error returned from f will halt the iteration.
  5427  // The provided context supersedes any context provided to the Context method.
  5428  func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentRevisionsResponse) error) error {
  5429  	c.ctx_ = ctx
  5430  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5431  	for {
  5432  		x, err := c.Do()
  5433  		if err != nil {
  5434  			return err
  5435  		}
  5436  		if err := f(x); err != nil {
  5437  			return err
  5438  		}
  5439  		if x.NextPageToken == "" {
  5440  			return nil
  5441  		}
  5442  		c.PageToken(x.NextPageToken)
  5443  	}
  5444  }
  5445  
  5446  type ProjectsLocationsOsPolicyAssignmentsPatchCall struct {
  5447  	s                  *Service
  5448  	name               string
  5449  	ospolicyassignment *OSPolicyAssignment
  5450  	urlParams_         gensupport.URLParams
  5451  	ctx_               context.Context
  5452  	header_            http.Header
  5453  }
  5454  
  5455  // Patch: Update an existing OS policy assignment. This method creates a new
  5456  // revision of the OS policy assignment. This method returns a long running
  5457  // operation (LRO) that contains the rollout details. The rollout can be
  5458  // cancelled by cancelling the LRO. For more information, see Method:
  5459  // projects.locations.osPolicyAssignments.operations.cancel
  5460  // (https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  5461  //
  5462  //   - name: Resource name. Format:
  5463  //     `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_pol
  5464  //     icy_assignment_id}` This field is ignored when you create an OS policy
  5465  //     assignment.
  5466  func (r *ProjectsLocationsOsPolicyAssignmentsService) Patch(name string, ospolicyassignment *OSPolicyAssignment) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5467  	c := &ProjectsLocationsOsPolicyAssignmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5468  	c.name = name
  5469  	c.ospolicyassignment = ospolicyassignment
  5470  	return c
  5471  }
  5472  
  5473  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
  5474  // the OS policy assignment is not found, a new OS policy assignment will be
  5475  // created. In this situation, `update_mask` is ignored.
  5476  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5477  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  5478  	return c
  5479  }
  5480  
  5481  // RequestId sets the optional parameter "requestId": A unique identifier for
  5482  // this request. Restricted to 36 ASCII characters. A random UUID is
  5483  // recommended. This request is only idempotent if a `request_id` is provided.
  5484  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5485  	c.urlParams_.Set("requestId", requestId)
  5486  	return c
  5487  }
  5488  
  5489  // UpdateMask sets the optional parameter "updateMask": Field mask that
  5490  // controls which fields of the assignment should be updated.
  5491  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5492  	c.urlParams_.Set("updateMask", updateMask)
  5493  	return c
  5494  }
  5495  
  5496  // Fields allows partial responses to be retrieved. See
  5497  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5498  // details.
  5499  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5500  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5501  	return c
  5502  }
  5503  
  5504  // Context sets the context to be used in this call's Do method.
  5505  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
  5506  	c.ctx_ = ctx
  5507  	return c
  5508  }
  5509  
  5510  // Header returns a http.Header that can be modified by the caller to add
  5511  // headers to the request.
  5512  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Header() http.Header {
  5513  	if c.header_ == nil {
  5514  		c.header_ = make(http.Header)
  5515  	}
  5516  	return c.header_
  5517  }
  5518  
  5519  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) doRequest(alt string) (*http.Response, error) {
  5520  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5521  	var body io.Reader = nil
  5522  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ospolicyassignment)
  5523  	if err != nil {
  5524  		return nil, err
  5525  	}
  5526  	c.urlParams_.Set("alt", alt)
  5527  	c.urlParams_.Set("prettyPrint", "false")
  5528  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5529  	urls += "?" + c.urlParams_.Encode()
  5530  	req, err := http.NewRequest("PATCH", urls, body)
  5531  	if err != nil {
  5532  		return nil, err
  5533  	}
  5534  	req.Header = reqHeaders
  5535  	googleapi.Expand(req.URL, map[string]string{
  5536  		"name": c.name,
  5537  	})
  5538  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5539  }
  5540  
  5541  // Do executes the "osconfig.projects.locations.osPolicyAssignments.patch" call.
  5542  // Any non-2xx status code is an error. Response headers are in either
  5543  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5544  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5545  // whether the returned error was because http.StatusNotModified was returned.
  5546  func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5547  	gensupport.SetOptions(c.urlParams_, opts...)
  5548  	res, err := c.doRequest("json")
  5549  	if res != nil && res.StatusCode == http.StatusNotModified {
  5550  		if res.Body != nil {
  5551  			res.Body.Close()
  5552  		}
  5553  		return nil, gensupport.WrapError(&googleapi.Error{
  5554  			Code:   res.StatusCode,
  5555  			Header: res.Header,
  5556  		})
  5557  	}
  5558  	if err != nil {
  5559  		return nil, err
  5560  	}
  5561  	defer googleapi.CloseBody(res)
  5562  	if err := googleapi.CheckResponse(res); err != nil {
  5563  		return nil, gensupport.WrapError(err)
  5564  	}
  5565  	ret := &Operation{
  5566  		ServerResponse: googleapi.ServerResponse{
  5567  			Header:         res.Header,
  5568  			HTTPStatusCode: res.StatusCode,
  5569  		},
  5570  	}
  5571  	target := &ret
  5572  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5573  		return nil, err
  5574  	}
  5575  	return ret, nil
  5576  }
  5577  
  5578  type ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall struct {
  5579  	s                      *Service
  5580  	name                   string
  5581  	canceloperationrequest *CancelOperationRequest
  5582  	urlParams_             gensupport.URLParams
  5583  	ctx_                   context.Context
  5584  	header_                http.Header
  5585  }
  5586  
  5587  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5588  // server makes a best effort to cancel the operation, but success is not
  5589  // guaranteed. If the server doesn't support this method, it returns
  5590  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5591  // other methods to check whether the cancellation succeeded or whether the
  5592  // operation completed despite cancellation. On successful cancellation, the
  5593  // operation is not deleted; instead, it becomes an operation with an
  5594  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5595  // `Code.CANCELLED`.
  5596  //
  5597  // - name: The name of the operation resource to be cancelled.
  5598  func (r *ProjectsLocationsOsPolicyAssignmentsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
  5599  	c := &ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5600  	c.name = name
  5601  	c.canceloperationrequest = canceloperationrequest
  5602  	return c
  5603  }
  5604  
  5605  // Fields allows partial responses to be retrieved. See
  5606  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5607  // details.
  5608  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
  5609  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5610  	return c
  5611  }
  5612  
  5613  // Context sets the context to be used in this call's Do method.
  5614  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
  5615  	c.ctx_ = ctx
  5616  	return c
  5617  }
  5618  
  5619  // Header returns a http.Header that can be modified by the caller to add
  5620  // headers to the request.
  5621  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Header() http.Header {
  5622  	if c.header_ == nil {
  5623  		c.header_ = make(http.Header)
  5624  	}
  5625  	return c.header_
  5626  }
  5627  
  5628  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5629  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5630  	var body io.Reader = nil
  5631  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  5632  	if err != nil {
  5633  		return nil, err
  5634  	}
  5635  	c.urlParams_.Set("alt", alt)
  5636  	c.urlParams_.Set("prettyPrint", "false")
  5637  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5638  	urls += "?" + c.urlParams_.Encode()
  5639  	req, err := http.NewRequest("POST", urls, body)
  5640  	if err != nil {
  5641  		return nil, err
  5642  	}
  5643  	req.Header = reqHeaders
  5644  	googleapi.Expand(req.URL, map[string]string{
  5645  		"name": c.name,
  5646  	})
  5647  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5648  }
  5649  
  5650  // Do executes the "osconfig.projects.locations.osPolicyAssignments.operations.cancel" call.
  5651  // Any non-2xx status code is an error. Response headers are in either
  5652  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5653  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5654  // whether the returned error was because http.StatusNotModified was returned.
  5655  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5656  	gensupport.SetOptions(c.urlParams_, opts...)
  5657  	res, err := c.doRequest("json")
  5658  	if res != nil && res.StatusCode == http.StatusNotModified {
  5659  		if res.Body != nil {
  5660  			res.Body.Close()
  5661  		}
  5662  		return nil, gensupport.WrapError(&googleapi.Error{
  5663  			Code:   res.StatusCode,
  5664  			Header: res.Header,
  5665  		})
  5666  	}
  5667  	if err != nil {
  5668  		return nil, err
  5669  	}
  5670  	defer googleapi.CloseBody(res)
  5671  	if err := googleapi.CheckResponse(res); err != nil {
  5672  		return nil, gensupport.WrapError(err)
  5673  	}
  5674  	ret := &Empty{
  5675  		ServerResponse: googleapi.ServerResponse{
  5676  			Header:         res.Header,
  5677  			HTTPStatusCode: res.StatusCode,
  5678  		},
  5679  	}
  5680  	target := &ret
  5681  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5682  		return nil, err
  5683  	}
  5684  	return ret, nil
  5685  }
  5686  
  5687  type ProjectsLocationsOsPolicyAssignmentsOperationsGetCall struct {
  5688  	s            *Service
  5689  	name         string
  5690  	urlParams_   gensupport.URLParams
  5691  	ifNoneMatch_ string
  5692  	ctx_         context.Context
  5693  	header_      http.Header
  5694  }
  5695  
  5696  // Get: Gets the latest state of a long-running operation. Clients can use this
  5697  // method to poll the operation result at intervals as recommended by the API
  5698  // service.
  5699  //
  5700  // - name: The name of the operation resource.
  5701  func (r *ProjectsLocationsOsPolicyAssignmentsOperationsService) Get(name string) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
  5702  	c := &ProjectsLocationsOsPolicyAssignmentsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5703  	c.name = name
  5704  	return c
  5705  }
  5706  
  5707  // Fields allows partial responses to be retrieved. See
  5708  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5709  // details.
  5710  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
  5711  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5712  	return c
  5713  }
  5714  
  5715  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5716  // object's ETag matches the given value. This is useful for getting updates
  5717  // only after the object has changed since the last request.
  5718  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
  5719  	c.ifNoneMatch_ = entityTag
  5720  	return c
  5721  }
  5722  
  5723  // Context sets the context to be used in this call's Do method.
  5724  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
  5725  	c.ctx_ = ctx
  5726  	return c
  5727  }
  5728  
  5729  // Header returns a http.Header that can be modified by the caller to add
  5730  // headers to the request.
  5731  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Header() http.Header {
  5732  	if c.header_ == nil {
  5733  		c.header_ = make(http.Header)
  5734  	}
  5735  	return c.header_
  5736  }
  5737  
  5738  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5739  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5740  	if c.ifNoneMatch_ != "" {
  5741  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5742  	}
  5743  	var body io.Reader = nil
  5744  	c.urlParams_.Set("alt", alt)
  5745  	c.urlParams_.Set("prettyPrint", "false")
  5746  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5747  	urls += "?" + c.urlParams_.Encode()
  5748  	req, err := http.NewRequest("GET", urls, body)
  5749  	if err != nil {
  5750  		return nil, err
  5751  	}
  5752  	req.Header = reqHeaders
  5753  	googleapi.Expand(req.URL, map[string]string{
  5754  		"name": c.name,
  5755  	})
  5756  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5757  }
  5758  
  5759  // Do executes the "osconfig.projects.locations.osPolicyAssignments.operations.get" call.
  5760  // Any non-2xx status code is an error. Response headers are in either
  5761  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5762  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5763  // whether the returned error was because http.StatusNotModified was returned.
  5764  func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5765  	gensupport.SetOptions(c.urlParams_, opts...)
  5766  	res, err := c.doRequest("json")
  5767  	if res != nil && res.StatusCode == http.StatusNotModified {
  5768  		if res.Body != nil {
  5769  			res.Body.Close()
  5770  		}
  5771  		return nil, gensupport.WrapError(&googleapi.Error{
  5772  			Code:   res.StatusCode,
  5773  			Header: res.Header,
  5774  		})
  5775  	}
  5776  	if err != nil {
  5777  		return nil, err
  5778  	}
  5779  	defer googleapi.CloseBody(res)
  5780  	if err := googleapi.CheckResponse(res); err != nil {
  5781  		return nil, gensupport.WrapError(err)
  5782  	}
  5783  	ret := &Operation{
  5784  		ServerResponse: googleapi.ServerResponse{
  5785  			Header:         res.Header,
  5786  			HTTPStatusCode: res.StatusCode,
  5787  		},
  5788  	}
  5789  	target := &ret
  5790  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5791  		return nil, err
  5792  	}
  5793  	return ret, nil
  5794  }
  5795  
  5796  type ProjectsPatchDeploymentsCreateCall struct {
  5797  	s               *Service
  5798  	parent          string
  5799  	patchdeployment *PatchDeployment
  5800  	urlParams_      gensupport.URLParams
  5801  	ctx_            context.Context
  5802  	header_         http.Header
  5803  }
  5804  
  5805  // Create: Create an OS Config patch deployment.
  5806  //
  5807  //   - parent: The project to apply this patch deployment to in the form
  5808  //     `projects/*`.
  5809  func (r *ProjectsPatchDeploymentsService) Create(parent string, patchdeployment *PatchDeployment) *ProjectsPatchDeploymentsCreateCall {
  5810  	c := &ProjectsPatchDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5811  	c.parent = parent
  5812  	c.patchdeployment = patchdeployment
  5813  	return c
  5814  }
  5815  
  5816  // PatchDeploymentId sets the optional parameter "patchDeploymentId": Required.
  5817  // A name for the patch deployment in the project. When creating a name the
  5818  // following rules apply: * Must contain only lowercase letters, numbers, and
  5819  // hyphens. * Must start with a letter. * Must be between 1-63 characters. *
  5820  // Must end with a number or a letter. * Must be unique within the project.
  5821  func (c *ProjectsPatchDeploymentsCreateCall) PatchDeploymentId(patchDeploymentId string) *ProjectsPatchDeploymentsCreateCall {
  5822  	c.urlParams_.Set("patchDeploymentId", patchDeploymentId)
  5823  	return c
  5824  }
  5825  
  5826  // Fields allows partial responses to be retrieved. See
  5827  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5828  // details.
  5829  func (c *ProjectsPatchDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsCreateCall {
  5830  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5831  	return c
  5832  }
  5833  
  5834  // Context sets the context to be used in this call's Do method.
  5835  func (c *ProjectsPatchDeploymentsCreateCall) Context(ctx context.Context) *ProjectsPatchDeploymentsCreateCall {
  5836  	c.ctx_ = ctx
  5837  	return c
  5838  }
  5839  
  5840  // Header returns a http.Header that can be modified by the caller to add
  5841  // headers to the request.
  5842  func (c *ProjectsPatchDeploymentsCreateCall) Header() http.Header {
  5843  	if c.header_ == nil {
  5844  		c.header_ = make(http.Header)
  5845  	}
  5846  	return c.header_
  5847  }
  5848  
  5849  func (c *ProjectsPatchDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
  5850  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5851  	var body io.Reader = nil
  5852  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.patchdeployment)
  5853  	if err != nil {
  5854  		return nil, err
  5855  	}
  5856  	c.urlParams_.Set("alt", alt)
  5857  	c.urlParams_.Set("prettyPrint", "false")
  5858  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchDeployments")
  5859  	urls += "?" + c.urlParams_.Encode()
  5860  	req, err := http.NewRequest("POST", urls, body)
  5861  	if err != nil {
  5862  		return nil, err
  5863  	}
  5864  	req.Header = reqHeaders
  5865  	googleapi.Expand(req.URL, map[string]string{
  5866  		"parent": c.parent,
  5867  	})
  5868  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5869  }
  5870  
  5871  // Do executes the "osconfig.projects.patchDeployments.create" call.
  5872  // Any non-2xx status code is an error. Response headers are in either
  5873  // *PatchDeployment.ServerResponse.Header or (if a response was returned at
  5874  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5875  // check whether the returned error was because http.StatusNotModified was
  5876  // returned.
  5877  func (c *ProjectsPatchDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
  5878  	gensupport.SetOptions(c.urlParams_, opts...)
  5879  	res, err := c.doRequest("json")
  5880  	if res != nil && res.StatusCode == http.StatusNotModified {
  5881  		if res.Body != nil {
  5882  			res.Body.Close()
  5883  		}
  5884  		return nil, gensupport.WrapError(&googleapi.Error{
  5885  			Code:   res.StatusCode,
  5886  			Header: res.Header,
  5887  		})
  5888  	}
  5889  	if err != nil {
  5890  		return nil, err
  5891  	}
  5892  	defer googleapi.CloseBody(res)
  5893  	if err := googleapi.CheckResponse(res); err != nil {
  5894  		return nil, gensupport.WrapError(err)
  5895  	}
  5896  	ret := &PatchDeployment{
  5897  		ServerResponse: googleapi.ServerResponse{
  5898  			Header:         res.Header,
  5899  			HTTPStatusCode: res.StatusCode,
  5900  		},
  5901  	}
  5902  	target := &ret
  5903  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5904  		return nil, err
  5905  	}
  5906  	return ret, nil
  5907  }
  5908  
  5909  type ProjectsPatchDeploymentsDeleteCall struct {
  5910  	s          *Service
  5911  	name       string
  5912  	urlParams_ gensupport.URLParams
  5913  	ctx_       context.Context
  5914  	header_    http.Header
  5915  }
  5916  
  5917  // Delete: Delete an OS Config patch deployment.
  5918  //
  5919  //   - name: The resource name of the patch deployment in the form
  5920  //     `projects/*/patchDeployments/*`.
  5921  func (r *ProjectsPatchDeploymentsService) Delete(name string) *ProjectsPatchDeploymentsDeleteCall {
  5922  	c := &ProjectsPatchDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5923  	c.name = name
  5924  	return c
  5925  }
  5926  
  5927  // Fields allows partial responses to be retrieved. See
  5928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5929  // details.
  5930  func (c *ProjectsPatchDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsDeleteCall {
  5931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5932  	return c
  5933  }
  5934  
  5935  // Context sets the context to be used in this call's Do method.
  5936  func (c *ProjectsPatchDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsPatchDeploymentsDeleteCall {
  5937  	c.ctx_ = ctx
  5938  	return c
  5939  }
  5940  
  5941  // Header returns a http.Header that can be modified by the caller to add
  5942  // headers to the request.
  5943  func (c *ProjectsPatchDeploymentsDeleteCall) Header() http.Header {
  5944  	if c.header_ == nil {
  5945  		c.header_ = make(http.Header)
  5946  	}
  5947  	return c.header_
  5948  }
  5949  
  5950  func (c *ProjectsPatchDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5951  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5952  	var body io.Reader = nil
  5953  	c.urlParams_.Set("alt", alt)
  5954  	c.urlParams_.Set("prettyPrint", "false")
  5955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5956  	urls += "?" + c.urlParams_.Encode()
  5957  	req, err := http.NewRequest("DELETE", urls, body)
  5958  	if err != nil {
  5959  		return nil, err
  5960  	}
  5961  	req.Header = reqHeaders
  5962  	googleapi.Expand(req.URL, map[string]string{
  5963  		"name": c.name,
  5964  	})
  5965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5966  }
  5967  
  5968  // Do executes the "osconfig.projects.patchDeployments.delete" call.
  5969  // Any non-2xx status code is an error. Response headers are in either
  5970  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5971  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5972  // whether the returned error was because http.StatusNotModified was returned.
  5973  func (c *ProjectsPatchDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5974  	gensupport.SetOptions(c.urlParams_, opts...)
  5975  	res, err := c.doRequest("json")
  5976  	if res != nil && res.StatusCode == http.StatusNotModified {
  5977  		if res.Body != nil {
  5978  			res.Body.Close()
  5979  		}
  5980  		return nil, gensupport.WrapError(&googleapi.Error{
  5981  			Code:   res.StatusCode,
  5982  			Header: res.Header,
  5983  		})
  5984  	}
  5985  	if err != nil {
  5986  		return nil, err
  5987  	}
  5988  	defer googleapi.CloseBody(res)
  5989  	if err := googleapi.CheckResponse(res); err != nil {
  5990  		return nil, gensupport.WrapError(err)
  5991  	}
  5992  	ret := &Empty{
  5993  		ServerResponse: googleapi.ServerResponse{
  5994  			Header:         res.Header,
  5995  			HTTPStatusCode: res.StatusCode,
  5996  		},
  5997  	}
  5998  	target := &ret
  5999  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6000  		return nil, err
  6001  	}
  6002  	return ret, nil
  6003  }
  6004  
  6005  type ProjectsPatchDeploymentsGetCall struct {
  6006  	s            *Service
  6007  	name         string
  6008  	urlParams_   gensupport.URLParams
  6009  	ifNoneMatch_ string
  6010  	ctx_         context.Context
  6011  	header_      http.Header
  6012  }
  6013  
  6014  // Get: Get an OS Config patch deployment.
  6015  //
  6016  //   - name: The resource name of the patch deployment in the form
  6017  //     `projects/*/patchDeployments/*`.
  6018  func (r *ProjectsPatchDeploymentsService) Get(name string) *ProjectsPatchDeploymentsGetCall {
  6019  	c := &ProjectsPatchDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6020  	c.name = name
  6021  	return c
  6022  }
  6023  
  6024  // Fields allows partial responses to be retrieved. See
  6025  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6026  // details.
  6027  func (c *ProjectsPatchDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsGetCall {
  6028  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6029  	return c
  6030  }
  6031  
  6032  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6033  // object's ETag matches the given value. This is useful for getting updates
  6034  // only after the object has changed since the last request.
  6035  func (c *ProjectsPatchDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsPatchDeploymentsGetCall {
  6036  	c.ifNoneMatch_ = entityTag
  6037  	return c
  6038  }
  6039  
  6040  // Context sets the context to be used in this call's Do method.
  6041  func (c *ProjectsPatchDeploymentsGetCall) Context(ctx context.Context) *ProjectsPatchDeploymentsGetCall {
  6042  	c.ctx_ = ctx
  6043  	return c
  6044  }
  6045  
  6046  // Header returns a http.Header that can be modified by the caller to add
  6047  // headers to the request.
  6048  func (c *ProjectsPatchDeploymentsGetCall) Header() http.Header {
  6049  	if c.header_ == nil {
  6050  		c.header_ = make(http.Header)
  6051  	}
  6052  	return c.header_
  6053  }
  6054  
  6055  func (c *ProjectsPatchDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  6056  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6057  	if c.ifNoneMatch_ != "" {
  6058  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6059  	}
  6060  	var body io.Reader = nil
  6061  	c.urlParams_.Set("alt", alt)
  6062  	c.urlParams_.Set("prettyPrint", "false")
  6063  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6064  	urls += "?" + c.urlParams_.Encode()
  6065  	req, err := http.NewRequest("GET", urls, body)
  6066  	if err != nil {
  6067  		return nil, err
  6068  	}
  6069  	req.Header = reqHeaders
  6070  	googleapi.Expand(req.URL, map[string]string{
  6071  		"name": c.name,
  6072  	})
  6073  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6074  }
  6075  
  6076  // Do executes the "osconfig.projects.patchDeployments.get" call.
  6077  // Any non-2xx status code is an error. Response headers are in either
  6078  // *PatchDeployment.ServerResponse.Header or (if a response was returned at
  6079  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6080  // check whether the returned error was because http.StatusNotModified was
  6081  // returned.
  6082  func (c *ProjectsPatchDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
  6083  	gensupport.SetOptions(c.urlParams_, opts...)
  6084  	res, err := c.doRequest("json")
  6085  	if res != nil && res.StatusCode == http.StatusNotModified {
  6086  		if res.Body != nil {
  6087  			res.Body.Close()
  6088  		}
  6089  		return nil, gensupport.WrapError(&googleapi.Error{
  6090  			Code:   res.StatusCode,
  6091  			Header: res.Header,
  6092  		})
  6093  	}
  6094  	if err != nil {
  6095  		return nil, err
  6096  	}
  6097  	defer googleapi.CloseBody(res)
  6098  	if err := googleapi.CheckResponse(res); err != nil {
  6099  		return nil, gensupport.WrapError(err)
  6100  	}
  6101  	ret := &PatchDeployment{
  6102  		ServerResponse: googleapi.ServerResponse{
  6103  			Header:         res.Header,
  6104  			HTTPStatusCode: res.StatusCode,
  6105  		},
  6106  	}
  6107  	target := &ret
  6108  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6109  		return nil, err
  6110  	}
  6111  	return ret, nil
  6112  }
  6113  
  6114  type ProjectsPatchDeploymentsListCall struct {
  6115  	s            *Service
  6116  	parent       string
  6117  	urlParams_   gensupport.URLParams
  6118  	ifNoneMatch_ string
  6119  	ctx_         context.Context
  6120  	header_      http.Header
  6121  }
  6122  
  6123  // List: Get a page of OS Config patch deployments.
  6124  //
  6125  // - parent: The resource name of the parent in the form `projects/*`.
  6126  func (r *ProjectsPatchDeploymentsService) List(parent string) *ProjectsPatchDeploymentsListCall {
  6127  	c := &ProjectsPatchDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6128  	c.parent = parent
  6129  	return c
  6130  }
  6131  
  6132  // PageSize sets the optional parameter "pageSize": The maximum number of patch
  6133  // deployments to return. Default is 100.
  6134  func (c *ProjectsPatchDeploymentsListCall) PageSize(pageSize int64) *ProjectsPatchDeploymentsListCall {
  6135  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6136  	return c
  6137  }
  6138  
  6139  // PageToken sets the optional parameter "pageToken": A pagination token
  6140  // returned from a previous call to ListPatchDeployments that indicates where
  6141  // this listing should continue from.
  6142  func (c *ProjectsPatchDeploymentsListCall) PageToken(pageToken string) *ProjectsPatchDeploymentsListCall {
  6143  	c.urlParams_.Set("pageToken", pageToken)
  6144  	return c
  6145  }
  6146  
  6147  // Fields allows partial responses to be retrieved. See
  6148  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6149  // details.
  6150  func (c *ProjectsPatchDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsListCall {
  6151  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6152  	return c
  6153  }
  6154  
  6155  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6156  // object's ETag matches the given value. This is useful for getting updates
  6157  // only after the object has changed since the last request.
  6158  func (c *ProjectsPatchDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsPatchDeploymentsListCall {
  6159  	c.ifNoneMatch_ = entityTag
  6160  	return c
  6161  }
  6162  
  6163  // Context sets the context to be used in this call's Do method.
  6164  func (c *ProjectsPatchDeploymentsListCall) Context(ctx context.Context) *ProjectsPatchDeploymentsListCall {
  6165  	c.ctx_ = ctx
  6166  	return c
  6167  }
  6168  
  6169  // Header returns a http.Header that can be modified by the caller to add
  6170  // headers to the request.
  6171  func (c *ProjectsPatchDeploymentsListCall) Header() http.Header {
  6172  	if c.header_ == nil {
  6173  		c.header_ = make(http.Header)
  6174  	}
  6175  	return c.header_
  6176  }
  6177  
  6178  func (c *ProjectsPatchDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  6179  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6180  	if c.ifNoneMatch_ != "" {
  6181  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6182  	}
  6183  	var body io.Reader = nil
  6184  	c.urlParams_.Set("alt", alt)
  6185  	c.urlParams_.Set("prettyPrint", "false")
  6186  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchDeployments")
  6187  	urls += "?" + c.urlParams_.Encode()
  6188  	req, err := http.NewRequest("GET", urls, body)
  6189  	if err != nil {
  6190  		return nil, err
  6191  	}
  6192  	req.Header = reqHeaders
  6193  	googleapi.Expand(req.URL, map[string]string{
  6194  		"parent": c.parent,
  6195  	})
  6196  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6197  }
  6198  
  6199  // Do executes the "osconfig.projects.patchDeployments.list" call.
  6200  // Any non-2xx status code is an error. Response headers are in either
  6201  // *ListPatchDeploymentsResponse.ServerResponse.Header or (if a response was
  6202  // returned at all) in error.(*googleapi.Error).Header. Use
  6203  // googleapi.IsNotModified to check whether the returned error was because
  6204  // http.StatusNotModified was returned.
  6205  func (c *ProjectsPatchDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListPatchDeploymentsResponse, error) {
  6206  	gensupport.SetOptions(c.urlParams_, opts...)
  6207  	res, err := c.doRequest("json")
  6208  	if res != nil && res.StatusCode == http.StatusNotModified {
  6209  		if res.Body != nil {
  6210  			res.Body.Close()
  6211  		}
  6212  		return nil, gensupport.WrapError(&googleapi.Error{
  6213  			Code:   res.StatusCode,
  6214  			Header: res.Header,
  6215  		})
  6216  	}
  6217  	if err != nil {
  6218  		return nil, err
  6219  	}
  6220  	defer googleapi.CloseBody(res)
  6221  	if err := googleapi.CheckResponse(res); err != nil {
  6222  		return nil, gensupport.WrapError(err)
  6223  	}
  6224  	ret := &ListPatchDeploymentsResponse{
  6225  		ServerResponse: googleapi.ServerResponse{
  6226  			Header:         res.Header,
  6227  			HTTPStatusCode: res.StatusCode,
  6228  		},
  6229  	}
  6230  	target := &ret
  6231  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6232  		return nil, err
  6233  	}
  6234  	return ret, nil
  6235  }
  6236  
  6237  // Pages invokes f for each page of results.
  6238  // A non-nil error returned from f will halt the iteration.
  6239  // The provided context supersedes any context provided to the Context method.
  6240  func (c *ProjectsPatchDeploymentsListCall) Pages(ctx context.Context, f func(*ListPatchDeploymentsResponse) error) error {
  6241  	c.ctx_ = ctx
  6242  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6243  	for {
  6244  		x, err := c.Do()
  6245  		if err != nil {
  6246  			return err
  6247  		}
  6248  		if err := f(x); err != nil {
  6249  			return err
  6250  		}
  6251  		if x.NextPageToken == "" {
  6252  			return nil
  6253  		}
  6254  		c.PageToken(x.NextPageToken)
  6255  	}
  6256  }
  6257  
  6258  type ProjectsPatchDeploymentsPatchCall struct {
  6259  	s               *Service
  6260  	name            string
  6261  	patchdeployment *PatchDeployment
  6262  	urlParams_      gensupport.URLParams
  6263  	ctx_            context.Context
  6264  	header_         http.Header
  6265  }
  6266  
  6267  // Patch: Update an OS Config patch deployment.
  6268  //
  6269  //   - name: Unique name for the patch deployment resource in a project. The
  6270  //     patch deployment name is in the form:
  6271  //     `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field
  6272  //     is ignored when you create a new patch deployment.
  6273  func (r *ProjectsPatchDeploymentsService) Patch(name string, patchdeployment *PatchDeployment) *ProjectsPatchDeploymentsPatchCall {
  6274  	c := &ProjectsPatchDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6275  	c.name = name
  6276  	c.patchdeployment = patchdeployment
  6277  	return c
  6278  }
  6279  
  6280  // UpdateMask sets the optional parameter "updateMask": Field mask that
  6281  // controls which fields of the patch deployment should be updated.
  6282  func (c *ProjectsPatchDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsPatchDeploymentsPatchCall {
  6283  	c.urlParams_.Set("updateMask", updateMask)
  6284  	return c
  6285  }
  6286  
  6287  // Fields allows partial responses to be retrieved. See
  6288  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6289  // details.
  6290  func (c *ProjectsPatchDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsPatchCall {
  6291  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6292  	return c
  6293  }
  6294  
  6295  // Context sets the context to be used in this call's Do method.
  6296  func (c *ProjectsPatchDeploymentsPatchCall) Context(ctx context.Context) *ProjectsPatchDeploymentsPatchCall {
  6297  	c.ctx_ = ctx
  6298  	return c
  6299  }
  6300  
  6301  // Header returns a http.Header that can be modified by the caller to add
  6302  // headers to the request.
  6303  func (c *ProjectsPatchDeploymentsPatchCall) Header() http.Header {
  6304  	if c.header_ == nil {
  6305  		c.header_ = make(http.Header)
  6306  	}
  6307  	return c.header_
  6308  }
  6309  
  6310  func (c *ProjectsPatchDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  6311  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6312  	var body io.Reader = nil
  6313  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.patchdeployment)
  6314  	if err != nil {
  6315  		return nil, err
  6316  	}
  6317  	c.urlParams_.Set("alt", alt)
  6318  	c.urlParams_.Set("prettyPrint", "false")
  6319  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6320  	urls += "?" + c.urlParams_.Encode()
  6321  	req, err := http.NewRequest("PATCH", urls, body)
  6322  	if err != nil {
  6323  		return nil, err
  6324  	}
  6325  	req.Header = reqHeaders
  6326  	googleapi.Expand(req.URL, map[string]string{
  6327  		"name": c.name,
  6328  	})
  6329  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6330  }
  6331  
  6332  // Do executes the "osconfig.projects.patchDeployments.patch" call.
  6333  // Any non-2xx status code is an error. Response headers are in either
  6334  // *PatchDeployment.ServerResponse.Header or (if a response was returned at
  6335  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6336  // check whether the returned error was because http.StatusNotModified was
  6337  // returned.
  6338  func (c *ProjectsPatchDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
  6339  	gensupport.SetOptions(c.urlParams_, opts...)
  6340  	res, err := c.doRequest("json")
  6341  	if res != nil && res.StatusCode == http.StatusNotModified {
  6342  		if res.Body != nil {
  6343  			res.Body.Close()
  6344  		}
  6345  		return nil, gensupport.WrapError(&googleapi.Error{
  6346  			Code:   res.StatusCode,
  6347  			Header: res.Header,
  6348  		})
  6349  	}
  6350  	if err != nil {
  6351  		return nil, err
  6352  	}
  6353  	defer googleapi.CloseBody(res)
  6354  	if err := googleapi.CheckResponse(res); err != nil {
  6355  		return nil, gensupport.WrapError(err)
  6356  	}
  6357  	ret := &PatchDeployment{
  6358  		ServerResponse: googleapi.ServerResponse{
  6359  			Header:         res.Header,
  6360  			HTTPStatusCode: res.StatusCode,
  6361  		},
  6362  	}
  6363  	target := &ret
  6364  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6365  		return nil, err
  6366  	}
  6367  	return ret, nil
  6368  }
  6369  
  6370  type ProjectsPatchDeploymentsPauseCall struct {
  6371  	s                           *Service
  6372  	name                        string
  6373  	pausepatchdeploymentrequest *PausePatchDeploymentRequest
  6374  	urlParams_                  gensupport.URLParams
  6375  	ctx_                        context.Context
  6376  	header_                     http.Header
  6377  }
  6378  
  6379  // Pause: Change state of patch deployment to "PAUSED". Patch deployment in
  6380  // paused state doesn't generate patch jobs.
  6381  //
  6382  //   - name: The resource name of the patch deployment in the form
  6383  //     `projects/*/patchDeployments/*`.
  6384  func (r *ProjectsPatchDeploymentsService) Pause(name string, pausepatchdeploymentrequest *PausePatchDeploymentRequest) *ProjectsPatchDeploymentsPauseCall {
  6385  	c := &ProjectsPatchDeploymentsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6386  	c.name = name
  6387  	c.pausepatchdeploymentrequest = pausepatchdeploymentrequest
  6388  	return c
  6389  }
  6390  
  6391  // Fields allows partial responses to be retrieved. See
  6392  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6393  // details.
  6394  func (c *ProjectsPatchDeploymentsPauseCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsPauseCall {
  6395  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6396  	return c
  6397  }
  6398  
  6399  // Context sets the context to be used in this call's Do method.
  6400  func (c *ProjectsPatchDeploymentsPauseCall) Context(ctx context.Context) *ProjectsPatchDeploymentsPauseCall {
  6401  	c.ctx_ = ctx
  6402  	return c
  6403  }
  6404  
  6405  // Header returns a http.Header that can be modified by the caller to add
  6406  // headers to the request.
  6407  func (c *ProjectsPatchDeploymentsPauseCall) Header() http.Header {
  6408  	if c.header_ == nil {
  6409  		c.header_ = make(http.Header)
  6410  	}
  6411  	return c.header_
  6412  }
  6413  
  6414  func (c *ProjectsPatchDeploymentsPauseCall) doRequest(alt string) (*http.Response, error) {
  6415  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6416  	var body io.Reader = nil
  6417  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausepatchdeploymentrequest)
  6418  	if err != nil {
  6419  		return nil, err
  6420  	}
  6421  	c.urlParams_.Set("alt", alt)
  6422  	c.urlParams_.Set("prettyPrint", "false")
  6423  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause")
  6424  	urls += "?" + c.urlParams_.Encode()
  6425  	req, err := http.NewRequest("POST", urls, body)
  6426  	if err != nil {
  6427  		return nil, err
  6428  	}
  6429  	req.Header = reqHeaders
  6430  	googleapi.Expand(req.URL, map[string]string{
  6431  		"name": c.name,
  6432  	})
  6433  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6434  }
  6435  
  6436  // Do executes the "osconfig.projects.patchDeployments.pause" call.
  6437  // Any non-2xx status code is an error. Response headers are in either
  6438  // *PatchDeployment.ServerResponse.Header or (if a response was returned at
  6439  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6440  // check whether the returned error was because http.StatusNotModified was
  6441  // returned.
  6442  func (c *ProjectsPatchDeploymentsPauseCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
  6443  	gensupport.SetOptions(c.urlParams_, opts...)
  6444  	res, err := c.doRequest("json")
  6445  	if res != nil && res.StatusCode == http.StatusNotModified {
  6446  		if res.Body != nil {
  6447  			res.Body.Close()
  6448  		}
  6449  		return nil, gensupport.WrapError(&googleapi.Error{
  6450  			Code:   res.StatusCode,
  6451  			Header: res.Header,
  6452  		})
  6453  	}
  6454  	if err != nil {
  6455  		return nil, err
  6456  	}
  6457  	defer googleapi.CloseBody(res)
  6458  	if err := googleapi.CheckResponse(res); err != nil {
  6459  		return nil, gensupport.WrapError(err)
  6460  	}
  6461  	ret := &PatchDeployment{
  6462  		ServerResponse: googleapi.ServerResponse{
  6463  			Header:         res.Header,
  6464  			HTTPStatusCode: res.StatusCode,
  6465  		},
  6466  	}
  6467  	target := &ret
  6468  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6469  		return nil, err
  6470  	}
  6471  	return ret, nil
  6472  }
  6473  
  6474  type ProjectsPatchDeploymentsResumeCall struct {
  6475  	s                            *Service
  6476  	name                         string
  6477  	resumepatchdeploymentrequest *ResumePatchDeploymentRequest
  6478  	urlParams_                   gensupport.URLParams
  6479  	ctx_                         context.Context
  6480  	header_                      http.Header
  6481  }
  6482  
  6483  // Resume: Change state of patch deployment back to "ACTIVE". Patch deployment
  6484  // in active state continues to generate patch jobs.
  6485  //
  6486  //   - name: The resource name of the patch deployment in the form
  6487  //     `projects/*/patchDeployments/*`.
  6488  func (r *ProjectsPatchDeploymentsService) Resume(name string, resumepatchdeploymentrequest *ResumePatchDeploymentRequest) *ProjectsPatchDeploymentsResumeCall {
  6489  	c := &ProjectsPatchDeploymentsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6490  	c.name = name
  6491  	c.resumepatchdeploymentrequest = resumepatchdeploymentrequest
  6492  	return c
  6493  }
  6494  
  6495  // Fields allows partial responses to be retrieved. See
  6496  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6497  // details.
  6498  func (c *ProjectsPatchDeploymentsResumeCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsResumeCall {
  6499  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6500  	return c
  6501  }
  6502  
  6503  // Context sets the context to be used in this call's Do method.
  6504  func (c *ProjectsPatchDeploymentsResumeCall) Context(ctx context.Context) *ProjectsPatchDeploymentsResumeCall {
  6505  	c.ctx_ = ctx
  6506  	return c
  6507  }
  6508  
  6509  // Header returns a http.Header that can be modified by the caller to add
  6510  // headers to the request.
  6511  func (c *ProjectsPatchDeploymentsResumeCall) Header() http.Header {
  6512  	if c.header_ == nil {
  6513  		c.header_ = make(http.Header)
  6514  	}
  6515  	return c.header_
  6516  }
  6517  
  6518  func (c *ProjectsPatchDeploymentsResumeCall) doRequest(alt string) (*http.Response, error) {
  6519  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6520  	var body io.Reader = nil
  6521  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumepatchdeploymentrequest)
  6522  	if err != nil {
  6523  		return nil, err
  6524  	}
  6525  	c.urlParams_.Set("alt", alt)
  6526  	c.urlParams_.Set("prettyPrint", "false")
  6527  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume")
  6528  	urls += "?" + c.urlParams_.Encode()
  6529  	req, err := http.NewRequest("POST", urls, body)
  6530  	if err != nil {
  6531  		return nil, err
  6532  	}
  6533  	req.Header = reqHeaders
  6534  	googleapi.Expand(req.URL, map[string]string{
  6535  		"name": c.name,
  6536  	})
  6537  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6538  }
  6539  
  6540  // Do executes the "osconfig.projects.patchDeployments.resume" call.
  6541  // Any non-2xx status code is an error. Response headers are in either
  6542  // *PatchDeployment.ServerResponse.Header or (if a response was returned at
  6543  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6544  // check whether the returned error was because http.StatusNotModified was
  6545  // returned.
  6546  func (c *ProjectsPatchDeploymentsResumeCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
  6547  	gensupport.SetOptions(c.urlParams_, opts...)
  6548  	res, err := c.doRequest("json")
  6549  	if res != nil && res.StatusCode == http.StatusNotModified {
  6550  		if res.Body != nil {
  6551  			res.Body.Close()
  6552  		}
  6553  		return nil, gensupport.WrapError(&googleapi.Error{
  6554  			Code:   res.StatusCode,
  6555  			Header: res.Header,
  6556  		})
  6557  	}
  6558  	if err != nil {
  6559  		return nil, err
  6560  	}
  6561  	defer googleapi.CloseBody(res)
  6562  	if err := googleapi.CheckResponse(res); err != nil {
  6563  		return nil, gensupport.WrapError(err)
  6564  	}
  6565  	ret := &PatchDeployment{
  6566  		ServerResponse: googleapi.ServerResponse{
  6567  			Header:         res.Header,
  6568  			HTTPStatusCode: res.StatusCode,
  6569  		},
  6570  	}
  6571  	target := &ret
  6572  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6573  		return nil, err
  6574  	}
  6575  	return ret, nil
  6576  }
  6577  
  6578  type ProjectsPatchJobsCancelCall struct {
  6579  	s                     *Service
  6580  	name                  string
  6581  	cancelpatchjobrequest *CancelPatchJobRequest
  6582  	urlParams_            gensupport.URLParams
  6583  	ctx_                  context.Context
  6584  	header_               http.Header
  6585  }
  6586  
  6587  // Cancel: Cancel a patch job. The patch job must be active. Canceled patch
  6588  // jobs cannot be restarted.
  6589  //
  6590  // - name: Name of the patch in the form `projects/*/patchJobs/*`.
  6591  func (r *ProjectsPatchJobsService) Cancel(name string, cancelpatchjobrequest *CancelPatchJobRequest) *ProjectsPatchJobsCancelCall {
  6592  	c := &ProjectsPatchJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6593  	c.name = name
  6594  	c.cancelpatchjobrequest = cancelpatchjobrequest
  6595  	return c
  6596  }
  6597  
  6598  // Fields allows partial responses to be retrieved. See
  6599  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6600  // details.
  6601  func (c *ProjectsPatchJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsCancelCall {
  6602  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6603  	return c
  6604  }
  6605  
  6606  // Context sets the context to be used in this call's Do method.
  6607  func (c *ProjectsPatchJobsCancelCall) Context(ctx context.Context) *ProjectsPatchJobsCancelCall {
  6608  	c.ctx_ = ctx
  6609  	return c
  6610  }
  6611  
  6612  // Header returns a http.Header that can be modified by the caller to add
  6613  // headers to the request.
  6614  func (c *ProjectsPatchJobsCancelCall) Header() http.Header {
  6615  	if c.header_ == nil {
  6616  		c.header_ = make(http.Header)
  6617  	}
  6618  	return c.header_
  6619  }
  6620  
  6621  func (c *ProjectsPatchJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  6622  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6623  	var body io.Reader = nil
  6624  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelpatchjobrequest)
  6625  	if err != nil {
  6626  		return nil, err
  6627  	}
  6628  	c.urlParams_.Set("alt", alt)
  6629  	c.urlParams_.Set("prettyPrint", "false")
  6630  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  6631  	urls += "?" + c.urlParams_.Encode()
  6632  	req, err := http.NewRequest("POST", urls, body)
  6633  	if err != nil {
  6634  		return nil, err
  6635  	}
  6636  	req.Header = reqHeaders
  6637  	googleapi.Expand(req.URL, map[string]string{
  6638  		"name": c.name,
  6639  	})
  6640  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6641  }
  6642  
  6643  // Do executes the "osconfig.projects.patchJobs.cancel" call.
  6644  // Any non-2xx status code is an error. Response headers are in either
  6645  // *PatchJob.ServerResponse.Header or (if a response was returned at all) in
  6646  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6647  // whether the returned error was because http.StatusNotModified was returned.
  6648  func (c *ProjectsPatchJobsCancelCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
  6649  	gensupport.SetOptions(c.urlParams_, opts...)
  6650  	res, err := c.doRequest("json")
  6651  	if res != nil && res.StatusCode == http.StatusNotModified {
  6652  		if res.Body != nil {
  6653  			res.Body.Close()
  6654  		}
  6655  		return nil, gensupport.WrapError(&googleapi.Error{
  6656  			Code:   res.StatusCode,
  6657  			Header: res.Header,
  6658  		})
  6659  	}
  6660  	if err != nil {
  6661  		return nil, err
  6662  	}
  6663  	defer googleapi.CloseBody(res)
  6664  	if err := googleapi.CheckResponse(res); err != nil {
  6665  		return nil, gensupport.WrapError(err)
  6666  	}
  6667  	ret := &PatchJob{
  6668  		ServerResponse: googleapi.ServerResponse{
  6669  			Header:         res.Header,
  6670  			HTTPStatusCode: res.StatusCode,
  6671  		},
  6672  	}
  6673  	target := &ret
  6674  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6675  		return nil, err
  6676  	}
  6677  	return ret, nil
  6678  }
  6679  
  6680  type ProjectsPatchJobsExecuteCall struct {
  6681  	s                      *Service
  6682  	parent                 string
  6683  	executepatchjobrequest *ExecutePatchJobRequest
  6684  	urlParams_             gensupport.URLParams
  6685  	ctx_                   context.Context
  6686  	header_                http.Header
  6687  }
  6688  
  6689  // Execute: Patch VM instances by creating and running a patch job.
  6690  //
  6691  // - parent: The project in which to run this patch in the form `projects/*`.
  6692  func (r *ProjectsPatchJobsService) Execute(parent string, executepatchjobrequest *ExecutePatchJobRequest) *ProjectsPatchJobsExecuteCall {
  6693  	c := &ProjectsPatchJobsExecuteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6694  	c.parent = parent
  6695  	c.executepatchjobrequest = executepatchjobrequest
  6696  	return c
  6697  }
  6698  
  6699  // Fields allows partial responses to be retrieved. See
  6700  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6701  // details.
  6702  func (c *ProjectsPatchJobsExecuteCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsExecuteCall {
  6703  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6704  	return c
  6705  }
  6706  
  6707  // Context sets the context to be used in this call's Do method.
  6708  func (c *ProjectsPatchJobsExecuteCall) Context(ctx context.Context) *ProjectsPatchJobsExecuteCall {
  6709  	c.ctx_ = ctx
  6710  	return c
  6711  }
  6712  
  6713  // Header returns a http.Header that can be modified by the caller to add
  6714  // headers to the request.
  6715  func (c *ProjectsPatchJobsExecuteCall) Header() http.Header {
  6716  	if c.header_ == nil {
  6717  		c.header_ = make(http.Header)
  6718  	}
  6719  	return c.header_
  6720  }
  6721  
  6722  func (c *ProjectsPatchJobsExecuteCall) doRequest(alt string) (*http.Response, error) {
  6723  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6724  	var body io.Reader = nil
  6725  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.executepatchjobrequest)
  6726  	if err != nil {
  6727  		return nil, err
  6728  	}
  6729  	c.urlParams_.Set("alt", alt)
  6730  	c.urlParams_.Set("prettyPrint", "false")
  6731  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchJobs:execute")
  6732  	urls += "?" + c.urlParams_.Encode()
  6733  	req, err := http.NewRequest("POST", urls, body)
  6734  	if err != nil {
  6735  		return nil, err
  6736  	}
  6737  	req.Header = reqHeaders
  6738  	googleapi.Expand(req.URL, map[string]string{
  6739  		"parent": c.parent,
  6740  	})
  6741  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6742  }
  6743  
  6744  // Do executes the "osconfig.projects.patchJobs.execute" call.
  6745  // Any non-2xx status code is an error. Response headers are in either
  6746  // *PatchJob.ServerResponse.Header or (if a response was returned at all) in
  6747  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6748  // whether the returned error was because http.StatusNotModified was returned.
  6749  func (c *ProjectsPatchJobsExecuteCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
  6750  	gensupport.SetOptions(c.urlParams_, opts...)
  6751  	res, err := c.doRequest("json")
  6752  	if res != nil && res.StatusCode == http.StatusNotModified {
  6753  		if res.Body != nil {
  6754  			res.Body.Close()
  6755  		}
  6756  		return nil, gensupport.WrapError(&googleapi.Error{
  6757  			Code:   res.StatusCode,
  6758  			Header: res.Header,
  6759  		})
  6760  	}
  6761  	if err != nil {
  6762  		return nil, err
  6763  	}
  6764  	defer googleapi.CloseBody(res)
  6765  	if err := googleapi.CheckResponse(res); err != nil {
  6766  		return nil, gensupport.WrapError(err)
  6767  	}
  6768  	ret := &PatchJob{
  6769  		ServerResponse: googleapi.ServerResponse{
  6770  			Header:         res.Header,
  6771  			HTTPStatusCode: res.StatusCode,
  6772  		},
  6773  	}
  6774  	target := &ret
  6775  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6776  		return nil, err
  6777  	}
  6778  	return ret, nil
  6779  }
  6780  
  6781  type ProjectsPatchJobsGetCall struct {
  6782  	s            *Service
  6783  	name         string
  6784  	urlParams_   gensupport.URLParams
  6785  	ifNoneMatch_ string
  6786  	ctx_         context.Context
  6787  	header_      http.Header
  6788  }
  6789  
  6790  // Get: Get the patch job. This can be used to track the progress of an ongoing
  6791  // patch job or review the details of completed jobs.
  6792  //
  6793  // - name: Name of the patch in the form `projects/*/patchJobs/*`.
  6794  func (r *ProjectsPatchJobsService) Get(name string) *ProjectsPatchJobsGetCall {
  6795  	c := &ProjectsPatchJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6796  	c.name = name
  6797  	return c
  6798  }
  6799  
  6800  // Fields allows partial responses to be retrieved. See
  6801  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6802  // details.
  6803  func (c *ProjectsPatchJobsGetCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsGetCall {
  6804  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6805  	return c
  6806  }
  6807  
  6808  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6809  // object's ETag matches the given value. This is useful for getting updates
  6810  // only after the object has changed since the last request.
  6811  func (c *ProjectsPatchJobsGetCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsGetCall {
  6812  	c.ifNoneMatch_ = entityTag
  6813  	return c
  6814  }
  6815  
  6816  // Context sets the context to be used in this call's Do method.
  6817  func (c *ProjectsPatchJobsGetCall) Context(ctx context.Context) *ProjectsPatchJobsGetCall {
  6818  	c.ctx_ = ctx
  6819  	return c
  6820  }
  6821  
  6822  // Header returns a http.Header that can be modified by the caller to add
  6823  // headers to the request.
  6824  func (c *ProjectsPatchJobsGetCall) Header() http.Header {
  6825  	if c.header_ == nil {
  6826  		c.header_ = make(http.Header)
  6827  	}
  6828  	return c.header_
  6829  }
  6830  
  6831  func (c *ProjectsPatchJobsGetCall) doRequest(alt string) (*http.Response, error) {
  6832  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6833  	if c.ifNoneMatch_ != "" {
  6834  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6835  	}
  6836  	var body io.Reader = nil
  6837  	c.urlParams_.Set("alt", alt)
  6838  	c.urlParams_.Set("prettyPrint", "false")
  6839  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6840  	urls += "?" + c.urlParams_.Encode()
  6841  	req, err := http.NewRequest("GET", urls, body)
  6842  	if err != nil {
  6843  		return nil, err
  6844  	}
  6845  	req.Header = reqHeaders
  6846  	googleapi.Expand(req.URL, map[string]string{
  6847  		"name": c.name,
  6848  	})
  6849  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6850  }
  6851  
  6852  // Do executes the "osconfig.projects.patchJobs.get" call.
  6853  // Any non-2xx status code is an error. Response headers are in either
  6854  // *PatchJob.ServerResponse.Header or (if a response was returned at all) in
  6855  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6856  // whether the returned error was because http.StatusNotModified was returned.
  6857  func (c *ProjectsPatchJobsGetCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
  6858  	gensupport.SetOptions(c.urlParams_, opts...)
  6859  	res, err := c.doRequest("json")
  6860  	if res != nil && res.StatusCode == http.StatusNotModified {
  6861  		if res.Body != nil {
  6862  			res.Body.Close()
  6863  		}
  6864  		return nil, gensupport.WrapError(&googleapi.Error{
  6865  			Code:   res.StatusCode,
  6866  			Header: res.Header,
  6867  		})
  6868  	}
  6869  	if err != nil {
  6870  		return nil, err
  6871  	}
  6872  	defer googleapi.CloseBody(res)
  6873  	if err := googleapi.CheckResponse(res); err != nil {
  6874  		return nil, gensupport.WrapError(err)
  6875  	}
  6876  	ret := &PatchJob{
  6877  		ServerResponse: googleapi.ServerResponse{
  6878  			Header:         res.Header,
  6879  			HTTPStatusCode: res.StatusCode,
  6880  		},
  6881  	}
  6882  	target := &ret
  6883  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6884  		return nil, err
  6885  	}
  6886  	return ret, nil
  6887  }
  6888  
  6889  type ProjectsPatchJobsListCall struct {
  6890  	s            *Service
  6891  	parent       string
  6892  	urlParams_   gensupport.URLParams
  6893  	ifNoneMatch_ string
  6894  	ctx_         context.Context
  6895  	header_      http.Header
  6896  }
  6897  
  6898  // List: Get a list of patch jobs.
  6899  //
  6900  // - parent: In the form of `projects/*`.
  6901  func (r *ProjectsPatchJobsService) List(parent string) *ProjectsPatchJobsListCall {
  6902  	c := &ProjectsPatchJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6903  	c.parent = parent
  6904  	return c
  6905  }
  6906  
  6907  // Filter sets the optional parameter "filter": If provided, this field
  6908  // specifies the criteria that must be met by patch jobs to be included in the
  6909  // response. Currently, filtering is only available on the patch_deployment
  6910  // field.
  6911  func (c *ProjectsPatchJobsListCall) Filter(filter string) *ProjectsPatchJobsListCall {
  6912  	c.urlParams_.Set("filter", filter)
  6913  	return c
  6914  }
  6915  
  6916  // PageSize sets the optional parameter "pageSize": The maximum number of
  6917  // instance status to return.
  6918  func (c *ProjectsPatchJobsListCall) PageSize(pageSize int64) *ProjectsPatchJobsListCall {
  6919  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6920  	return c
  6921  }
  6922  
  6923  // PageToken sets the optional parameter "pageToken": A pagination token
  6924  // returned from a previous call that indicates where this listing should
  6925  // continue from.
  6926  func (c *ProjectsPatchJobsListCall) PageToken(pageToken string) *ProjectsPatchJobsListCall {
  6927  	c.urlParams_.Set("pageToken", pageToken)
  6928  	return c
  6929  }
  6930  
  6931  // Fields allows partial responses to be retrieved. See
  6932  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6933  // details.
  6934  func (c *ProjectsPatchJobsListCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsListCall {
  6935  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6936  	return c
  6937  }
  6938  
  6939  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6940  // object's ETag matches the given value. This is useful for getting updates
  6941  // only after the object has changed since the last request.
  6942  func (c *ProjectsPatchJobsListCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsListCall {
  6943  	c.ifNoneMatch_ = entityTag
  6944  	return c
  6945  }
  6946  
  6947  // Context sets the context to be used in this call's Do method.
  6948  func (c *ProjectsPatchJobsListCall) Context(ctx context.Context) *ProjectsPatchJobsListCall {
  6949  	c.ctx_ = ctx
  6950  	return c
  6951  }
  6952  
  6953  // Header returns a http.Header that can be modified by the caller to add
  6954  // headers to the request.
  6955  func (c *ProjectsPatchJobsListCall) Header() http.Header {
  6956  	if c.header_ == nil {
  6957  		c.header_ = make(http.Header)
  6958  	}
  6959  	return c.header_
  6960  }
  6961  
  6962  func (c *ProjectsPatchJobsListCall) doRequest(alt string) (*http.Response, error) {
  6963  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6964  	if c.ifNoneMatch_ != "" {
  6965  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6966  	}
  6967  	var body io.Reader = nil
  6968  	c.urlParams_.Set("alt", alt)
  6969  	c.urlParams_.Set("prettyPrint", "false")
  6970  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchJobs")
  6971  	urls += "?" + c.urlParams_.Encode()
  6972  	req, err := http.NewRequest("GET", urls, body)
  6973  	if err != nil {
  6974  		return nil, err
  6975  	}
  6976  	req.Header = reqHeaders
  6977  	googleapi.Expand(req.URL, map[string]string{
  6978  		"parent": c.parent,
  6979  	})
  6980  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6981  }
  6982  
  6983  // Do executes the "osconfig.projects.patchJobs.list" call.
  6984  // Any non-2xx status code is an error. Response headers are in either
  6985  // *ListPatchJobsResponse.ServerResponse.Header or (if a response was returned
  6986  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6987  // check whether the returned error was because http.StatusNotModified was
  6988  // returned.
  6989  func (c *ProjectsPatchJobsListCall) Do(opts ...googleapi.CallOption) (*ListPatchJobsResponse, error) {
  6990  	gensupport.SetOptions(c.urlParams_, opts...)
  6991  	res, err := c.doRequest("json")
  6992  	if res != nil && res.StatusCode == http.StatusNotModified {
  6993  		if res.Body != nil {
  6994  			res.Body.Close()
  6995  		}
  6996  		return nil, gensupport.WrapError(&googleapi.Error{
  6997  			Code:   res.StatusCode,
  6998  			Header: res.Header,
  6999  		})
  7000  	}
  7001  	if err != nil {
  7002  		return nil, err
  7003  	}
  7004  	defer googleapi.CloseBody(res)
  7005  	if err := googleapi.CheckResponse(res); err != nil {
  7006  		return nil, gensupport.WrapError(err)
  7007  	}
  7008  	ret := &ListPatchJobsResponse{
  7009  		ServerResponse: googleapi.ServerResponse{
  7010  			Header:         res.Header,
  7011  			HTTPStatusCode: res.StatusCode,
  7012  		},
  7013  	}
  7014  	target := &ret
  7015  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7016  		return nil, err
  7017  	}
  7018  	return ret, nil
  7019  }
  7020  
  7021  // Pages invokes f for each page of results.
  7022  // A non-nil error returned from f will halt the iteration.
  7023  // The provided context supersedes any context provided to the Context method.
  7024  func (c *ProjectsPatchJobsListCall) Pages(ctx context.Context, f func(*ListPatchJobsResponse) error) error {
  7025  	c.ctx_ = ctx
  7026  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7027  	for {
  7028  		x, err := c.Do()
  7029  		if err != nil {
  7030  			return err
  7031  		}
  7032  		if err := f(x); err != nil {
  7033  			return err
  7034  		}
  7035  		if x.NextPageToken == "" {
  7036  			return nil
  7037  		}
  7038  		c.PageToken(x.NextPageToken)
  7039  	}
  7040  }
  7041  
  7042  type ProjectsPatchJobsInstanceDetailsListCall struct {
  7043  	s            *Service
  7044  	parent       string
  7045  	urlParams_   gensupport.URLParams
  7046  	ifNoneMatch_ string
  7047  	ctx_         context.Context
  7048  	header_      http.Header
  7049  }
  7050  
  7051  // List: Get a list of instance details for a given patch job.
  7052  //
  7053  //   - parent: The parent for the instances are in the form of
  7054  //     `projects/*/patchJobs/*`.
  7055  func (r *ProjectsPatchJobsInstanceDetailsService) List(parent string) *ProjectsPatchJobsInstanceDetailsListCall {
  7056  	c := &ProjectsPatchJobsInstanceDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7057  	c.parent = parent
  7058  	return c
  7059  }
  7060  
  7061  // Filter sets the optional parameter "filter": A filter expression that
  7062  // filters results listed in the response. This field supports filtering
  7063  // results by instance zone, name, state, or `failure_reason`.
  7064  func (c *ProjectsPatchJobsInstanceDetailsListCall) Filter(filter string) *ProjectsPatchJobsInstanceDetailsListCall {
  7065  	c.urlParams_.Set("filter", filter)
  7066  	return c
  7067  }
  7068  
  7069  // PageSize sets the optional parameter "pageSize": The maximum number of
  7070  // instance details records to return. Default is 100.
  7071  func (c *ProjectsPatchJobsInstanceDetailsListCall) PageSize(pageSize int64) *ProjectsPatchJobsInstanceDetailsListCall {
  7072  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7073  	return c
  7074  }
  7075  
  7076  // PageToken sets the optional parameter "pageToken": A pagination token
  7077  // returned from a previous call that indicates where this listing should
  7078  // continue from.
  7079  func (c *ProjectsPatchJobsInstanceDetailsListCall) PageToken(pageToken string) *ProjectsPatchJobsInstanceDetailsListCall {
  7080  	c.urlParams_.Set("pageToken", pageToken)
  7081  	return c
  7082  }
  7083  
  7084  // Fields allows partial responses to be retrieved. See
  7085  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7086  // details.
  7087  func (c *ProjectsPatchJobsInstanceDetailsListCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsInstanceDetailsListCall {
  7088  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7089  	return c
  7090  }
  7091  
  7092  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7093  // object's ETag matches the given value. This is useful for getting updates
  7094  // only after the object has changed since the last request.
  7095  func (c *ProjectsPatchJobsInstanceDetailsListCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsInstanceDetailsListCall {
  7096  	c.ifNoneMatch_ = entityTag
  7097  	return c
  7098  }
  7099  
  7100  // Context sets the context to be used in this call's Do method.
  7101  func (c *ProjectsPatchJobsInstanceDetailsListCall) Context(ctx context.Context) *ProjectsPatchJobsInstanceDetailsListCall {
  7102  	c.ctx_ = ctx
  7103  	return c
  7104  }
  7105  
  7106  // Header returns a http.Header that can be modified by the caller to add
  7107  // headers to the request.
  7108  func (c *ProjectsPatchJobsInstanceDetailsListCall) Header() http.Header {
  7109  	if c.header_ == nil {
  7110  		c.header_ = make(http.Header)
  7111  	}
  7112  	return c.header_
  7113  }
  7114  
  7115  func (c *ProjectsPatchJobsInstanceDetailsListCall) doRequest(alt string) (*http.Response, error) {
  7116  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7117  	if c.ifNoneMatch_ != "" {
  7118  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7119  	}
  7120  	var body io.Reader = nil
  7121  	c.urlParams_.Set("alt", alt)
  7122  	c.urlParams_.Set("prettyPrint", "false")
  7123  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceDetails")
  7124  	urls += "?" + c.urlParams_.Encode()
  7125  	req, err := http.NewRequest("GET", urls, body)
  7126  	if err != nil {
  7127  		return nil, err
  7128  	}
  7129  	req.Header = reqHeaders
  7130  	googleapi.Expand(req.URL, map[string]string{
  7131  		"parent": c.parent,
  7132  	})
  7133  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7134  }
  7135  
  7136  // Do executes the "osconfig.projects.patchJobs.instanceDetails.list" call.
  7137  // Any non-2xx status code is an error. Response headers are in either
  7138  // *ListPatchJobInstanceDetailsResponse.ServerResponse.Header or (if a response
  7139  // was returned at all) in error.(*googleapi.Error).Header. Use
  7140  // googleapi.IsNotModified to check whether the returned error was because
  7141  // http.StatusNotModified was returned.
  7142  func (c *ProjectsPatchJobsInstanceDetailsListCall) Do(opts ...googleapi.CallOption) (*ListPatchJobInstanceDetailsResponse, error) {
  7143  	gensupport.SetOptions(c.urlParams_, opts...)
  7144  	res, err := c.doRequest("json")
  7145  	if res != nil && res.StatusCode == http.StatusNotModified {
  7146  		if res.Body != nil {
  7147  			res.Body.Close()
  7148  		}
  7149  		return nil, gensupport.WrapError(&googleapi.Error{
  7150  			Code:   res.StatusCode,
  7151  			Header: res.Header,
  7152  		})
  7153  	}
  7154  	if err != nil {
  7155  		return nil, err
  7156  	}
  7157  	defer googleapi.CloseBody(res)
  7158  	if err := googleapi.CheckResponse(res); err != nil {
  7159  		return nil, gensupport.WrapError(err)
  7160  	}
  7161  	ret := &ListPatchJobInstanceDetailsResponse{
  7162  		ServerResponse: googleapi.ServerResponse{
  7163  			Header:         res.Header,
  7164  			HTTPStatusCode: res.StatusCode,
  7165  		},
  7166  	}
  7167  	target := &ret
  7168  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7169  		return nil, err
  7170  	}
  7171  	return ret, nil
  7172  }
  7173  
  7174  // Pages invokes f for each page of results.
  7175  // A non-nil error returned from f will halt the iteration.
  7176  // The provided context supersedes any context provided to the Context method.
  7177  func (c *ProjectsPatchJobsInstanceDetailsListCall) Pages(ctx context.Context, f func(*ListPatchJobInstanceDetailsResponse) error) error {
  7178  	c.ctx_ = ctx
  7179  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7180  	for {
  7181  		x, err := c.Do()
  7182  		if err != nil {
  7183  			return err
  7184  		}
  7185  		if err := f(x); err != nil {
  7186  			return err
  7187  		}
  7188  		if x.NextPageToken == "" {
  7189  			return nil
  7190  		}
  7191  		c.PageToken(x.NextPageToken)
  7192  	}
  7193  }
  7194  

View as plain text