...

Source file src/google.golang.org/api/securitycenter/v1p1beta1/securitycenter-gen.go

Documentation: google.golang.org/api/securitycenter/v1p1beta1

     1  // Copyright 2020 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 securitycenter provides access to the Security Command Center API.
     8  //
     9  // For product documentation, see: https://console.cloud.google.com/apis/api/securitycenter.googleapis.com/overview
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/securitycenter/v1p1beta1"
    16  //	...
    17  //	ctx := context.Background()
    18  //	securitycenterService, err := securitycenter.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    27  //
    28  //	securitycenterService, err := securitycenter.NewService(ctx, option.WithAPIKey("AIza..."))
    29  //
    30  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    31  //
    32  //	config := &oauth2.Config{...}
    33  //	// ...
    34  //	token, err := config.Exchange(ctx, ...)
    35  //	securitycenterService, err := securitycenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    36  //
    37  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    38  package securitycenter // import "google.golang.org/api/securitycenter/v1p1beta1"
    39  
    40  import (
    41  	"bytes"
    42  	"context"
    43  	"encoding/json"
    44  	"errors"
    45  	"fmt"
    46  	"io"
    47  	"net/http"
    48  	"net/url"
    49  	"strconv"
    50  	"strings"
    51  
    52  	googleapi "google.golang.org/api/googleapi"
    53  	gensupport "google.golang.org/api/internal/gensupport"
    54  	option "google.golang.org/api/option"
    55  	internaloption "google.golang.org/api/option/internaloption"
    56  	htransport "google.golang.org/api/transport/http"
    57  )
    58  
    59  // Always reference these packages, just in case the auto-generated code
    60  // below doesn't.
    61  var _ = bytes.NewBuffer
    62  var _ = strconv.Itoa
    63  var _ = fmt.Sprintf
    64  var _ = json.NewDecoder
    65  var _ = io.Copy
    66  var _ = url.Parse
    67  var _ = gensupport.MarshalJSON
    68  var _ = googleapi.Version
    69  var _ = errors.New
    70  var _ = strings.Replace
    71  var _ = context.Canceled
    72  var _ = internaloption.WithDefaultEndpoint
    73  
    74  const apiId = "securitycenter:v1p1beta1"
    75  const apiName = "securitycenter"
    76  const apiVersion = "v1p1beta1"
    77  const basePath = "https://securitycenter.googleapis.com/"
    78  const mtlsBasePath = "https://securitycenter.mtls.googleapis.com/"
    79  
    80  // OAuth2 scopes used by this API.
    81  const (
    82  	// View and manage your data across Google Cloud Platform services
    83  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
    84  )
    85  
    86  // NewService creates a new Service.
    87  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    88  	scopesOption := option.WithScopes(
    89  		"https://www.googleapis.com/auth/cloud-platform",
    90  	)
    91  	// NOTE: prepend, so we don't override user-specified scopes.
    92  	opts = append([]option.ClientOption{scopesOption}, opts...)
    93  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
    94  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
    95  	client, endpoint, err := htransport.NewClient(ctx, opts...)
    96  	if err != nil {
    97  		return nil, err
    98  	}
    99  	s, err := New(client)
   100  	if err != nil {
   101  		return nil, err
   102  	}
   103  	if endpoint != "" {
   104  		s.BasePath = endpoint
   105  	}
   106  	return s, nil
   107  }
   108  
   109  // New creates a new Service. It uses the provided http.Client for requests.
   110  //
   111  // Deprecated: please use NewService instead.
   112  // To provide a custom HTTP client, use option.WithHTTPClient.
   113  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   114  func New(client *http.Client) (*Service, error) {
   115  	if client == nil {
   116  		return nil, errors.New("client is nil")
   117  	}
   118  	s := &Service{client: client, BasePath: basePath}
   119  	s.Organizations = NewOrganizationsService(s)
   120  	return s, nil
   121  }
   122  
   123  type Service struct {
   124  	client    *http.Client
   125  	BasePath  string // API endpoint base URL
   126  	UserAgent string // optional additional User-Agent fragment
   127  
   128  	Organizations *OrganizationsService
   129  }
   130  
   131  func (s *Service) userAgent() string {
   132  	if s.UserAgent == "" {
   133  		return googleapi.UserAgent
   134  	}
   135  	return googleapi.UserAgent + " " + s.UserAgent
   136  }
   137  
   138  func NewOrganizationsService(s *Service) *OrganizationsService {
   139  	rs := &OrganizationsService{s: s}
   140  	rs.Assets = NewOrganizationsAssetsService(s)
   141  	rs.NotificationConfigs = NewOrganizationsNotificationConfigsService(s)
   142  	rs.Operations = NewOrganizationsOperationsService(s)
   143  	rs.Sources = NewOrganizationsSourcesService(s)
   144  	return rs
   145  }
   146  
   147  type OrganizationsService struct {
   148  	s *Service
   149  
   150  	Assets *OrganizationsAssetsService
   151  
   152  	NotificationConfigs *OrganizationsNotificationConfigsService
   153  
   154  	Operations *OrganizationsOperationsService
   155  
   156  	Sources *OrganizationsSourcesService
   157  }
   158  
   159  func NewOrganizationsAssetsService(s *Service) *OrganizationsAssetsService {
   160  	rs := &OrganizationsAssetsService{s: s}
   161  	return rs
   162  }
   163  
   164  type OrganizationsAssetsService struct {
   165  	s *Service
   166  }
   167  
   168  func NewOrganizationsNotificationConfigsService(s *Service) *OrganizationsNotificationConfigsService {
   169  	rs := &OrganizationsNotificationConfigsService{s: s}
   170  	return rs
   171  }
   172  
   173  type OrganizationsNotificationConfigsService struct {
   174  	s *Service
   175  }
   176  
   177  func NewOrganizationsOperationsService(s *Service) *OrganizationsOperationsService {
   178  	rs := &OrganizationsOperationsService{s: s}
   179  	return rs
   180  }
   181  
   182  type OrganizationsOperationsService struct {
   183  	s *Service
   184  }
   185  
   186  func NewOrganizationsSourcesService(s *Service) *OrganizationsSourcesService {
   187  	rs := &OrganizationsSourcesService{s: s}
   188  	rs.Findings = NewOrganizationsSourcesFindingsService(s)
   189  	return rs
   190  }
   191  
   192  type OrganizationsSourcesService struct {
   193  	s *Service
   194  
   195  	Findings *OrganizationsSourcesFindingsService
   196  }
   197  
   198  func NewOrganizationsSourcesFindingsService(s *Service) *OrganizationsSourcesFindingsService {
   199  	rs := &OrganizationsSourcesFindingsService{s: s}
   200  	return rs
   201  }
   202  
   203  type OrganizationsSourcesFindingsService struct {
   204  	s *Service
   205  }
   206  
   207  // AssetDiscoveryConfig: The configuration used for Asset Discovery
   208  // runs.
   209  type AssetDiscoveryConfig struct {
   210  	// InclusionMode: The mode to use for filtering asset discovery.
   211  	//
   212  	// Possible values:
   213  	//   "INCLUSION_MODE_UNSPECIFIED" - Unspecified. Setting the mode with
   214  	// this value will disable inclusion/exclusion filtering for Asset
   215  	// Discovery.
   216  	//   "INCLUDE_ONLY" - Asset Discovery will capture only the resources
   217  	// within the projects specified. All other resources will be ignored.
   218  	//   "EXCLUDE" - Asset Discovery will ignore all resources under the
   219  	// projects specified. All other resources will be retrieved.
   220  	InclusionMode string `json:"inclusionMode,omitempty"`
   221  
   222  	// ProjectIds: The project ids to use for filtering asset discovery.
   223  	ProjectIds []string `json:"projectIds,omitempty"`
   224  
   225  	// ForceSendFields is a list of field names (e.g. "InclusionMode") to
   226  	// unconditionally include in API requests. By default, fields with
   227  	// empty values are omitted from API requests. However, any non-pointer,
   228  	// non-interface field appearing in ForceSendFields will be sent to the
   229  	// server regardless of whether the field is empty or not. This may be
   230  	// used to include empty fields in Patch requests.
   231  	ForceSendFields []string `json:"-"`
   232  
   233  	// NullFields is a list of field names (e.g. "InclusionMode") to include
   234  	// in API requests with the JSON null value. By default, fields with
   235  	// empty values are omitted from API requests. However, any field with
   236  	// an empty value appearing in NullFields will be sent to the server as
   237  	// null. It is an error if a field in this list has a non-empty value.
   238  	// This may be used to include null fields in Patch requests.
   239  	NullFields []string `json:"-"`
   240  }
   241  
   242  func (s *AssetDiscoveryConfig) MarshalJSON() ([]byte, error) {
   243  	type NoMethod AssetDiscoveryConfig
   244  	raw := NoMethod(*s)
   245  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   246  }
   247  
   248  // AuditConfig: Specifies the audit configuration for a service. The
   249  // configuration determines which permission types are logged, and what
   250  // identities, if any, are exempted from logging. An AuditConfig must
   251  // have one or more AuditLogConfigs. If there are AuditConfigs for both
   252  // `allServices` and a specific service, the union of the two
   253  // AuditConfigs is used for that service: the log_types specified in
   254  // each AuditConfig are enabled, and the exempted_members in each
   255  // AuditLogConfig are exempted. Example Policy with multiple
   256  // AuditConfigs: { "audit_configs": [ { "service": "allServices",
   257  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members":
   258  // [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, {
   259  // "log_type": "ADMIN_READ" } ] }, { "service":
   260  // "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type":
   261  // "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [
   262  // "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy
   263  // enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts
   264  // jose@example.com from DATA_READ logging, and aliya@example.com from
   265  // DATA_WRITE logging.
   266  type AuditConfig struct {
   267  	// AuditLogConfigs: The configuration for logging of each type of
   268  	// permission.
   269  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   270  
   271  	// Service: Specifies a service that will be enabled for audit logging.
   272  	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
   273  	// `allServices` is a special value that covers all services.
   274  	Service string `json:"service,omitempty"`
   275  
   276  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   277  	// unconditionally include in API requests. By default, fields with
   278  	// empty values are omitted from API requests. However, any non-pointer,
   279  	// non-interface field appearing in ForceSendFields will be sent to the
   280  	// server regardless of whether the field is empty or not. This may be
   281  	// used to include empty fields in Patch requests.
   282  	ForceSendFields []string `json:"-"`
   283  
   284  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
   285  	// include in API requests with the JSON null value. By default, fields
   286  	// with empty values are omitted from API requests. However, any field
   287  	// with an empty value appearing in NullFields will be sent to the
   288  	// server as null. It is an error if a field in this list has a
   289  	// non-empty value. This may be used to include null fields in Patch
   290  	// requests.
   291  	NullFields []string `json:"-"`
   292  }
   293  
   294  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   295  	type NoMethod AuditConfig
   296  	raw := NoMethod(*s)
   297  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   298  }
   299  
   300  // AuditLogConfig: Provides the configuration for logging a type of
   301  // permissions. Example: { "audit_log_configs": [ { "log_type":
   302  // "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, {
   303  // "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and
   304  // 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ
   305  // logging.
   306  type AuditLogConfig struct {
   307  	// ExemptedMembers: Specifies the identities that do not cause logging
   308  	// for this type of permission. Follows the same format of
   309  	// Binding.members.
   310  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   311  
   312  	// LogType: The log type that this config enables.
   313  	//
   314  	// Possible values:
   315  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   316  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   317  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   318  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   319  	LogType string `json:"logType,omitempty"`
   320  
   321  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   322  	// unconditionally include in API requests. By default, fields with
   323  	// empty values are omitted from API requests. However, any non-pointer,
   324  	// non-interface field appearing in ForceSendFields will be sent to the
   325  	// server regardless of whether the field is empty or not. This may be
   326  	// used to include empty fields in Patch requests.
   327  	ForceSendFields []string `json:"-"`
   328  
   329  	// NullFields is a list of field names (e.g. "ExemptedMembers") to
   330  	// include in API requests with the JSON null value. By default, fields
   331  	// with empty values are omitted from API requests. However, any field
   332  	// with an empty value appearing in NullFields will be sent to the
   333  	// server as null. It is an error if a field in this list has a
   334  	// non-empty value. This may be used to include null fields in Patch
   335  	// requests.
   336  	NullFields []string `json:"-"`
   337  }
   338  
   339  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   340  	type NoMethod AuditLogConfig
   341  	raw := NoMethod(*s)
   342  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   343  }
   344  
   345  // Binding: Associates `members` with a `role`.
   346  type Binding struct {
   347  	// Condition: The condition that is associated with this binding. If the
   348  	// condition evaluates to `true`, then this binding applies to the
   349  	// current request. If the condition evaluates to `false`, then this
   350  	// binding does not apply to the current request. However, a different
   351  	// role binding might grant the same role to one or more of the members
   352  	// in this binding. To learn which resources support conditions in their
   353  	// IAM policies, see the [IAM
   354  	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
   355  	// olicies).
   356  	Condition *Expr `json:"condition,omitempty"`
   357  
   358  	// Members: Specifies the identities requesting access for a Cloud
   359  	// Platform resource. `members` can have the following values: *
   360  	// `allUsers`: A special identifier that represents anyone who is on the
   361  	// internet; with or without a Google account. *
   362  	// `allAuthenticatedUsers`: A special identifier that represents anyone
   363  	// who is authenticated with a Google account or a service account. *
   364  	// `user:{emailid}`: An email address that represents a specific Google
   365  	// account. For example, `alice@example.com` . *
   366  	// `serviceAccount:{emailid}`: An email address that represents a
   367  	// service account. For example,
   368  	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
   369  	// email address that represents a Google group. For example,
   370  	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
   371  	// email address (plus unique identifier) representing a user that has
   372  	// been recently deleted. For example,
   373  	// `alice@example.com?uid=123456789012345678901`. If the user is
   374  	// recovered, this value reverts to `user:{emailid}` and the recovered
   375  	// user retains the role in the binding. *
   376  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
   377  	// (plus unique identifier) representing a service account that has been
   378  	// recently deleted. For example,
   379  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
   380  	// If the service account is undeleted, this value reverts to
   381  	// `serviceAccount:{emailid}` and the undeleted service account retains
   382  	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
   383  	// An email address (plus unique identifier) representing a Google group
   384  	// that has been recently deleted. For example,
   385  	// `admins@example.com?uid=123456789012345678901`. If the group is
   386  	// recovered, this value reverts to `group:{emailid}` and the recovered
   387  	// group retains the role in the binding. * `domain:{domain}`: The G
   388  	// Suite domain (primary) that represents all the users of that domain.
   389  	// For example, `google.com` or `example.com`.
   390  	Members []string `json:"members,omitempty"`
   391  
   392  	// Role: Role that is assigned to `members`. For example,
   393  	// `roles/viewer`, `roles/editor`, or `roles/owner`.
   394  	Role string `json:"role,omitempty"`
   395  
   396  	// ForceSendFields is a list of field names (e.g. "Condition") to
   397  	// unconditionally include in API requests. By default, fields with
   398  	// empty values are omitted from API requests. However, any non-pointer,
   399  	// non-interface field appearing in ForceSendFields will be sent to the
   400  	// server regardless of whether the field is empty or not. This may be
   401  	// used to include empty fields in Patch requests.
   402  	ForceSendFields []string `json:"-"`
   403  
   404  	// NullFields is a list of field names (e.g. "Condition") to include in
   405  	// API requests with the JSON null value. By default, fields with empty
   406  	// values are omitted from API requests. However, any field with an
   407  	// empty value appearing in NullFields will be sent to the server as
   408  	// null. It is an error if a field in this list has a non-empty value.
   409  	// This may be used to include null fields in Patch requests.
   410  	NullFields []string `json:"-"`
   411  }
   412  
   413  func (s *Binding) MarshalJSON() ([]byte, error) {
   414  	type NoMethod Binding
   415  	raw := NoMethod(*s)
   416  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   417  }
   418  
   419  // Empty: A generic empty message that you can re-use to avoid defining
   420  // duplicated empty messages in your APIs. A typical example is to use
   421  // it as the request or the response type of an API method. For
   422  // instance: service Foo { rpc Bar(google.protobuf.Empty) returns
   423  // (google.protobuf.Empty); } The JSON representation for `Empty` is
   424  // empty JSON object `{}`.
   425  type Empty struct {
   426  	// ServerResponse contains the HTTP response code and headers from the
   427  	// server.
   428  	googleapi.ServerResponse `json:"-"`
   429  }
   430  
   431  // Expr: Represents a textual expression in the Common Expression
   432  // Language (CEL) syntax. CEL is a C-like expression language. The
   433  // syntax and semantics of CEL are documented at
   434  // https://github.com/google/cel-spec. Example (Comparison): title:
   435  // "Summary size limit" description: "Determines if a summary is less
   436  // than 100 chars" expression: "document.summary.size() < 100" Example
   437  // (Equality): title: "Requestor is owner" description: "Determines if
   438  // requestor is the document owner" expression: "document.owner ==
   439  // request.auth.claims.email" Example (Logic): title: "Public documents"
   440  // description: "Determine whether the document should be publicly
   441  // visible" expression: "document.type != 'private' && document.type !=
   442  // 'internal'" Example (Data Manipulation): title: "Notification string"
   443  // description: "Create a notification string with a timestamp."
   444  // expression: "'New message received at ' +
   445  // string(document.create_time)" The exact variables and functions that
   446  // may be referenced within an expression are determined by the service
   447  // that evaluates it. See the service documentation for additional
   448  // information.
   449  type Expr struct {
   450  	// Description: Optional. Description of the expression. This is a
   451  	// longer text which describes the expression, e.g. when hovered over it
   452  	// in a UI.
   453  	Description string `json:"description,omitempty"`
   454  
   455  	// Expression: Textual representation of an expression in Common
   456  	// Expression Language syntax.
   457  	Expression string `json:"expression,omitempty"`
   458  
   459  	// Location: Optional. String indicating the location of the expression
   460  	// for error reporting, e.g. a file name and a position in the file.
   461  	Location string `json:"location,omitempty"`
   462  
   463  	// Title: Optional. Title for the expression, i.e. a short string
   464  	// describing its purpose. This can be used e.g. in UIs which allow to
   465  	// enter the expression.
   466  	Title string `json:"title,omitempty"`
   467  
   468  	// ForceSendFields is a list of field names (e.g. "Description") to
   469  	// unconditionally include in API requests. By default, fields with
   470  	// empty values are omitted from API requests. However, any non-pointer,
   471  	// non-interface field appearing in ForceSendFields will be sent to the
   472  	// server regardless of whether the field is empty or not. This may be
   473  	// used to include empty fields in Patch requests.
   474  	ForceSendFields []string `json:"-"`
   475  
   476  	// NullFields is a list of field names (e.g. "Description") to include
   477  	// in API requests with the JSON null value. By default, fields with
   478  	// empty values are omitted from API requests. However, any field with
   479  	// an empty value appearing in NullFields will be sent to the server as
   480  	// null. It is an error if a field in this list has a non-empty value.
   481  	// This may be used to include null fields in Patch requests.
   482  	NullFields []string `json:"-"`
   483  }
   484  
   485  func (s *Expr) MarshalJSON() ([]byte, error) {
   486  	type NoMethod Expr
   487  	raw := NoMethod(*s)
   488  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   489  }
   490  
   491  // Finding: Security Command Center finding. A finding is a record of
   492  // assessment data like security, risk, health, or privacy, that is
   493  // ingested into Security Command Center for presentation, notification,
   494  // analysis, policy testing, and enforcement. For example, a cross-site
   495  // scripting (XSS) vulnerability in an App Engine application is a
   496  // finding.
   497  type Finding struct {
   498  	// Category: The additional taxonomy group within findings from a given
   499  	// source. This field is immutable after creation time. Example:
   500  	// "XSS_FLASH_INJECTION"
   501  	Category string `json:"category,omitempty"`
   502  
   503  	// CreateTime: The time at which the finding was created in Security
   504  	// Command Center.
   505  	CreateTime string `json:"createTime,omitempty"`
   506  
   507  	// EventTime: The time at which the event took place, or when an update
   508  	// to the finding occurred. For example, if the finding represents an
   509  	// open firewall it would capture the time the detector believes the
   510  	// firewall became open. The accuracy is determined by the detector. If
   511  	// the finding were to be resolved afterward, this time would reflect
   512  	// when the finding was resolved.
   513  	EventTime string `json:"eventTime,omitempty"`
   514  
   515  	// ExternalUri: The URI that, if available, points to a web page outside
   516  	// of Security Command Center where additional information about the
   517  	// finding can be found. This field is guaranteed to be either empty or
   518  	// a well formed URL.
   519  	ExternalUri string `json:"externalUri,omitempty"`
   520  
   521  	// Name: The relative resource name of this finding. See:
   522  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
   523  	// "organizations/{organization_id}/sources/{source_id}/findings/{finding
   524  	// _id}"
   525  	Name string `json:"name,omitempty"`
   526  
   527  	// Parent: The relative resource name of the source the finding belongs
   528  	// to. See:
   529  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example:
   530  	// "organizations/{organization_id}/sources/{source_id}"
   531  	Parent string `json:"parent,omitempty"`
   532  
   533  	// ResourceName: For findings on Google Cloud resources, the full
   534  	// resource name of the Google Cloud resource this finding is for. See:
   535  	// https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation
   536  	// time.
   537  	ResourceName string `json:"resourceName,omitempty"`
   538  
   539  	// SecurityMarks: Output only. User specified security marks. These
   540  	// marks are entirely managed by the user and come from the
   541  	// SecurityMarks resource that belongs to the finding.
   542  	SecurityMarks *SecurityMarks `json:"securityMarks,omitempty"`
   543  
   544  	// SourceProperties: Source specific properties. These properties are
   545  	// managed by the source that writes the finding. The key names in the
   546  	// source_properties map must be between 1 and 255 characters, and must
   547  	// start with a letter and contain alphanumeric characters or
   548  	// underscores only.
   549  	SourceProperties googleapi.RawMessage `json:"sourceProperties,omitempty"`
   550  
   551  	// State: The state of the finding.
   552  	//
   553  	// Possible values:
   554  	//   "STATE_UNSPECIFIED" - Unspecified state.
   555  	//   "ACTIVE" - The finding requires attention and has not been
   556  	// addressed yet.
   557  	//   "INACTIVE" - The finding has been fixed, triaged as a non-issue or
   558  	// otherwise addressed and is no longer active.
   559  	State string `json:"state,omitempty"`
   560  
   561  	// ForceSendFields is a list of field names (e.g. "Category") to
   562  	// unconditionally include in API requests. By default, fields with
   563  	// empty values are omitted from API requests. However, any non-pointer,
   564  	// non-interface field appearing in ForceSendFields will be sent to the
   565  	// server regardless of whether the field is empty or not. This may be
   566  	// used to include empty fields in Patch requests.
   567  	ForceSendFields []string `json:"-"`
   568  
   569  	// NullFields is a list of field names (e.g. "Category") to include in
   570  	// API requests with the JSON null value. By default, fields with empty
   571  	// values are omitted from API requests. However, any field with an
   572  	// empty value appearing in NullFields will be sent to the server as
   573  	// null. It is an error if a field in this list has a non-empty value.
   574  	// This may be used to include null fields in Patch requests.
   575  	NullFields []string `json:"-"`
   576  }
   577  
   578  func (s *Finding) MarshalJSON() ([]byte, error) {
   579  	type NoMethod Finding
   580  	raw := NoMethod(*s)
   581  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   582  }
   583  
   584  // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
   585  type GetIamPolicyRequest struct {
   586  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options
   587  	// to `GetIamPolicy`.
   588  	Options *GetPolicyOptions `json:"options,omitempty"`
   589  
   590  	// ForceSendFields is a list of field names (e.g. "Options") to
   591  	// unconditionally include in API requests. By default, fields with
   592  	// empty values are omitted from API requests. However, any non-pointer,
   593  	// non-interface field appearing in ForceSendFields will be sent to the
   594  	// server regardless of whether the field is empty or not. This may be
   595  	// used to include empty fields in Patch requests.
   596  	ForceSendFields []string `json:"-"`
   597  
   598  	// NullFields is a list of field names (e.g. "Options") to include in
   599  	// API requests with the JSON null value. By default, fields with empty
   600  	// values are omitted from API requests. However, any field with an
   601  	// empty value appearing in NullFields will be sent to the server as
   602  	// null. It is an error if a field in this list has a non-empty value.
   603  	// This may be used to include null fields in Patch requests.
   604  	NullFields []string `json:"-"`
   605  }
   606  
   607  func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   608  	type NoMethod GetIamPolicyRequest
   609  	raw := NoMethod(*s)
   610  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   611  }
   612  
   613  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
   614  type GetPolicyOptions struct {
   615  	// RequestedPolicyVersion: Optional. The policy format version to be
   616  	// returned. Valid values are 0, 1, and 3. Requests specifying an
   617  	// invalid value will be rejected. Requests for policies with any
   618  	// conditional bindings must specify version 3. Policies without any
   619  	// conditional bindings may specify any valid value or leave the field
   620  	// unset. To learn which resources support conditions in their IAM
   621  	// policies, see the [IAM
   622  	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
   623  	// olicies).
   624  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
   625  
   626  	// ForceSendFields is a list of field names (e.g.
   627  	// "RequestedPolicyVersion") to unconditionally include in API requests.
   628  	// By default, fields with empty values are omitted from API requests.
   629  	// However, any non-pointer, non-interface field appearing in
   630  	// ForceSendFields will be sent to the server regardless of whether the
   631  	// field is empty or not. This may be used to include empty fields in
   632  	// Patch requests.
   633  	ForceSendFields []string `json:"-"`
   634  
   635  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
   636  	// to include in API requests with the JSON null value. By default,
   637  	// fields with empty values are omitted from API requests. However, any
   638  	// field with an empty value appearing in NullFields will be sent to the
   639  	// server as null. It is an error if a field in this list has a
   640  	// non-empty value. This may be used to include null fields in Patch
   641  	// requests.
   642  	NullFields []string `json:"-"`
   643  }
   644  
   645  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
   646  	type NoMethod GetPolicyOptions
   647  	raw := NoMethod(*s)
   648  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   649  }
   650  
   651  // GoogleCloudSecuritycenterV1NotificationMessage: Cloud SCC's
   652  // Notification
   653  type GoogleCloudSecuritycenterV1NotificationMessage struct {
   654  	// Finding: If it's a Finding based notification config, this field will
   655  	// be populated.
   656  	Finding *Finding `json:"finding,omitempty"`
   657  
   658  	// NotificationConfigName: Name of the notification config that
   659  	// generated current notification.
   660  	NotificationConfigName string `json:"notificationConfigName,omitempty"`
   661  
   662  	// Resource: The Cloud resource tied to this notification's Finding.
   663  	Resource *GoogleCloudSecuritycenterV1Resource `json:"resource,omitempty"`
   664  
   665  	// ForceSendFields is a list of field names (e.g. "Finding") to
   666  	// unconditionally include in API requests. By default, fields with
   667  	// empty values are omitted from API requests. However, any non-pointer,
   668  	// non-interface field appearing in ForceSendFields will be sent to the
   669  	// server regardless of whether the field is empty or not. This may be
   670  	// used to include empty fields in Patch requests.
   671  	ForceSendFields []string `json:"-"`
   672  
   673  	// NullFields is a list of field names (e.g. "Finding") to include in
   674  	// API requests with the JSON null value. By default, fields with empty
   675  	// values are omitted from API requests. However, any field with an
   676  	// empty value appearing in NullFields will be sent to the server as
   677  	// null. It is an error if a field in this list has a non-empty value.
   678  	// This may be used to include null fields in Patch requests.
   679  	NullFields []string `json:"-"`
   680  }
   681  
   682  func (s *GoogleCloudSecuritycenterV1NotificationMessage) MarshalJSON() ([]byte, error) {
   683  	type NoMethod GoogleCloudSecuritycenterV1NotificationMessage
   684  	raw := NoMethod(*s)
   685  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   686  }
   687  
   688  // GoogleCloudSecuritycenterV1Resource:  Information related to the
   689  // Google Cloud resource.
   690  type GoogleCloudSecuritycenterV1Resource struct {
   691  	// Name: The full resource name of the resource. See:
   692  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
   693  	Name string `json:"name,omitempty"`
   694  
   695  	// Parent: The full resource name of resource's parent.
   696  	Parent string `json:"parent,omitempty"`
   697  
   698  	// ParentDisplayName:  The human readable name of resource's parent.
   699  	ParentDisplayName string `json:"parentDisplayName,omitempty"`
   700  
   701  	// Project: The full resource name of project that the resource belongs
   702  	// to.
   703  	Project string `json:"project,omitempty"`
   704  
   705  	// ProjectDisplayName:  The human readable name of project that the
   706  	// resource belongs to.
   707  	ProjectDisplayName string `json:"projectDisplayName,omitempty"`
   708  
   709  	// ForceSendFields is a list of field names (e.g. "Name") to
   710  	// unconditionally include in API requests. By default, fields with
   711  	// empty values are omitted from API requests. However, any non-pointer,
   712  	// non-interface field appearing in ForceSendFields will be sent to the
   713  	// server regardless of whether the field is empty or not. This may be
   714  	// used to include empty fields in Patch requests.
   715  	ForceSendFields []string `json:"-"`
   716  
   717  	// NullFields is a list of field names (e.g. "Name") to include in API
   718  	// requests with the JSON null value. By default, fields with empty
   719  	// values are omitted from API requests. However, any field with an
   720  	// empty value appearing in NullFields will be sent to the server as
   721  	// null. It is an error if a field in this list has a non-empty value.
   722  	// This may be used to include null fields in Patch requests.
   723  	NullFields []string `json:"-"`
   724  }
   725  
   726  func (s *GoogleCloudSecuritycenterV1Resource) MarshalJSON() ([]byte, error) {
   727  	type NoMethod GoogleCloudSecuritycenterV1Resource
   728  	raw := NoMethod(*s)
   729  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   730  }
   731  
   732  // GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse: Response of
   733  // asset discovery run
   734  type GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse struct {
   735  	// Duration: The duration between asset discovery run start and end
   736  	Duration string `json:"duration,omitempty"`
   737  
   738  	// State: The state of an asset discovery run.
   739  	//
   740  	// Possible values:
   741  	//   "STATE_UNSPECIFIED" - Asset discovery run state was unspecified.
   742  	//   "COMPLETED" - Asset discovery run completed successfully.
   743  	//   "SUPERSEDED" - Asset discovery run was cancelled with tasks still
   744  	// pending, as another run for the same organization was started with a
   745  	// higher priority.
   746  	//   "TERMINATED" - Asset discovery run was killed and terminated.
   747  	State string `json:"state,omitempty"`
   748  
   749  	// ForceSendFields is a list of field names (e.g. "Duration") to
   750  	// unconditionally include in API requests. By default, fields with
   751  	// empty values are omitted from API requests. However, any non-pointer,
   752  	// non-interface field appearing in ForceSendFields will be sent to the
   753  	// server regardless of whether the field is empty or not. This may be
   754  	// used to include empty fields in Patch requests.
   755  	ForceSendFields []string `json:"-"`
   756  
   757  	// NullFields is a list of field names (e.g. "Duration") to include in
   758  	// API requests with the JSON null value. By default, fields with empty
   759  	// values are omitted from API requests. However, any field with an
   760  	// empty value appearing in NullFields will be sent to the server as
   761  	// null. It is an error if a field in this list has a non-empty value.
   762  	// This may be used to include null fields in Patch requests.
   763  	NullFields []string `json:"-"`
   764  }
   765  
   766  func (s *GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) {
   767  	type NoMethod GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse
   768  	raw := NoMethod(*s)
   769  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   770  }
   771  
   772  // GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse: Response
   773  // of asset discovery run
   774  type GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse struct {
   775  	// Duration: The duration between asset discovery run start and end
   776  	Duration string `json:"duration,omitempty"`
   777  
   778  	// State: The state of an asset discovery run.
   779  	//
   780  	// Possible values:
   781  	//   "STATE_UNSPECIFIED" - Asset discovery run state was unspecified.
   782  	//   "COMPLETED" - Asset discovery run completed successfully.
   783  	//   "SUPERSEDED" - Asset discovery run was cancelled with tasks still
   784  	// pending, as another run for the same organization was started with a
   785  	// higher priority.
   786  	//   "TERMINATED" - Asset discovery run was killed and terminated.
   787  	State string `json:"state,omitempty"`
   788  
   789  	// ForceSendFields is a list of field names (e.g. "Duration") to
   790  	// unconditionally include in API requests. By default, fields with
   791  	// empty values are omitted from API requests. However, any non-pointer,
   792  	// non-interface field appearing in ForceSendFields will be sent to the
   793  	// server regardless of whether the field is empty or not. This may be
   794  	// used to include empty fields in Patch requests.
   795  	ForceSendFields []string `json:"-"`
   796  
   797  	// NullFields is a list of field names (e.g. "Duration") to include in
   798  	// API requests with the JSON null value. By default, fields with empty
   799  	// values are omitted from API requests. However, any field with an
   800  	// empty value appearing in NullFields will be sent to the server as
   801  	// null. It is an error if a field in this list has a non-empty value.
   802  	// This may be used to include null fields in Patch requests.
   803  	NullFields []string `json:"-"`
   804  }
   805  
   806  func (s *GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) {
   807  	type NoMethod GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse
   808  	raw := NoMethod(*s)
   809  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   810  }
   811  
   812  // GoogleCloudSecuritycenterV1p1beta1Asset: Security Command Center
   813  // representation of a Google Cloud resource. The Asset is a Security
   814  // Command Center resource that captures information about a single
   815  // Google Cloud resource. All modifications to an Asset are only within
   816  // the context of Security Command Center and don't affect the
   817  // referenced Google Cloud resource.
   818  type GoogleCloudSecuritycenterV1p1beta1Asset struct {
   819  	// CreateTime: The time at which the asset was created in Security
   820  	// Command Center.
   821  	CreateTime string `json:"createTime,omitempty"`
   822  
   823  	// IamPolicy: Cloud IAM Policy information associated with the Google
   824  	// Cloud resource described by the Security Command Center asset. This
   825  	// information is managed and defined by the Google Cloud resource and
   826  	// cannot be modified by the user.
   827  	IamPolicy *GoogleCloudSecuritycenterV1p1beta1IamPolicy `json:"iamPolicy,omitempty"`
   828  
   829  	// Name: The relative resource name of this asset. See:
   830  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
   831  	// "organizations/{organization_id}/assets/{asset_id}".
   832  	Name string `json:"name,omitempty"`
   833  
   834  	// ResourceProperties: Resource managed properties. These properties are
   835  	// managed and defined by the Google Cloud resource and cannot be
   836  	// modified by the user.
   837  	ResourceProperties googleapi.RawMessage `json:"resourceProperties,omitempty"`
   838  
   839  	// SecurityCenterProperties: Security Command Center managed properties.
   840  	// These properties are managed by Security Command Center and cannot be
   841  	// modified by the user.
   842  	SecurityCenterProperties *GoogleCloudSecuritycenterV1p1beta1SecurityCenterProperties `json:"securityCenterProperties,omitempty"`
   843  
   844  	// SecurityMarks: User specified security marks. These marks are
   845  	// entirely managed by the user and come from the SecurityMarks resource
   846  	// that belongs to the asset.
   847  	SecurityMarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks `json:"securityMarks,omitempty"`
   848  
   849  	// UpdateTime: The time at which the asset was last updated, added, or
   850  	// deleted in Cloud SCC.
   851  	UpdateTime string `json:"updateTime,omitempty"`
   852  
   853  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   854  	// unconditionally include in API requests. By default, fields with
   855  	// empty values are omitted from API requests. However, any non-pointer,
   856  	// non-interface field appearing in ForceSendFields will be sent to the
   857  	// server regardless of whether the field is empty or not. This may be
   858  	// used to include empty fields in Patch requests.
   859  	ForceSendFields []string `json:"-"`
   860  
   861  	// NullFields is a list of field names (e.g. "CreateTime") to include in
   862  	// API requests with the JSON null value. By default, fields with empty
   863  	// values are omitted from API requests. However, any field with an
   864  	// empty value appearing in NullFields will be sent to the server as
   865  	// null. It is an error if a field in this list has a non-empty value.
   866  	// This may be used to include null fields in Patch requests.
   867  	NullFields []string `json:"-"`
   868  }
   869  
   870  func (s *GoogleCloudSecuritycenterV1p1beta1Asset) MarshalJSON() ([]byte, error) {
   871  	type NoMethod GoogleCloudSecuritycenterV1p1beta1Asset
   872  	raw := NoMethod(*s)
   873  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   874  }
   875  
   876  // GoogleCloudSecuritycenterV1p1beta1Finding: Security Command Center
   877  // finding. A finding is a record of assessment data (security, risk,
   878  // health or privacy) ingested into Security Command Center for
   879  // presentation, notification, analysis, policy testing, and
   880  // enforcement. For example, an XSS vulnerability in an App Engine
   881  // application is a finding.
   882  type GoogleCloudSecuritycenterV1p1beta1Finding struct {
   883  	// Category: The additional taxonomy group within findings from a given
   884  	// source. This field is immutable after creation time. Example:
   885  	// "XSS_FLASH_INJECTION"
   886  	Category string `json:"category,omitempty"`
   887  
   888  	// CreateTime: The time at which the finding was created in Security
   889  	// Command Center.
   890  	CreateTime string `json:"createTime,omitempty"`
   891  
   892  	// EventTime: The time at which the event took place, or when an update
   893  	// to the finding occurred. For example, if the finding represents an
   894  	// open firewall it would capture the time the detector believes the
   895  	// firewall became open. The accuracy is determined by the detector. If
   896  	// the finding were to be resolved afterward, this time would reflect
   897  	// when the finding was resolved.
   898  	EventTime string `json:"eventTime,omitempty"`
   899  
   900  	// ExternalUri: The URI that, if available, points to a web page outside
   901  	// of Security Command Center where additional information about the
   902  	// finding can be found. This field is guaranteed to be either empty or
   903  	// a well formed URL.
   904  	ExternalUri string `json:"externalUri,omitempty"`
   905  
   906  	// Name: The relative resource name of this finding. See:
   907  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
   908  	// "organizations/{organization_id}/sources/{source_id}/findings/{finding
   909  	// _id}"
   910  	Name string `json:"name,omitempty"`
   911  
   912  	// Parent: The relative resource name of the source the finding belongs
   913  	// to. See:
   914  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example:
   915  	// "organizations/{organization_id}/sources/{source_id}"
   916  	Parent string `json:"parent,omitempty"`
   917  
   918  	// ResourceName: For findings on Google Cloud resources, the full
   919  	// resource name of the Google Cloud resource this finding is for. See:
   920  	// https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation
   921  	// time.
   922  	ResourceName string `json:"resourceName,omitempty"`
   923  
   924  	// SecurityMarks: Output only. User specified security marks. These
   925  	// marks are entirely managed by the user and come from the
   926  	// SecurityMarks resource that belongs to the finding.
   927  	SecurityMarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks `json:"securityMarks,omitempty"`
   928  
   929  	// Severity: The severity of the finding.
   930  	//
   931  	// Possible values:
   932  	//   "SEVERITY_UNSPECIFIED" - No severity specified. The default value.
   933  	//   "CRITICAL" - Critical severity.
   934  	//   "HIGH" - High severity.
   935  	//   "MEDIUM" - Medium severity.
   936  	//   "LOW" - Low severity.
   937  	Severity string `json:"severity,omitempty"`
   938  
   939  	// SourceProperties: Source specific properties. These properties are
   940  	// managed by the source that writes the finding. The key names in the
   941  	// source_properties map must be between 1 and 255 characters, and must
   942  	// start with a letter and contain alphanumeric characters or
   943  	// underscores only.
   944  	SourceProperties googleapi.RawMessage `json:"sourceProperties,omitempty"`
   945  
   946  	// State: The state of the finding.
   947  	//
   948  	// Possible values:
   949  	//   "STATE_UNSPECIFIED" - Unspecified state.
   950  	//   "ACTIVE" - The finding requires attention and has not been
   951  	// addressed yet.
   952  	//   "INACTIVE" - The finding has been fixed, triaged as a non-issue or
   953  	// otherwise addressed and is no longer active.
   954  	State string `json:"state,omitempty"`
   955  
   956  	// ServerResponse contains the HTTP response code and headers from the
   957  	// server.
   958  	googleapi.ServerResponse `json:"-"`
   959  
   960  	// ForceSendFields is a list of field names (e.g. "Category") to
   961  	// unconditionally include in API requests. By default, fields with
   962  	// empty values are omitted from API requests. However, any non-pointer,
   963  	// non-interface field appearing in ForceSendFields will be sent to the
   964  	// server regardless of whether the field is empty or not. This may be
   965  	// used to include empty fields in Patch requests.
   966  	ForceSendFields []string `json:"-"`
   967  
   968  	// NullFields is a list of field names (e.g. "Category") to include in
   969  	// API requests with the JSON null value. By default, fields with empty
   970  	// values are omitted from API requests. However, any field with an
   971  	// empty value appearing in NullFields will be sent to the server as
   972  	// null. It is an error if a field in this list has a non-empty value.
   973  	// This may be used to include null fields in Patch requests.
   974  	NullFields []string `json:"-"`
   975  }
   976  
   977  func (s *GoogleCloudSecuritycenterV1p1beta1Finding) MarshalJSON() ([]byte, error) {
   978  	type NoMethod GoogleCloudSecuritycenterV1p1beta1Finding
   979  	raw := NoMethod(*s)
   980  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   981  }
   982  
   983  // GoogleCloudSecuritycenterV1p1beta1IamPolicy: Cloud IAM Policy
   984  // information associated with the Google Cloud resource described by
   985  // the Security Command Center asset. This information is managed and
   986  // defined by the Google Cloud resource and cannot be modified by the
   987  // user.
   988  type GoogleCloudSecuritycenterV1p1beta1IamPolicy struct {
   989  	// PolicyBlob: The JSON representation of the Policy associated with the
   990  	// asset. See https://cloud.google.com/iam/docs/reference/rest/v1/Policy
   991  	// for format details.
   992  	PolicyBlob string `json:"policyBlob,omitempty"`
   993  
   994  	// ForceSendFields is a list of field names (e.g. "PolicyBlob") to
   995  	// unconditionally include in API requests. By default, fields with
   996  	// empty values are omitted from API requests. However, any non-pointer,
   997  	// non-interface field appearing in ForceSendFields will be sent to the
   998  	// server regardless of whether the field is empty or not. This may be
   999  	// used to include empty fields in Patch requests.
  1000  	ForceSendFields []string `json:"-"`
  1001  
  1002  	// NullFields is a list of field names (e.g. "PolicyBlob") to include in
  1003  	// API requests with the JSON null value. By default, fields with empty
  1004  	// values are omitted from API requests. However, any field with an
  1005  	// empty value appearing in NullFields will be sent to the server as
  1006  	// null. It is an error if a field in this list has a non-empty value.
  1007  	// This may be used to include null fields in Patch requests.
  1008  	NullFields []string `json:"-"`
  1009  }
  1010  
  1011  func (s *GoogleCloudSecuritycenterV1p1beta1IamPolicy) MarshalJSON() ([]byte, error) {
  1012  	type NoMethod GoogleCloudSecuritycenterV1p1beta1IamPolicy
  1013  	raw := NoMethod(*s)
  1014  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1015  }
  1016  
  1017  // GoogleCloudSecuritycenterV1p1beta1NotificationMessage: Security
  1018  // Command Center's Notification
  1019  type GoogleCloudSecuritycenterV1p1beta1NotificationMessage struct {
  1020  	// Finding: If it's a Finding based notification config, this field will
  1021  	// be populated.
  1022  	Finding *GoogleCloudSecuritycenterV1p1beta1Finding `json:"finding,omitempty"`
  1023  
  1024  	// NotificationConfigName: Name of the notification config that
  1025  	// generated current notification.
  1026  	NotificationConfigName string `json:"notificationConfigName,omitempty"`
  1027  
  1028  	// Resource: The Cloud resource tied to the notification.
  1029  	Resource *GoogleCloudSecuritycenterV1p1beta1Resource `json:"resource,omitempty"`
  1030  
  1031  	// TemporalAsset: If it's an asset based notification config, this field
  1032  	// will be populated.
  1033  	TemporalAsset *GoogleCloudSecuritycenterV1p1beta1TemporalAsset `json:"temporalAsset,omitempty"`
  1034  
  1035  	// ForceSendFields is a list of field names (e.g. "Finding") to
  1036  	// unconditionally include in API requests. By default, fields with
  1037  	// empty values are omitted from API requests. However, any non-pointer,
  1038  	// non-interface field appearing in ForceSendFields will be sent to the
  1039  	// server regardless of whether the field is empty or not. This may be
  1040  	// used to include empty fields in Patch requests.
  1041  	ForceSendFields []string `json:"-"`
  1042  
  1043  	// NullFields is a list of field names (e.g. "Finding") to include in
  1044  	// API requests with the JSON null value. By default, fields with empty
  1045  	// values are omitted from API requests. However, any field with an
  1046  	// empty value appearing in NullFields will be sent to the server as
  1047  	// null. It is an error if a field in this list has a non-empty value.
  1048  	// This may be used to include null fields in Patch requests.
  1049  	NullFields []string `json:"-"`
  1050  }
  1051  
  1052  func (s *GoogleCloudSecuritycenterV1p1beta1NotificationMessage) MarshalJSON() ([]byte, error) {
  1053  	type NoMethod GoogleCloudSecuritycenterV1p1beta1NotificationMessage
  1054  	raw := NoMethod(*s)
  1055  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1056  }
  1057  
  1058  // GoogleCloudSecuritycenterV1p1beta1Resource:  Information related to
  1059  // the Google Cloud resource.
  1060  type GoogleCloudSecuritycenterV1p1beta1Resource struct {
  1061  	// Name: The full resource name of the resource. See:
  1062  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  1063  	Name string `json:"name,omitempty"`
  1064  
  1065  	// Parent: The full resource name of resource's parent.
  1066  	Parent string `json:"parent,omitempty"`
  1067  
  1068  	// ParentDisplayName:  The human readable name of resource's parent.
  1069  	ParentDisplayName string `json:"parentDisplayName,omitempty"`
  1070  
  1071  	// Project: The full resource name of project that the resource belongs
  1072  	// to.
  1073  	Project string `json:"project,omitempty"`
  1074  
  1075  	// ProjectDisplayName:  The human readable name of project that the
  1076  	// resource belongs to.
  1077  	ProjectDisplayName string `json:"projectDisplayName,omitempty"`
  1078  
  1079  	// ForceSendFields is a list of field names (e.g. "Name") to
  1080  	// unconditionally include in API requests. By default, fields with
  1081  	// empty values are omitted from API requests. However, any non-pointer,
  1082  	// non-interface field appearing in ForceSendFields will be sent to the
  1083  	// server regardless of whether the field is empty or not. This may be
  1084  	// used to include empty fields in Patch requests.
  1085  	ForceSendFields []string `json:"-"`
  1086  
  1087  	// NullFields is a list of field names (e.g. "Name") to include in API
  1088  	// requests with the JSON null value. By default, fields with empty
  1089  	// values are omitted from API requests. However, any field with an
  1090  	// empty value appearing in NullFields will be sent to the server as
  1091  	// null. It is an error if a field in this list has a non-empty value.
  1092  	// This may be used to include null fields in Patch requests.
  1093  	NullFields []string `json:"-"`
  1094  }
  1095  
  1096  func (s *GoogleCloudSecuritycenterV1p1beta1Resource) MarshalJSON() ([]byte, error) {
  1097  	type NoMethod GoogleCloudSecuritycenterV1p1beta1Resource
  1098  	raw := NoMethod(*s)
  1099  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1100  }
  1101  
  1102  // GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse: Response
  1103  // of asset discovery run
  1104  type GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse struct {
  1105  	// Duration: The duration between asset discovery run start and end
  1106  	Duration string `json:"duration,omitempty"`
  1107  
  1108  	// State: The state of an asset discovery run.
  1109  	//
  1110  	// Possible values:
  1111  	//   "STATE_UNSPECIFIED" - Asset discovery run state was unspecified.
  1112  	//   "COMPLETED" - Asset discovery run completed successfully.
  1113  	//   "SUPERSEDED" - Asset discovery run was cancelled with tasks still
  1114  	// pending, as another run for the same organization was started with a
  1115  	// higher priority.
  1116  	//   "TERMINATED" - Asset discovery run was killed and terminated.
  1117  	State string `json:"state,omitempty"`
  1118  
  1119  	// ForceSendFields is a list of field names (e.g. "Duration") to
  1120  	// unconditionally include in API requests. By default, fields with
  1121  	// empty values are omitted from API requests. However, any non-pointer,
  1122  	// non-interface field appearing in ForceSendFields will be sent to the
  1123  	// server regardless of whether the field is empty or not. This may be
  1124  	// used to include empty fields in Patch requests.
  1125  	ForceSendFields []string `json:"-"`
  1126  
  1127  	// NullFields is a list of field names (e.g. "Duration") to include in
  1128  	// API requests with the JSON null value. By default, fields with empty
  1129  	// values are omitted from API requests. However, any field with an
  1130  	// empty value appearing in NullFields will be sent to the server as
  1131  	// null. It is an error if a field in this list has a non-empty value.
  1132  	// This may be used to include null fields in Patch requests.
  1133  	NullFields []string `json:"-"`
  1134  }
  1135  
  1136  func (s *GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) {
  1137  	type NoMethod GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse
  1138  	raw := NoMethod(*s)
  1139  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1140  }
  1141  
  1142  // GoogleCloudSecuritycenterV1p1beta1SecurityCenterProperties: Security
  1143  // Command Center managed properties. These properties are managed by
  1144  // Security Command Center and cannot be modified by the user.
  1145  type GoogleCloudSecuritycenterV1p1beta1SecurityCenterProperties struct {
  1146  	// ResourceDisplayName: The user defined display name for this resource.
  1147  	ResourceDisplayName string `json:"resourceDisplayName,omitempty"`
  1148  
  1149  	// ResourceName: The full resource name of the Google Cloud resource
  1150  	// this asset represents. This field is immutable after create time.
  1151  	// See:
  1152  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  1153  	ResourceName string `json:"resourceName,omitempty"`
  1154  
  1155  	// ResourceOwners: Owners of the Google Cloud resource.
  1156  	ResourceOwners []string `json:"resourceOwners,omitempty"`
  1157  
  1158  	// ResourceParent: The full resource name of the immediate parent of the
  1159  	// resource. See:
  1160  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  1161  	ResourceParent string `json:"resourceParent,omitempty"`
  1162  
  1163  	// ResourceParentDisplayName: The user defined display name for the
  1164  	// parent of this resource.
  1165  	ResourceParentDisplayName string `json:"resourceParentDisplayName,omitempty"`
  1166  
  1167  	// ResourceProject: The full resource name of the project the resource
  1168  	// belongs to. See:
  1169  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  1170  	ResourceProject string `json:"resourceProject,omitempty"`
  1171  
  1172  	// ResourceProjectDisplayName: The user defined display name for the
  1173  	// project of this resource.
  1174  	ResourceProjectDisplayName string `json:"resourceProjectDisplayName,omitempty"`
  1175  
  1176  	// ResourceType: The type of the Google Cloud resource. Examples
  1177  	// include: APPLICATION, PROJECT, and ORGANIZATION. This is a case
  1178  	// insensitive field defined by Security Command Center and/or the
  1179  	// producer of the resource and is immutable after create time.
  1180  	ResourceType string `json:"resourceType,omitempty"`
  1181  
  1182  	// ForceSendFields is a list of field names (e.g. "ResourceDisplayName")
  1183  	// to unconditionally include in API requests. By default, fields with
  1184  	// empty values are omitted from API requests. However, any non-pointer,
  1185  	// non-interface field appearing in ForceSendFields will be sent to the
  1186  	// server regardless of whether the field is empty or not. This may be
  1187  	// used to include empty fields in Patch requests.
  1188  	ForceSendFields []string `json:"-"`
  1189  
  1190  	// NullFields is a list of field names (e.g. "ResourceDisplayName") to
  1191  	// include in API requests with the JSON null value. By default, fields
  1192  	// with empty values are omitted from API requests. However, any field
  1193  	// with an empty value appearing in NullFields will be sent to the
  1194  	// server as null. It is an error if a field in this list has a
  1195  	// non-empty value. This may be used to include null fields in Patch
  1196  	// requests.
  1197  	NullFields []string `json:"-"`
  1198  }
  1199  
  1200  func (s *GoogleCloudSecuritycenterV1p1beta1SecurityCenterProperties) MarshalJSON() ([]byte, error) {
  1201  	type NoMethod GoogleCloudSecuritycenterV1p1beta1SecurityCenterProperties
  1202  	raw := NoMethod(*s)
  1203  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1204  }
  1205  
  1206  // GoogleCloudSecuritycenterV1p1beta1SecurityMarks: User specified
  1207  // security marks that are attached to the parent Security Command
  1208  // Center resource. Security marks are scoped within a Security Command
  1209  // Center organization -- they can be modified and viewed by all users
  1210  // who have proper permissions on the organization.
  1211  type GoogleCloudSecuritycenterV1p1beta1SecurityMarks struct {
  1212  	// Marks: Mutable user specified security marks belonging to the parent
  1213  	// resource. Constraints are as follows: * Keys and values are treated
  1214  	// as case insensitive * Keys must be between 1 - 256 characters
  1215  	// (inclusive) * Keys must be letters, numbers, underscores, or dashes *
  1216  	// Values have leading and trailing whitespace trimmed, remaining
  1217  	// characters must be between 1 - 4096 characters (inclusive)
  1218  	Marks map[string]string `json:"marks,omitempty"`
  1219  
  1220  	// Name: The relative resource name of the SecurityMarks. See:
  1221  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks"
  1222  	// "organizations/{organization_id}/sources/{source_id}/findings/{finding
  1223  	// _id}/securityMarks".
  1224  	Name string `json:"name,omitempty"`
  1225  
  1226  	// ServerResponse contains the HTTP response code and headers from the
  1227  	// server.
  1228  	googleapi.ServerResponse `json:"-"`
  1229  
  1230  	// ForceSendFields is a list of field names (e.g. "Marks") to
  1231  	// unconditionally include in API requests. By default, fields with
  1232  	// empty values are omitted from API requests. However, any non-pointer,
  1233  	// non-interface field appearing in ForceSendFields will be sent to the
  1234  	// server regardless of whether the field is empty or not. This may be
  1235  	// used to include empty fields in Patch requests.
  1236  	ForceSendFields []string `json:"-"`
  1237  
  1238  	// NullFields is a list of field names (e.g. "Marks") to include in API
  1239  	// requests with the JSON null value. By default, fields with empty
  1240  	// values are omitted from API requests. However, any field with an
  1241  	// empty value appearing in NullFields will be sent to the server as
  1242  	// null. It is an error if a field in this list has a non-empty value.
  1243  	// This may be used to include null fields in Patch requests.
  1244  	NullFields []string `json:"-"`
  1245  }
  1246  
  1247  func (s *GoogleCloudSecuritycenterV1p1beta1SecurityMarks) MarshalJSON() ([]byte, error) {
  1248  	type NoMethod GoogleCloudSecuritycenterV1p1beta1SecurityMarks
  1249  	raw := NoMethod(*s)
  1250  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1251  }
  1252  
  1253  // GoogleCloudSecuritycenterV1p1beta1TemporalAsset: Wrapper over asset
  1254  // object that also captures the state change for the asset e.g. if it
  1255  // was a newly created asset vs updated or deleted asset.
  1256  type GoogleCloudSecuritycenterV1p1beta1TemporalAsset struct {
  1257  	// Asset: Asset data that includes attributes, properties and marks
  1258  	// about the asset.
  1259  	Asset *GoogleCloudSecuritycenterV1p1beta1Asset `json:"asset,omitempty"`
  1260  
  1261  	// ChangeType: Represents if the asset was created/updated/deleted.
  1262  	//
  1263  	// Possible values:
  1264  	//   "CHANGE_TYPE_UNSPECIFIED" - Unspecified or default.
  1265  	//   "CREATED" - Newly created Asset
  1266  	//   "UPDATED" - Asset was updated.
  1267  	//   "DELETED" - Asset was deleted.
  1268  	ChangeType string `json:"changeType,omitempty"`
  1269  
  1270  	// ForceSendFields is a list of field names (e.g. "Asset") to
  1271  	// unconditionally include in API requests. By default, fields with
  1272  	// empty values are omitted from API requests. However, any non-pointer,
  1273  	// non-interface field appearing in ForceSendFields will be sent to the
  1274  	// server regardless of whether the field is empty or not. This may be
  1275  	// used to include empty fields in Patch requests.
  1276  	ForceSendFields []string `json:"-"`
  1277  
  1278  	// NullFields is a list of field names (e.g. "Asset") to include in API
  1279  	// requests with the JSON null value. By default, fields with empty
  1280  	// values are omitted from API requests. However, any field with an
  1281  	// empty value appearing in NullFields will be sent to the server as
  1282  	// null. It is an error if a field in this list has a non-empty value.
  1283  	// This may be used to include null fields in Patch requests.
  1284  	NullFields []string `json:"-"`
  1285  }
  1286  
  1287  func (s *GoogleCloudSecuritycenterV1p1beta1TemporalAsset) MarshalJSON() ([]byte, error) {
  1288  	type NoMethod GoogleCloudSecuritycenterV1p1beta1TemporalAsset
  1289  	raw := NoMethod(*s)
  1290  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1291  }
  1292  
  1293  // GroupAssetsRequest: Request message for grouping by assets.
  1294  type GroupAssetsRequest struct {
  1295  	// CompareDuration: When compare_duration is set, the GroupResult's
  1296  	// "state_change" property is updated to indicate whether the asset was
  1297  	// added, removed, or remained present during the compare_duration
  1298  	// period of time that precedes the read_time. This is the time between
  1299  	// (read_time - compare_duration) and read_time. The state change value
  1300  	// is derived based on the presence of the asset at the two points in
  1301  	// time. Intermediate state changes between the two times don't affect
  1302  	// the result. For example, the results aren't affected if the asset is
  1303  	// removed and re-created again. Possible "state_change" values when
  1304  	// compare_duration is specified: * "ADDED": indicates that the asset
  1305  	// was not present at the start of compare_duration, but present at
  1306  	// reference_time. * "REMOVED": indicates that the asset was present at
  1307  	// the start of compare_duration, but not present at reference_time. *
  1308  	// "ACTIVE": indicates that the asset was present at both the start and
  1309  	// the end of the time period defined by compare_duration and
  1310  	// reference_time. If compare_duration is not specified, then the only
  1311  	// possible state_change is "UNUSED", which will be the state_change set
  1312  	// for all assets present at read_time. If this field is set then
  1313  	// `state_change` must be a specified field in `group_by`.
  1314  	CompareDuration string `json:"compareDuration,omitempty"`
  1315  
  1316  	// Filter: Expression that defines the filter to apply across assets.
  1317  	// The expression is a list of zero or more restrictions combined via
  1318  	// logical operators `AND` and `OR`. Parentheses are supported, and `OR`
  1319  	// has higher precedence than `AND`. Restrictions have the form ` ` and
  1320  	// may have a `-` character in front of them to indicate negation. The
  1321  	// fields map to those defined in the Asset resource. Examples include:
  1322  	// * name * security_center_properties.resource_name *
  1323  	// resource_properties.a_property * security_marks.marks.marka The
  1324  	// supported operators are: * `=` for all value types. * `>`, `<`, `>=`,
  1325  	// `<=` for integer values. * `:`, meaning substring matching, for
  1326  	// strings. The supported value types are: * string literals in quotes.
  1327  	// * integer literals without quotes. * boolean literals `true` and
  1328  	// `false` without quotes. The following field and operator combinations
  1329  	// are supported: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=`
  1330  	// Usage: This should be milliseconds since epoch or an RFC3339 string.
  1331  	// Examples: `update_time = "2019-06-10T16:07:18-07:00" `update_time =
  1332  	// 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
  1333  	// should be milliseconds since epoch or an RFC3339 string. Examples:
  1334  	// `create_time = "2019-06-10T16:07:18-07:00" `create_time =
  1335  	// 1560208038000` * iam_policy.policy_blob: `=`, `:` *
  1336  	// resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` *
  1337  	// security_marks.marks: `=`, `:` *
  1338  	// security_center_properties.resource_name: `=`, `:` *
  1339  	// security_center_properties.resource_name_display_name: `=`, `:` *
  1340  	// security_center_properties.resource_type: `=`, `:` *
  1341  	// security_center_properties.resource_parent: `=`, `:` *
  1342  	// security_center_properties.resource_parent_display_name: `=`, `:` *
  1343  	// security_center_properties.resource_project: `=`, `:` *
  1344  	// security_center_properties.resource_project_display_name: `=`, `:` *
  1345  	// security_center_properties.resource_owners: `=`, `:` For example,
  1346  	// `resource_properties.size = 100` is a valid filter string. Use a
  1347  	// partial match on the empty string to filter based on a property
  1348  	// existing: `resource_properties.my_property : "" Use a negated
  1349  	// partial match on the empty string to filter based on a property not
  1350  	// existing: `-resource_properties.my_property : ""
  1351  	Filter string `json:"filter,omitempty"`
  1352  
  1353  	// GroupBy: Required. Expression that defines what assets fields to use
  1354  	// for grouping. The string value should follow SQL syntax: comma
  1355  	// separated list of fields. For example:
  1356  	// "security_center_properties.resource_project,security_center_propertie
  1357  	// s.project". The following fields are supported when compare_duration
  1358  	// is not set: * security_center_properties.resource_project *
  1359  	// security_center_properties.resource_project_display_name *
  1360  	// security_center_properties.resource_type *
  1361  	// security_center_properties.resource_parent *
  1362  	// security_center_properties.resource_parent_display_name The following
  1363  	// fields are supported when compare_duration is set: *
  1364  	// security_center_properties.resource_type *
  1365  	// security_center_properties.resource_project_display_name *
  1366  	// security_center_properties.resource_parent_display_name
  1367  	GroupBy string `json:"groupBy,omitempty"`
  1368  
  1369  	// PageSize: The maximum number of results to return in a single
  1370  	// response. Default is 10, minimum is 1, maximum is 1000.
  1371  	PageSize int64 `json:"pageSize,omitempty"`
  1372  
  1373  	// PageToken: The value returned by the last `GroupAssetsResponse`;
  1374  	// indicates that this is a continuation of a prior `GroupAssets` call,
  1375  	// and that the system should return the next page of data.
  1376  	PageToken string `json:"pageToken,omitempty"`
  1377  
  1378  	// ReadTime: Time used as a reference point when filtering assets. The
  1379  	// filter is limited to assets existing at the supplied time and their
  1380  	// values are those at that specific time. Absence of this field will
  1381  	// default to the API's version of NOW.
  1382  	ReadTime string `json:"readTime,omitempty"`
  1383  
  1384  	// ForceSendFields is a list of field names (e.g. "CompareDuration") to
  1385  	// unconditionally include in API requests. By default, fields with
  1386  	// empty values are omitted from API requests. However, any non-pointer,
  1387  	// non-interface field appearing in ForceSendFields will be sent to the
  1388  	// server regardless of whether the field is empty or not. This may be
  1389  	// used to include empty fields in Patch requests.
  1390  	ForceSendFields []string `json:"-"`
  1391  
  1392  	// NullFields is a list of field names (e.g. "CompareDuration") to
  1393  	// include in API requests with the JSON null value. By default, fields
  1394  	// with empty values are omitted from API requests. However, any field
  1395  	// with an empty value appearing in NullFields will be sent to the
  1396  	// server as null. It is an error if a field in this list has a
  1397  	// non-empty value. This may be used to include null fields in Patch
  1398  	// requests.
  1399  	NullFields []string `json:"-"`
  1400  }
  1401  
  1402  func (s *GroupAssetsRequest) MarshalJSON() ([]byte, error) {
  1403  	type NoMethod GroupAssetsRequest
  1404  	raw := NoMethod(*s)
  1405  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1406  }
  1407  
  1408  // GroupAssetsResponse: Response message for grouping by assets.
  1409  type GroupAssetsResponse struct {
  1410  	// GroupByResults: Group results. There exists an element for each
  1411  	// existing unique combination of property/values. The element contains
  1412  	// a count for the number of times those specific property/values
  1413  	// appear.
  1414  	GroupByResults []*GroupResult `json:"groupByResults,omitempty"`
  1415  
  1416  	// NextPageToken: Token to retrieve the next page of results, or empty
  1417  	// if there are no more results.
  1418  	NextPageToken string `json:"nextPageToken,omitempty"`
  1419  
  1420  	// ReadTime: Time used for executing the groupBy request.
  1421  	ReadTime string `json:"readTime,omitempty"`
  1422  
  1423  	// TotalSize: The total number of results matching the query.
  1424  	TotalSize int64 `json:"totalSize,omitempty"`
  1425  
  1426  	// ServerResponse contains the HTTP response code and headers from the
  1427  	// server.
  1428  	googleapi.ServerResponse `json:"-"`
  1429  
  1430  	// ForceSendFields is a list of field names (e.g. "GroupByResults") to
  1431  	// unconditionally include in API requests. By default, fields with
  1432  	// empty values are omitted from API requests. However, any non-pointer,
  1433  	// non-interface field appearing in ForceSendFields will be sent to the
  1434  	// server regardless of whether the field is empty or not. This may be
  1435  	// used to include empty fields in Patch requests.
  1436  	ForceSendFields []string `json:"-"`
  1437  
  1438  	// NullFields is a list of field names (e.g. "GroupByResults") to
  1439  	// include in API requests with the JSON null value. By default, fields
  1440  	// with empty values are omitted from API requests. However, any field
  1441  	// with an empty value appearing in NullFields will be sent to the
  1442  	// server as null. It is an error if a field in this list has a
  1443  	// non-empty value. This may be used to include null fields in Patch
  1444  	// requests.
  1445  	NullFields []string `json:"-"`
  1446  }
  1447  
  1448  func (s *GroupAssetsResponse) MarshalJSON() ([]byte, error) {
  1449  	type NoMethod GroupAssetsResponse
  1450  	raw := NoMethod(*s)
  1451  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1452  }
  1453  
  1454  // GroupFindingsRequest: Request message for grouping by findings.
  1455  type GroupFindingsRequest struct {
  1456  	// CompareDuration: When compare_duration is set, the GroupResult's
  1457  	// "state_change" attribute is updated to indicate whether the finding
  1458  	// had its state changed, the finding's state remained unchanged, or if
  1459  	// the finding was added during the compare_duration period of time that
  1460  	// precedes the read_time. This is the time between (read_time -
  1461  	// compare_duration) and read_time. The state_change value is derived
  1462  	// based on the presence and state of the finding at the two points in
  1463  	// time. Intermediate state changes between the two times don't affect
  1464  	// the result. For example, the results aren't affected if the finding
  1465  	// is made inactive and then active again. Possible "state_change"
  1466  	// values when compare_duration is specified: * "CHANGED": indicates
  1467  	// that the finding was present and matched the given filter at the
  1468  	// start of compare_duration, but changed its state at read_time. *
  1469  	// "UNCHANGED": indicates that the finding was present and matched the
  1470  	// given filter at the start of compare_duration and did not change
  1471  	// state at read_time. * "ADDED": indicates that the finding did not
  1472  	// match the given filter or was not present at the start of
  1473  	// compare_duration, but was present at read_time. * "REMOVED":
  1474  	// indicates that the finding was present and matched the filter at the
  1475  	// start of compare_duration, but did not match the filter at read_time.
  1476  	// If compare_duration is not specified, then the only possible
  1477  	// state_change is "UNUSED", which will be the state_change set for all
  1478  	// findings present at read_time. If this field is set then
  1479  	// `state_change` must be a specified field in `group_by`.
  1480  	CompareDuration string `json:"compareDuration,omitempty"`
  1481  
  1482  	// Filter: Expression that defines the filter to apply across findings.
  1483  	// The expression is a list of one or more restrictions combined via
  1484  	// logical operators `AND` and `OR`. Parentheses are supported, and `OR`
  1485  	// has higher precedence than `AND`. Restrictions have the form ` ` and
  1486  	// may have a `-` character in front of them to indicate negation.
  1487  	// Examples include: * name * source_properties.a_property *
  1488  	// security_marks.marks.marka The supported operators are: * `=` for all
  1489  	// value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`,
  1490  	// meaning substring matching, for strings. The supported value types
  1491  	// are: * string literals in quotes. * integer literals without quotes.
  1492  	// * boolean literals `true` and `false` without quotes. The following
  1493  	// field and operator combinations are supported: * name: `=` * parent:
  1494  	// `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`,
  1495  	// `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=`
  1496  	// Usage: This should be milliseconds since epoch or an RFC3339 string.
  1497  	// Examples: `event_time = "2019-06-10T16:07:18-07:00" `event_time =
  1498  	// 1560208038000` * security_marks.marks: `=`, `:` * source_properties:
  1499  	// `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size =
  1500  	// 100` is a valid filter string. Use a partial match on the empty
  1501  	// string to filter based on a property existing:
  1502  	// `source_properties.my_property : "" Use a negated partial match on
  1503  	// the empty string to filter based on a property not existing:
  1504  	// `-source_properties.my_property : ""
  1505  	Filter string `json:"filter,omitempty"`
  1506  
  1507  	// GroupBy: Required. Expression that defines what assets fields to use
  1508  	// for grouping (including `state_change`). The string value should
  1509  	// follow SQL syntax: comma separated list of fields. For example:
  1510  	// "parent,resource_name". The following fields are supported: *
  1511  	// resource_name * category * state * parent The following fields are
  1512  	// supported when compare_duration is set: * state_change
  1513  	GroupBy string `json:"groupBy,omitempty"`
  1514  
  1515  	// PageSize: The maximum number of results to return in a single
  1516  	// response. Default is 10, minimum is 1, maximum is 1000.
  1517  	PageSize int64 `json:"pageSize,omitempty"`
  1518  
  1519  	// PageToken: The value returned by the last `GroupFindingsResponse`;
  1520  	// indicates that this is a continuation of a prior `GroupFindings`
  1521  	// call, and that the system should return the next page of data.
  1522  	PageToken string `json:"pageToken,omitempty"`
  1523  
  1524  	// ReadTime: Time used as a reference point when filtering findings. The
  1525  	// filter is limited to findings existing at the supplied time and their
  1526  	// values are those at that specific time. Absence of this field will
  1527  	// default to the API's version of NOW.
  1528  	ReadTime string `json:"readTime,omitempty"`
  1529  
  1530  	// ForceSendFields is a list of field names (e.g. "CompareDuration") to
  1531  	// unconditionally include in API requests. By default, fields with
  1532  	// empty values are omitted from API requests. However, any non-pointer,
  1533  	// non-interface field appearing in ForceSendFields will be sent to the
  1534  	// server regardless of whether the field is empty or not. This may be
  1535  	// used to include empty fields in Patch requests.
  1536  	ForceSendFields []string `json:"-"`
  1537  
  1538  	// NullFields is a list of field names (e.g. "CompareDuration") to
  1539  	// include in API requests with the JSON null value. By default, fields
  1540  	// with empty values are omitted from API requests. However, any field
  1541  	// with an empty value appearing in NullFields will be sent to the
  1542  	// server as null. It is an error if a field in this list has a
  1543  	// non-empty value. This may be used to include null fields in Patch
  1544  	// requests.
  1545  	NullFields []string `json:"-"`
  1546  }
  1547  
  1548  func (s *GroupFindingsRequest) MarshalJSON() ([]byte, error) {
  1549  	type NoMethod GroupFindingsRequest
  1550  	raw := NoMethod(*s)
  1551  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1552  }
  1553  
  1554  // GroupFindingsResponse: Response message for group by findings.
  1555  type GroupFindingsResponse struct {
  1556  	// GroupByResults: Group results. There exists an element for each
  1557  	// existing unique combination of property/values. The element contains
  1558  	// a count for the number of times those specific property/values
  1559  	// appear.
  1560  	GroupByResults []*GroupResult `json:"groupByResults,omitempty"`
  1561  
  1562  	// NextPageToken: Token to retrieve the next page of results, or empty
  1563  	// if there are no more results.
  1564  	NextPageToken string `json:"nextPageToken,omitempty"`
  1565  
  1566  	// ReadTime: Time used for executing the groupBy request.
  1567  	ReadTime string `json:"readTime,omitempty"`
  1568  
  1569  	// TotalSize: The total number of results matching the query.
  1570  	TotalSize int64 `json:"totalSize,omitempty"`
  1571  
  1572  	// ServerResponse contains the HTTP response code and headers from the
  1573  	// server.
  1574  	googleapi.ServerResponse `json:"-"`
  1575  
  1576  	// ForceSendFields is a list of field names (e.g. "GroupByResults") to
  1577  	// unconditionally include in API requests. By default, fields with
  1578  	// empty values are omitted from API requests. However, any non-pointer,
  1579  	// non-interface field appearing in ForceSendFields will be sent to the
  1580  	// server regardless of whether the field is empty or not. This may be
  1581  	// used to include empty fields in Patch requests.
  1582  	ForceSendFields []string `json:"-"`
  1583  
  1584  	// NullFields is a list of field names (e.g. "GroupByResults") to
  1585  	// include in API requests with the JSON null value. By default, fields
  1586  	// with empty values are omitted from API requests. However, any field
  1587  	// with an empty value appearing in NullFields will be sent to the
  1588  	// server as null. It is an error if a field in this list has a
  1589  	// non-empty value. This may be used to include null fields in Patch
  1590  	// requests.
  1591  	NullFields []string `json:"-"`
  1592  }
  1593  
  1594  func (s *GroupFindingsResponse) MarshalJSON() ([]byte, error) {
  1595  	type NoMethod GroupFindingsResponse
  1596  	raw := NoMethod(*s)
  1597  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1598  }
  1599  
  1600  // GroupResult: Result containing the properties and count of a groupBy
  1601  // request.
  1602  type GroupResult struct {
  1603  	// Count: Total count of resources for the given properties.
  1604  	Count int64 `json:"count,omitempty,string"`
  1605  
  1606  	// Properties: Properties matching the groupBy fields in the request.
  1607  	Properties googleapi.RawMessage `json:"properties,omitempty"`
  1608  
  1609  	// ForceSendFields is a list of field names (e.g. "Count") to
  1610  	// unconditionally include in API requests. By default, fields with
  1611  	// empty values are omitted from API requests. However, any non-pointer,
  1612  	// non-interface field appearing in ForceSendFields will be sent to the
  1613  	// server regardless of whether the field is empty or not. This may be
  1614  	// used to include empty fields in Patch requests.
  1615  	ForceSendFields []string `json:"-"`
  1616  
  1617  	// NullFields is a list of field names (e.g. "Count") to include in API
  1618  	// requests with the JSON null value. By default, fields with empty
  1619  	// values are omitted from API requests. However, any field with an
  1620  	// empty value appearing in NullFields will be sent to the server as
  1621  	// null. It is an error if a field in this list has a non-empty value.
  1622  	// This may be used to include null fields in Patch requests.
  1623  	NullFields []string `json:"-"`
  1624  }
  1625  
  1626  func (s *GroupResult) MarshalJSON() ([]byte, error) {
  1627  	type NoMethod GroupResult
  1628  	raw := NoMethod(*s)
  1629  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1630  }
  1631  
  1632  // ListAssetsResponse: Response message for listing assets.
  1633  type ListAssetsResponse struct {
  1634  	// ListAssetsResults: Assets matching the list request.
  1635  	ListAssetsResults []*ListAssetsResult `json:"listAssetsResults,omitempty"`
  1636  
  1637  	// NextPageToken: Token to retrieve the next page of results, or empty
  1638  	// if there are no more results.
  1639  	NextPageToken string `json:"nextPageToken,omitempty"`
  1640  
  1641  	// ReadTime: Time used for executing the list request.
  1642  	ReadTime string `json:"readTime,omitempty"`
  1643  
  1644  	// TotalSize: The total number of assets matching the query.
  1645  	TotalSize int64 `json:"totalSize,omitempty"`
  1646  
  1647  	// ServerResponse contains the HTTP response code and headers from the
  1648  	// server.
  1649  	googleapi.ServerResponse `json:"-"`
  1650  
  1651  	// ForceSendFields is a list of field names (e.g. "ListAssetsResults")
  1652  	// to unconditionally include in API requests. By default, fields with
  1653  	// empty values are omitted from API requests. However, any non-pointer,
  1654  	// non-interface field appearing in ForceSendFields will be sent to the
  1655  	// server regardless of whether the field is empty or not. This may be
  1656  	// used to include empty fields in Patch requests.
  1657  	ForceSendFields []string `json:"-"`
  1658  
  1659  	// NullFields is a list of field names (e.g. "ListAssetsResults") to
  1660  	// include in API requests with the JSON null value. By default, fields
  1661  	// with empty values are omitted from API requests. However, any field
  1662  	// with an empty value appearing in NullFields will be sent to the
  1663  	// server as null. It is an error if a field in this list has a
  1664  	// non-empty value. This may be used to include null fields in Patch
  1665  	// requests.
  1666  	NullFields []string `json:"-"`
  1667  }
  1668  
  1669  func (s *ListAssetsResponse) MarshalJSON() ([]byte, error) {
  1670  	type NoMethod ListAssetsResponse
  1671  	raw := NoMethod(*s)
  1672  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1673  }
  1674  
  1675  // ListAssetsResult: Result containing the Asset and its State.
  1676  type ListAssetsResult struct {
  1677  	// Asset: Asset matching the search request.
  1678  	Asset *GoogleCloudSecuritycenterV1p1beta1Asset `json:"asset,omitempty"`
  1679  
  1680  	// StateChange: State change of the asset between the points in time.
  1681  	//
  1682  	// Possible values:
  1683  	//   "UNUSED" - State change is unused, this is the canonical default
  1684  	// for this enum.
  1685  	//   "ADDED" - Asset was added between the points in time.
  1686  	//   "REMOVED" - Asset was removed between the points in time.
  1687  	//   "ACTIVE" - Asset was present at both point(s) in time.
  1688  	StateChange string `json:"stateChange,omitempty"`
  1689  
  1690  	// ForceSendFields is a list of field names (e.g. "Asset") to
  1691  	// unconditionally include in API requests. By default, fields with
  1692  	// empty values are omitted from API requests. However, any non-pointer,
  1693  	// non-interface field appearing in ForceSendFields will be sent to the
  1694  	// server regardless of whether the field is empty or not. This may be
  1695  	// used to include empty fields in Patch requests.
  1696  	ForceSendFields []string `json:"-"`
  1697  
  1698  	// NullFields is a list of field names (e.g. "Asset") to include in API
  1699  	// requests with the JSON null value. By default, fields with empty
  1700  	// values are omitted from API requests. However, any field with an
  1701  	// empty value appearing in NullFields will be sent to the server as
  1702  	// null. It is an error if a field in this list has a non-empty value.
  1703  	// This may be used to include null fields in Patch requests.
  1704  	NullFields []string `json:"-"`
  1705  }
  1706  
  1707  func (s *ListAssetsResult) MarshalJSON() ([]byte, error) {
  1708  	type NoMethod ListAssetsResult
  1709  	raw := NoMethod(*s)
  1710  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1711  }
  1712  
  1713  // ListFindingsResponse: Response message for listing findings.
  1714  type ListFindingsResponse struct {
  1715  	// ListFindingsResults: Findings matching the list request.
  1716  	ListFindingsResults []*ListFindingsResult `json:"listFindingsResults,omitempty"`
  1717  
  1718  	// NextPageToken: Token to retrieve the next page of results, or empty
  1719  	// if there are no more results.
  1720  	NextPageToken string `json:"nextPageToken,omitempty"`
  1721  
  1722  	// ReadTime: Time used for executing the list request.
  1723  	ReadTime string `json:"readTime,omitempty"`
  1724  
  1725  	// TotalSize: The total number of findings matching the query.
  1726  	TotalSize int64 `json:"totalSize,omitempty"`
  1727  
  1728  	// ServerResponse contains the HTTP response code and headers from the
  1729  	// server.
  1730  	googleapi.ServerResponse `json:"-"`
  1731  
  1732  	// ForceSendFields is a list of field names (e.g. "ListFindingsResults")
  1733  	// to unconditionally include in API requests. By default, fields with
  1734  	// empty values are omitted from API requests. However, any non-pointer,
  1735  	// non-interface field appearing in ForceSendFields will be sent to the
  1736  	// server regardless of whether the field is empty or not. This may be
  1737  	// used to include empty fields in Patch requests.
  1738  	ForceSendFields []string `json:"-"`
  1739  
  1740  	// NullFields is a list of field names (e.g. "ListFindingsResults") to
  1741  	// include in API requests with the JSON null value. By default, fields
  1742  	// with empty values are omitted from API requests. However, any field
  1743  	// with an empty value appearing in NullFields will be sent to the
  1744  	// server as null. It is an error if a field in this list has a
  1745  	// non-empty value. This may be used to include null fields in Patch
  1746  	// requests.
  1747  	NullFields []string `json:"-"`
  1748  }
  1749  
  1750  func (s *ListFindingsResponse) MarshalJSON() ([]byte, error) {
  1751  	type NoMethod ListFindingsResponse
  1752  	raw := NoMethod(*s)
  1753  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1754  }
  1755  
  1756  // ListFindingsResult: Result containing the Finding and its
  1757  // StateChange.
  1758  type ListFindingsResult struct {
  1759  	// Finding: Finding matching the search request.
  1760  	Finding *GoogleCloudSecuritycenterV1p1beta1Finding `json:"finding,omitempty"`
  1761  
  1762  	// Resource: Output only. Resource that is associated with this finding.
  1763  	Resource *Resource `json:"resource,omitempty"`
  1764  
  1765  	// StateChange: State change of the finding between the points in time.
  1766  	//
  1767  	// Possible values:
  1768  	//   "UNUSED" - State change is unused, this is the canonical default
  1769  	// for this enum.
  1770  	//   "CHANGED" - The finding has changed state in some way between the
  1771  	// points in time and existed at both points.
  1772  	//   "UNCHANGED" - The finding has not changed state between the points
  1773  	// in time and existed at both points.
  1774  	//   "ADDED" - The finding was created between the points in time.
  1775  	//   "REMOVED" - The finding at timestamp does not match the filter
  1776  	// specified, but it did at timestamp - compare_duration.
  1777  	StateChange string `json:"stateChange,omitempty"`
  1778  
  1779  	// ForceSendFields is a list of field names (e.g. "Finding") to
  1780  	// unconditionally include in API requests. By default, fields with
  1781  	// empty values are omitted from API requests. However, any non-pointer,
  1782  	// non-interface field appearing in ForceSendFields will be sent to the
  1783  	// server regardless of whether the field is empty or not. This may be
  1784  	// used to include empty fields in Patch requests.
  1785  	ForceSendFields []string `json:"-"`
  1786  
  1787  	// NullFields is a list of field names (e.g. "Finding") to include in
  1788  	// API requests with the JSON null value. By default, fields with empty
  1789  	// values are omitted from API requests. However, any field with an
  1790  	// empty value appearing in NullFields will be sent to the server as
  1791  	// null. It is an error if a field in this list has a non-empty value.
  1792  	// This may be used to include null fields in Patch requests.
  1793  	NullFields []string `json:"-"`
  1794  }
  1795  
  1796  func (s *ListFindingsResult) MarshalJSON() ([]byte, error) {
  1797  	type NoMethod ListFindingsResult
  1798  	raw := NoMethod(*s)
  1799  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1800  }
  1801  
  1802  // ListNotificationConfigsResponse: Response message for listing
  1803  // notification configs.
  1804  type ListNotificationConfigsResponse struct {
  1805  	// NextPageToken: Token to retrieve the next page of results, or empty
  1806  	// if there are no more results.
  1807  	NextPageToken string `json:"nextPageToken,omitempty"`
  1808  
  1809  	// NotificationConfigs: Notification configs belonging to the requested
  1810  	// parent.
  1811  	NotificationConfigs []*NotificationConfig `json:"notificationConfigs,omitempty"`
  1812  
  1813  	// ServerResponse contains the HTTP response code and headers from the
  1814  	// server.
  1815  	googleapi.ServerResponse `json:"-"`
  1816  
  1817  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1818  	// unconditionally include in API requests. By default, fields with
  1819  	// empty values are omitted from API requests. However, any non-pointer,
  1820  	// non-interface field appearing in ForceSendFields will be sent to the
  1821  	// server regardless of whether the field is empty or not. This may be
  1822  	// used to include empty fields in Patch requests.
  1823  	ForceSendFields []string `json:"-"`
  1824  
  1825  	// NullFields is a list of field names (e.g. "NextPageToken") to include
  1826  	// in API requests with the JSON null value. By default, fields with
  1827  	// empty values are omitted from API requests. However, any field with
  1828  	// an empty value appearing in NullFields will be sent to the server as
  1829  	// null. It is an error if a field in this list has a non-empty value.
  1830  	// This may be used to include null fields in Patch requests.
  1831  	NullFields []string `json:"-"`
  1832  }
  1833  
  1834  func (s *ListNotificationConfigsResponse) MarshalJSON() ([]byte, error) {
  1835  	type NoMethod ListNotificationConfigsResponse
  1836  	raw := NoMethod(*s)
  1837  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1838  }
  1839  
  1840  // ListOperationsResponse: The response message for
  1841  // Operations.ListOperations.
  1842  type ListOperationsResponse struct {
  1843  	// NextPageToken: The standard List next-page token.
  1844  	NextPageToken string `json:"nextPageToken,omitempty"`
  1845  
  1846  	// Operations: A list of operations that matches the specified filter in
  1847  	// the request.
  1848  	Operations []*Operation `json:"operations,omitempty"`
  1849  
  1850  	// ServerResponse contains the HTTP response code and headers from the
  1851  	// server.
  1852  	googleapi.ServerResponse `json:"-"`
  1853  
  1854  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1855  	// unconditionally include in API requests. By default, fields with
  1856  	// empty values are omitted from API requests. However, any non-pointer,
  1857  	// non-interface field appearing in ForceSendFields will be sent to the
  1858  	// server regardless of whether the field is empty or not. This may be
  1859  	// used to include empty fields in Patch requests.
  1860  	ForceSendFields []string `json:"-"`
  1861  
  1862  	// NullFields is a list of field names (e.g. "NextPageToken") to include
  1863  	// in API requests with the JSON null value. By default, fields with
  1864  	// empty values are omitted from API requests. However, any field with
  1865  	// an empty value appearing in NullFields will be sent to the server as
  1866  	// null. It is an error if a field in this list has a non-empty value.
  1867  	// This may be used to include null fields in Patch requests.
  1868  	NullFields []string `json:"-"`
  1869  }
  1870  
  1871  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1872  	type NoMethod ListOperationsResponse
  1873  	raw := NoMethod(*s)
  1874  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1875  }
  1876  
  1877  // ListSourcesResponse: Response message for listing sources.
  1878  type ListSourcesResponse struct {
  1879  	// NextPageToken: Token to retrieve the next page of results, or empty
  1880  	// if there are no more results.
  1881  	NextPageToken string `json:"nextPageToken,omitempty"`
  1882  
  1883  	// Sources: Sources belonging to the requested parent.
  1884  	Sources []*Source `json:"sources,omitempty"`
  1885  
  1886  	// ServerResponse contains the HTTP response code and headers from the
  1887  	// server.
  1888  	googleapi.ServerResponse `json:"-"`
  1889  
  1890  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1891  	// unconditionally include in API requests. By default, fields with
  1892  	// empty values are omitted from API requests. However, any non-pointer,
  1893  	// non-interface field appearing in ForceSendFields will be sent to the
  1894  	// server regardless of whether the field is empty or not. This may be
  1895  	// used to include empty fields in Patch requests.
  1896  	ForceSendFields []string `json:"-"`
  1897  
  1898  	// NullFields is a list of field names (e.g. "NextPageToken") to include
  1899  	// in API requests with the JSON null value. By default, fields with
  1900  	// empty values are omitted from API requests. However, any field with
  1901  	// an empty value appearing in NullFields will be sent to the server as
  1902  	// null. It is an error if a field in this list has a non-empty value.
  1903  	// This may be used to include null fields in Patch requests.
  1904  	NullFields []string `json:"-"`
  1905  }
  1906  
  1907  func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) {
  1908  	type NoMethod ListSourcesResponse
  1909  	raw := NoMethod(*s)
  1910  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1911  }
  1912  
  1913  // NotificationConfig: Security Command Center notification configs. A
  1914  // notification config is a Security Command Center resource that
  1915  // contains the configuration to send notifications for create/update
  1916  // events of findings, assets and etc.
  1917  type NotificationConfig struct {
  1918  	// Description: The description of the notification config (max of 1024
  1919  	// characters).
  1920  	Description string `json:"description,omitempty"`
  1921  
  1922  	// EventType: The type of events the config is for, e.g. FINDING.
  1923  	//
  1924  	// Possible values:
  1925  	//   "EVENT_TYPE_UNSPECIFIED" - Unspecified event type.
  1926  	//   "FINDING" - Events for findings.
  1927  	EventType string `json:"eventType,omitempty"`
  1928  
  1929  	// Name: The relative resource name of this notification config. See:
  1930  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
  1931  	// "organizations/{organization_id}/notificationConfigs/notify_public_buc
  1932  	// ket".
  1933  	Name string `json:"name,omitempty"`
  1934  
  1935  	// PubsubTopic: The Pub/Sub topic to send notifications to. Its format
  1936  	// is "projects/[project_id]/topics/[topic]".
  1937  	PubsubTopic string `json:"pubsubTopic,omitempty"`
  1938  
  1939  	// ServiceAccount: Output only. The service account that needs
  1940  	// "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  1941  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1942  
  1943  	// StreamingConfig: The config for triggering streaming-based
  1944  	// notifications.
  1945  	StreamingConfig *StreamingConfig `json:"streamingConfig,omitempty"`
  1946  
  1947  	// ServerResponse contains the HTTP response code and headers from the
  1948  	// server.
  1949  	googleapi.ServerResponse `json:"-"`
  1950  
  1951  	// ForceSendFields is a list of field names (e.g. "Description") to
  1952  	// unconditionally include in API requests. By default, fields with
  1953  	// empty values are omitted from API requests. However, any non-pointer,
  1954  	// non-interface field appearing in ForceSendFields will be sent to the
  1955  	// server regardless of whether the field is empty or not. This may be
  1956  	// used to include empty fields in Patch requests.
  1957  	ForceSendFields []string `json:"-"`
  1958  
  1959  	// NullFields is a list of field names (e.g. "Description") to include
  1960  	// in API requests with the JSON null value. By default, fields with
  1961  	// empty values are omitted from API requests. However, any field with
  1962  	// an empty value appearing in NullFields will be sent to the server as
  1963  	// null. It is an error if a field in this list has a non-empty value.
  1964  	// This may be used to include null fields in Patch requests.
  1965  	NullFields []string `json:"-"`
  1966  }
  1967  
  1968  func (s *NotificationConfig) MarshalJSON() ([]byte, error) {
  1969  	type NoMethod NotificationConfig
  1970  	raw := NoMethod(*s)
  1971  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1972  }
  1973  
  1974  // Operation: This resource represents a long-running operation that is
  1975  // the result of a network API call.
  1976  type Operation struct {
  1977  	// Done: If the value is `false`, it means the operation is still in
  1978  	// progress. If `true`, the operation is completed, and either `error`
  1979  	// or `response` is available.
  1980  	Done bool `json:"done,omitempty"`
  1981  
  1982  	// Error: The error result of the operation in case of failure or
  1983  	// cancellation.
  1984  	Error *Status `json:"error,omitempty"`
  1985  
  1986  	// Metadata: Service-specific metadata associated with the operation. It
  1987  	// typically contains progress information and common metadata such as
  1988  	// create time. Some services might not provide such metadata. Any
  1989  	// method that returns a long-running operation should document the
  1990  	// metadata type, if any.
  1991  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1992  
  1993  	// Name: The server-assigned name, which is only unique within the same
  1994  	// service that originally returns it. If you use the default HTTP
  1995  	// mapping, the `name` should be a resource name ending with
  1996  	// `operations/{unique_id}`.
  1997  	Name string `json:"name,omitempty"`
  1998  
  1999  	// Response: The normal response of the operation in case of success. If
  2000  	// the original method returns no data on success, such as `Delete`, the
  2001  	// response is `google.protobuf.Empty`. If the original method is
  2002  	// standard `Get`/`Create`/`Update`, the response should be the
  2003  	// resource. For other methods, the response should have the type
  2004  	// `XxxResponse`, where `Xxx` is the original method name. For example,
  2005  	// if the original method name is `TakeSnapshot()`, the inferred
  2006  	// response type is `TakeSnapshotResponse`.
  2007  	Response googleapi.RawMessage `json:"response,omitempty"`
  2008  
  2009  	// ServerResponse contains the HTTP response code and headers from the
  2010  	// server.
  2011  	googleapi.ServerResponse `json:"-"`
  2012  
  2013  	// ForceSendFields is a list of field names (e.g. "Done") to
  2014  	// unconditionally include in API requests. By default, fields with
  2015  	// empty values are omitted from API requests. However, any non-pointer,
  2016  	// non-interface field appearing in ForceSendFields will be sent to the
  2017  	// server regardless of whether the field is empty or not. This may be
  2018  	// used to include empty fields in Patch requests.
  2019  	ForceSendFields []string `json:"-"`
  2020  
  2021  	// NullFields is a list of field names (e.g. "Done") to include in API
  2022  	// requests with the JSON null value. By default, fields with empty
  2023  	// values are omitted from API requests. However, any field with an
  2024  	// empty value appearing in NullFields will be sent to the server as
  2025  	// null. It is an error if a field in this list has a non-empty value.
  2026  	// This may be used to include null fields in Patch requests.
  2027  	NullFields []string `json:"-"`
  2028  }
  2029  
  2030  func (s *Operation) MarshalJSON() ([]byte, error) {
  2031  	type NoMethod Operation
  2032  	raw := NoMethod(*s)
  2033  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2034  }
  2035  
  2036  // OrganizationSettings: User specified settings that are attached to
  2037  // the Security Command Center organization.
  2038  type OrganizationSettings struct {
  2039  	// AssetDiscoveryConfig: The configuration used for Asset Discovery
  2040  	// runs.
  2041  	AssetDiscoveryConfig *AssetDiscoveryConfig `json:"assetDiscoveryConfig,omitempty"`
  2042  
  2043  	// EnableAssetDiscovery: A flag that indicates if Asset Discovery should
  2044  	// be enabled. If the flag is set to `true`, then discovery of assets
  2045  	// will occur. If it is set to `false, all historical assets will
  2046  	// remain, but discovery of future assets will not occur.
  2047  	EnableAssetDiscovery bool `json:"enableAssetDiscovery,omitempty"`
  2048  
  2049  	// Name: The relative resource name of the settings. See:
  2050  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
  2051  	// "organizations/{organization_id}/organizationSettings".
  2052  	Name string `json:"name,omitempty"`
  2053  
  2054  	// ServerResponse contains the HTTP response code and headers from the
  2055  	// server.
  2056  	googleapi.ServerResponse `json:"-"`
  2057  
  2058  	// ForceSendFields is a list of field names (e.g.
  2059  	// "AssetDiscoveryConfig") to unconditionally include in API requests.
  2060  	// By default, fields with empty values are omitted from API requests.
  2061  	// However, any non-pointer, non-interface field appearing in
  2062  	// ForceSendFields will be sent to the server regardless of whether the
  2063  	// field is empty or not. This may be used to include empty fields in
  2064  	// Patch requests.
  2065  	ForceSendFields []string `json:"-"`
  2066  
  2067  	// NullFields is a list of field names (e.g. "AssetDiscoveryConfig") to
  2068  	// include in API requests with the JSON null value. By default, fields
  2069  	// with empty values are omitted from API requests. However, any field
  2070  	// with an empty value appearing in NullFields will be sent to the
  2071  	// server as null. It is an error if a field in this list has a
  2072  	// non-empty value. This may be used to include null fields in Patch
  2073  	// requests.
  2074  	NullFields []string `json:"-"`
  2075  }
  2076  
  2077  func (s *OrganizationSettings) MarshalJSON() ([]byte, error) {
  2078  	type NoMethod OrganizationSettings
  2079  	raw := NoMethod(*s)
  2080  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2081  }
  2082  
  2083  // Policy: An Identity and Access Management (IAM) policy, which
  2084  // specifies access controls for Google Cloud resources. A `Policy` is a
  2085  // collection of `bindings`. A `binding` binds one or more `members` to
  2086  // a single `role`. Members can be user accounts, service accounts,
  2087  // Google groups, and domains (such as G Suite). A `role` is a named
  2088  // list of permissions; each `role` can be an IAM predefined role or a
  2089  // user-created custom role. For some types of Google Cloud resources, a
  2090  // `binding` can also specify a `condition`, which is a logical
  2091  // expression that allows access to a resource only if the expression
  2092  // evaluates to `true`. A condition can add constraints based on
  2093  // attributes of the request, the resource, or both. To learn which
  2094  // resources support conditions in their IAM policies, see the [IAM
  2095  // documentation](https://cloud.google.com/iam/help/conditions/resource-p
  2096  // olicies). **JSON example:** { "bindings": [ { "role":
  2097  // "roles/resourcemanager.organizationAdmin", "members": [
  2098  // "user:mike@example.com", "group:admins@example.com",
  2099  // "domain:google.com",
  2100  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
  2101  // "role": "roles/resourcemanager.organizationViewer", "members": [
  2102  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2103  // "description": "Does not grant access after Sep 2020", "expression":
  2104  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
  2105  // "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
  2106  // members: - user:mike@example.com - group:admins@example.com -
  2107  // domain:google.com -
  2108  // serviceAccount:my-project-id@appspot.gserviceaccount.com role:
  2109  // roles/resourcemanager.organizationAdmin - members: -
  2110  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2111  // condition: title: expirable access description: Does not grant access
  2112  // after Sep 2020 expression: request.time <
  2113  // timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
  2114  // 3 For a description of IAM and its features, see the [IAM
  2115  // documentation](https://cloud.google.com/iam/docs/).
  2116  type Policy struct {
  2117  	// AuditConfigs: Specifies cloud audit logging configuration for this
  2118  	// policy.
  2119  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2120  
  2121  	// Bindings: Associates a list of `members` to a `role`. Optionally, may
  2122  	// specify a `condition` that determines how and when the `bindings` are
  2123  	// applied. Each of the `bindings` must contain at least one member.
  2124  	Bindings []*Binding `json:"bindings,omitempty"`
  2125  
  2126  	// Etag: `etag` is used for optimistic concurrency control as a way to
  2127  	// help prevent simultaneous updates of a policy from overwriting each
  2128  	// other. It is strongly suggested that systems make use of the `etag`
  2129  	// in the read-modify-write cycle to perform policy updates in order to
  2130  	// avoid race conditions: An `etag` is returned in the response to
  2131  	// `getIamPolicy`, and systems are expected to put that etag in the
  2132  	// request to `setIamPolicy` to ensure that their change will be applied
  2133  	// to the same version of the policy. **Important:** If you use IAM
  2134  	// Conditions, you must include the `etag` field whenever you call
  2135  	// `setIamPolicy`. If you omit this field, then IAM allows you to
  2136  	// overwrite a version `3` policy with a version `1` policy, and all of
  2137  	// the conditions in the version `3` policy are lost.
  2138  	Etag string `json:"etag,omitempty"`
  2139  
  2140  	// Version: Specifies the format of the policy. Valid values are `0`,
  2141  	// `1`, and `3`. Requests that specify an invalid value are rejected.
  2142  	// Any operation that affects conditional role bindings must specify
  2143  	// version `3`. This requirement applies to the following operations: *
  2144  	// Getting a policy that includes a conditional role binding * Adding a
  2145  	// conditional role binding to a policy * Changing a conditional role
  2146  	// binding in a policy * Removing any role binding, with or without a
  2147  	// condition, from a policy that includes conditions **Important:** If
  2148  	// you use IAM Conditions, you must include the `etag` field whenever
  2149  	// you call `setIamPolicy`. If you omit this field, then IAM allows you
  2150  	// to overwrite a version `3` policy with a version `1` policy, and all
  2151  	// of the conditions in the version `3` policy are lost. If a policy
  2152  	// does not include any conditions, operations on that policy may
  2153  	// specify any valid version or leave the field unset. To learn which
  2154  	// resources support conditions in their IAM policies, see the [IAM
  2155  	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
  2156  	// olicies).
  2157  	Version int64 `json:"version,omitempty"`
  2158  
  2159  	// ServerResponse contains the HTTP response code and headers from the
  2160  	// server.
  2161  	googleapi.ServerResponse `json:"-"`
  2162  
  2163  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2164  	// unconditionally include in API requests. By default, fields with
  2165  	// empty values are omitted from API requests. However, any non-pointer,
  2166  	// non-interface field appearing in ForceSendFields will be sent to the
  2167  	// server regardless of whether the field is empty or not. This may be
  2168  	// used to include empty fields in Patch requests.
  2169  	ForceSendFields []string `json:"-"`
  2170  
  2171  	// NullFields is a list of field names (e.g. "AuditConfigs") to include
  2172  	// in API requests with the JSON null value. By default, fields with
  2173  	// empty values are omitted from API requests. However, any field with
  2174  	// an empty value appearing in NullFields will be sent to the server as
  2175  	// null. It is an error if a field in this list has a non-empty value.
  2176  	// This may be used to include null fields in Patch requests.
  2177  	NullFields []string `json:"-"`
  2178  }
  2179  
  2180  func (s *Policy) MarshalJSON() ([]byte, error) {
  2181  	type NoMethod Policy
  2182  	raw := NoMethod(*s)
  2183  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2184  }
  2185  
  2186  // Resource: Information related to the Google Cloud resource that is
  2187  // associated with this finding.
  2188  type Resource struct {
  2189  	// Name: The full resource name of the resource. See:
  2190  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  2191  	Name string `json:"name,omitempty"`
  2192  
  2193  	// ParentDisplayName: The human readable name of resource's parent.
  2194  	ParentDisplayName string `json:"parentDisplayName,omitempty"`
  2195  
  2196  	// ParentName: The full resource name of resource's parent.
  2197  	ParentName string `json:"parentName,omitempty"`
  2198  
  2199  	// ProjectDisplayName: The human readable name of project that the
  2200  	// resource belongs to.
  2201  	ProjectDisplayName string `json:"projectDisplayName,omitempty"`
  2202  
  2203  	// ProjectName: The full resource name of project that the resource
  2204  	// belongs to.
  2205  	ProjectName string `json:"projectName,omitempty"`
  2206  
  2207  	// ForceSendFields is a list of field names (e.g. "Name") to
  2208  	// unconditionally include in API requests. By default, fields with
  2209  	// empty values are omitted from API requests. However, any non-pointer,
  2210  	// non-interface field appearing in ForceSendFields will be sent to the
  2211  	// server regardless of whether the field is empty or not. This may be
  2212  	// used to include empty fields in Patch requests.
  2213  	ForceSendFields []string `json:"-"`
  2214  
  2215  	// NullFields is a list of field names (e.g. "Name") to include in API
  2216  	// requests with the JSON null value. By default, fields with empty
  2217  	// values are omitted from API requests. However, any field with an
  2218  	// empty value appearing in NullFields will be sent to the server as
  2219  	// null. It is an error if a field in this list has a non-empty value.
  2220  	// This may be used to include null fields in Patch requests.
  2221  	NullFields []string `json:"-"`
  2222  }
  2223  
  2224  func (s *Resource) MarshalJSON() ([]byte, error) {
  2225  	type NoMethod Resource
  2226  	raw := NoMethod(*s)
  2227  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2228  }
  2229  
  2230  // RunAssetDiscoveryRequest: Request message for running asset discovery
  2231  // for an organization.
  2232  type RunAssetDiscoveryRequest struct {
  2233  }
  2234  
  2235  // SecurityMarks: User specified security marks that are attached to the
  2236  // parent Security Command Center resource. Security marks are scoped
  2237  // within a Security Command Center organization -- they can be modified
  2238  // and viewed by all users who have proper permissions on the
  2239  // organization.
  2240  type SecurityMarks struct {
  2241  	// Marks: Mutable user specified security marks belonging to the parent
  2242  	// resource. Constraints are as follows: * Keys and values are treated
  2243  	// as case insensitive * Keys must be between 1 - 256 characters
  2244  	// (inclusive) * Keys must be letters, numbers, underscores, or dashes *
  2245  	// Values have leading and trailing whitespace trimmed, remaining
  2246  	// characters must be between 1 - 4096 characters (inclusive)
  2247  	Marks map[string]string `json:"marks,omitempty"`
  2248  
  2249  	// Name: The relative resource name of the SecurityMarks. See:
  2250  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks"
  2251  	// "organizations/{organization_id}/sources/{source_id}/findings/{finding
  2252  	// _id}/securityMarks".
  2253  	Name string `json:"name,omitempty"`
  2254  
  2255  	// ForceSendFields is a list of field names (e.g. "Marks") to
  2256  	// unconditionally include in API requests. By default, fields with
  2257  	// empty values are omitted from API requests. However, any non-pointer,
  2258  	// non-interface field appearing in ForceSendFields will be sent to the
  2259  	// server regardless of whether the field is empty or not. This may be
  2260  	// used to include empty fields in Patch requests.
  2261  	ForceSendFields []string `json:"-"`
  2262  
  2263  	// NullFields is a list of field names (e.g. "Marks") to include in API
  2264  	// requests with the JSON null value. By default, fields with empty
  2265  	// values are omitted from API requests. However, any field with an
  2266  	// empty value appearing in NullFields will be sent to the server as
  2267  	// null. It is an error if a field in this list has a non-empty value.
  2268  	// This may be used to include null fields in Patch requests.
  2269  	NullFields []string `json:"-"`
  2270  }
  2271  
  2272  func (s *SecurityMarks) MarshalJSON() ([]byte, error) {
  2273  	type NoMethod SecurityMarks
  2274  	raw := NoMethod(*s)
  2275  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2276  }
  2277  
  2278  // SetFindingStateRequest: Request message for updating a finding's
  2279  // state.
  2280  type SetFindingStateRequest struct {
  2281  	// StartTime: Required. The time at which the updated state takes
  2282  	// effect.
  2283  	StartTime string `json:"startTime,omitempty"`
  2284  
  2285  	// State: Required. The desired State of the finding.
  2286  	//
  2287  	// Possible values:
  2288  	//   "STATE_UNSPECIFIED" - Unspecified state.
  2289  	//   "ACTIVE" - The finding requires attention and has not been
  2290  	// addressed yet.
  2291  	//   "INACTIVE" - The finding has been fixed, triaged as a non-issue or
  2292  	// otherwise addressed and is no longer active.
  2293  	State string `json:"state,omitempty"`
  2294  
  2295  	// ForceSendFields is a list of field names (e.g. "StartTime") to
  2296  	// unconditionally include in API requests. By default, fields with
  2297  	// empty values are omitted from API requests. However, any non-pointer,
  2298  	// non-interface field appearing in ForceSendFields will be sent to the
  2299  	// server regardless of whether the field is empty or not. This may be
  2300  	// used to include empty fields in Patch requests.
  2301  	ForceSendFields []string `json:"-"`
  2302  
  2303  	// NullFields is a list of field names (e.g. "StartTime") to include in
  2304  	// API requests with the JSON null value. By default, fields with empty
  2305  	// values are omitted from API requests. However, any field with an
  2306  	// empty value appearing in NullFields will be sent to the server as
  2307  	// null. It is an error if a field in this list has a non-empty value.
  2308  	// This may be used to include null fields in Patch requests.
  2309  	NullFields []string `json:"-"`
  2310  }
  2311  
  2312  func (s *SetFindingStateRequest) MarshalJSON() ([]byte, error) {
  2313  	type NoMethod SetFindingStateRequest
  2314  	raw := NoMethod(*s)
  2315  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2316  }
  2317  
  2318  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  2319  type SetIamPolicyRequest struct {
  2320  	// Policy: REQUIRED: The complete policy to be applied to the
  2321  	// `resource`. The size of the policy is limited to a few 10s of KB. An
  2322  	// empty policy is a valid policy but certain Cloud Platform services
  2323  	// (such as Projects) might reject them.
  2324  	Policy *Policy `json:"policy,omitempty"`
  2325  
  2326  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
  2327  	// policy to modify. Only the fields in the mask will be modified. If no
  2328  	// mask is provided, the following default mask is used: `paths:
  2329  	// "bindings, etag"
  2330  	UpdateMask string `json:"updateMask,omitempty"`
  2331  
  2332  	// ForceSendFields is a list of field names (e.g. "Policy") to
  2333  	// unconditionally include in API requests. By default, fields with
  2334  	// empty values are omitted from API requests. However, any non-pointer,
  2335  	// non-interface field appearing in ForceSendFields will be sent to the
  2336  	// server regardless of whether the field is empty or not. This may be
  2337  	// used to include empty fields in Patch requests.
  2338  	ForceSendFields []string `json:"-"`
  2339  
  2340  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2341  	// requests with the JSON null value. By default, fields with empty
  2342  	// values are omitted from API requests. However, any field with an
  2343  	// empty value appearing in NullFields will be sent to the server as
  2344  	// null. It is an error if a field in this list has a non-empty value.
  2345  	// This may be used to include null fields in Patch requests.
  2346  	NullFields []string `json:"-"`
  2347  }
  2348  
  2349  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2350  	type NoMethod SetIamPolicyRequest
  2351  	raw := NoMethod(*s)
  2352  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2353  }
  2354  
  2355  // Source: Security Command Center finding source. A finding source is
  2356  // an entity or a mechanism that can produce a finding. A source is like
  2357  // a container of findings that come from the same scanner, logger,
  2358  // monitor, etc.
  2359  type Source struct {
  2360  	// Description: The description of the source (max of 1024 characters).
  2361  	// Example: "Web Security Scanner is a web security scanner for common
  2362  	// vulnerabilities in App Engine applications. It can automatically scan
  2363  	// and detect four common vulnerabilities, including
  2364  	// cross-site-scripting (XSS), Flash injection, mixed content (HTTP in
  2365  	// HTTPS), and outdated/insecure libraries."
  2366  	Description string `json:"description,omitempty"`
  2367  
  2368  	// DisplayName: The source's display name. A source's display name must
  2369  	// be unique amongst its siblings, for example, two sources with the
  2370  	// same parent can't share the same display name. The display name must
  2371  	// have a length between 1 and 64 characters (inclusive).
  2372  	DisplayName string `json:"displayName,omitempty"`
  2373  
  2374  	// Name: The relative resource name of this source. See:
  2375  	// https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
  2376  	// "organizations/{organization_id}/sources/{source_id}"
  2377  	Name string `json:"name,omitempty"`
  2378  
  2379  	// ServerResponse contains the HTTP response code and headers from the
  2380  	// server.
  2381  	googleapi.ServerResponse `json:"-"`
  2382  
  2383  	// ForceSendFields is a list of field names (e.g. "Description") to
  2384  	// unconditionally include in API requests. By default, fields with
  2385  	// empty values are omitted from API requests. However, any non-pointer,
  2386  	// non-interface field appearing in ForceSendFields will be sent to the
  2387  	// server regardless of whether the field is empty or not. This may be
  2388  	// used to include empty fields in Patch requests.
  2389  	ForceSendFields []string `json:"-"`
  2390  
  2391  	// NullFields is a list of field names (e.g. "Description") to include
  2392  	// in API requests with the JSON null value. By default, fields with
  2393  	// empty values are omitted from API requests. However, any field with
  2394  	// an empty value appearing in NullFields will be sent to the server as
  2395  	// null. It is an error if a field in this list has a non-empty value.
  2396  	// This may be used to include null fields in Patch requests.
  2397  	NullFields []string `json:"-"`
  2398  }
  2399  
  2400  func (s *Source) MarshalJSON() ([]byte, error) {
  2401  	type NoMethod Source
  2402  	raw := NoMethod(*s)
  2403  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2404  }
  2405  
  2406  // Status: The `Status` type defines a logical error model that is
  2407  // suitable for different programming environments, including REST APIs
  2408  // and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each
  2409  // `Status` message contains three pieces of data: error code, error
  2410  // message, and error details. You can find out more about this error
  2411  // model and how to work with it in the [API Design
  2412  // Guide](https://cloud.google.com/apis/design/errors).
  2413  type Status struct {
  2414  	// Code: The status code, which should be an enum value of
  2415  	// google.rpc.Code.
  2416  	Code int64 `json:"code,omitempty"`
  2417  
  2418  	// Details: A list of messages that carry the error details. There is a
  2419  	// common set of message types for APIs to use.
  2420  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2421  
  2422  	// Message: A developer-facing error message, which should be in
  2423  	// English. Any user-facing error message should be localized and sent
  2424  	// in the google.rpc.Status.details field, or localized by the client.
  2425  	Message string `json:"message,omitempty"`
  2426  
  2427  	// ForceSendFields is a list of field names (e.g. "Code") to
  2428  	// unconditionally include in API requests. By default, fields with
  2429  	// empty values are omitted from API requests. However, any non-pointer,
  2430  	// non-interface field appearing in ForceSendFields will be sent to the
  2431  	// server regardless of whether the field is empty or not. This may be
  2432  	// used to include empty fields in Patch requests.
  2433  	ForceSendFields []string `json:"-"`
  2434  
  2435  	// NullFields is a list of field names (e.g. "Code") to include in API
  2436  	// requests with the JSON null value. By default, fields with empty
  2437  	// values are omitted from API requests. However, any field with an
  2438  	// empty value appearing in NullFields will be sent to the server as
  2439  	// null. It is an error if a field in this list has a non-empty value.
  2440  	// This may be used to include null fields in Patch requests.
  2441  	NullFields []string `json:"-"`
  2442  }
  2443  
  2444  func (s *Status) MarshalJSON() ([]byte, error) {
  2445  	type NoMethod Status
  2446  	raw := NoMethod(*s)
  2447  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2448  }
  2449  
  2450  // StreamingConfig: The config for streaming-based notifications, which
  2451  // send each event as soon as it is detected.
  2452  type StreamingConfig struct {
  2453  	// Filter: Expression that defines the filter to apply across
  2454  	// create/update events of assets or findings as specified by the event
  2455  	// type. The expression is a list of zero or more restrictions combined
  2456  	// via logical operators `AND` and `OR`. Parentheses are supported, and
  2457  	// `OR` has higher precedence than `AND`. Restrictions have the form ` `
  2458  	// and may have a `-` character in front of them to indicate negation.
  2459  	// The fields map to those defined in the corresponding resource. The
  2460  	// supported operators are: * `=` for all value types. * `>`, `<`, `>=`,
  2461  	// `<=` for integer values. * `:`, meaning substring matching, for
  2462  	// strings. The supported value types are: * string literals in quotes.
  2463  	// * integer literals without quotes. * boolean literals `true` and
  2464  	// `false` without quotes.
  2465  	Filter string `json:"filter,omitempty"`
  2466  
  2467  	// ForceSendFields is a list of field names (e.g. "Filter") to
  2468  	// unconditionally include in API requests. By default, fields with
  2469  	// empty values are omitted from API requests. However, any non-pointer,
  2470  	// non-interface field appearing in ForceSendFields will be sent to the
  2471  	// server regardless of whether the field is empty or not. This may be
  2472  	// used to include empty fields in Patch requests.
  2473  	ForceSendFields []string `json:"-"`
  2474  
  2475  	// NullFields is a list of field names (e.g. "Filter") to include in API
  2476  	// requests with the JSON null value. By default, fields with empty
  2477  	// values are omitted from API requests. However, any field with an
  2478  	// empty value appearing in NullFields will be sent to the server as
  2479  	// null. It is an error if a field in this list has a non-empty value.
  2480  	// This may be used to include null fields in Patch requests.
  2481  	NullFields []string `json:"-"`
  2482  }
  2483  
  2484  func (s *StreamingConfig) MarshalJSON() ([]byte, error) {
  2485  	type NoMethod StreamingConfig
  2486  	raw := NoMethod(*s)
  2487  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2488  }
  2489  
  2490  // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  2491  // method.
  2492  type TestIamPermissionsRequest struct {
  2493  	// Permissions: The set of permissions to check for the `resource`.
  2494  	// Permissions with wildcards (such as '*' or 'storage.*') are not
  2495  	// allowed. For more information see [IAM
  2496  	// Overview](https://cloud.google.com/iam/docs/overview#permissions).
  2497  	Permissions []string `json:"permissions,omitempty"`
  2498  
  2499  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2500  	// unconditionally include in API requests. By default, fields with
  2501  	// empty values are omitted from API requests. However, any non-pointer,
  2502  	// non-interface field appearing in ForceSendFields will be sent to the
  2503  	// server regardless of whether the field is empty or not. This may be
  2504  	// used to include empty fields in Patch requests.
  2505  	ForceSendFields []string `json:"-"`
  2506  
  2507  	// NullFields is a list of field names (e.g. "Permissions") to include
  2508  	// in API requests with the JSON null value. By default, fields with
  2509  	// empty values are omitted from API requests. However, any field with
  2510  	// an empty value appearing in NullFields will be sent to the server as
  2511  	// null. It is an error if a field in this list has a non-empty value.
  2512  	// This may be used to include null fields in Patch requests.
  2513  	NullFields []string `json:"-"`
  2514  }
  2515  
  2516  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2517  	type NoMethod TestIamPermissionsRequest
  2518  	raw := NoMethod(*s)
  2519  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2520  }
  2521  
  2522  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2523  // method.
  2524  type TestIamPermissionsResponse struct {
  2525  	// Permissions: A subset of `TestPermissionsRequest.permissions` that
  2526  	// the caller is allowed.
  2527  	Permissions []string `json:"permissions,omitempty"`
  2528  
  2529  	// ServerResponse contains the HTTP response code and headers from the
  2530  	// server.
  2531  	googleapi.ServerResponse `json:"-"`
  2532  
  2533  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2534  	// unconditionally include in API requests. By default, fields with
  2535  	// empty values are omitted from API requests. However, any non-pointer,
  2536  	// non-interface field appearing in ForceSendFields will be sent to the
  2537  	// server regardless of whether the field is empty or not. This may be
  2538  	// used to include empty fields in Patch requests.
  2539  	ForceSendFields []string `json:"-"`
  2540  
  2541  	// NullFields is a list of field names (e.g. "Permissions") to include
  2542  	// in API requests with the JSON null value. By default, fields with
  2543  	// empty values are omitted from API requests. However, any field with
  2544  	// an empty value appearing in NullFields will be sent to the server as
  2545  	// null. It is an error if a field in this list has a non-empty value.
  2546  	// This may be used to include null fields in Patch requests.
  2547  	NullFields []string `json:"-"`
  2548  }
  2549  
  2550  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2551  	type NoMethod TestIamPermissionsResponse
  2552  	raw := NoMethod(*s)
  2553  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2554  }
  2555  
  2556  // method id "securitycenter.organizations.getOrganizationSettings":
  2557  
  2558  type OrganizationsGetOrganizationSettingsCall struct {
  2559  	s            *Service
  2560  	name         string
  2561  	urlParams_   gensupport.URLParams
  2562  	ifNoneMatch_ string
  2563  	ctx_         context.Context
  2564  	header_      http.Header
  2565  }
  2566  
  2567  // GetOrganizationSettings: Gets the settings for an organization.
  2568  func (r *OrganizationsService) GetOrganizationSettings(name string) *OrganizationsGetOrganizationSettingsCall {
  2569  	c := &OrganizationsGetOrganizationSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2570  	c.name = name
  2571  	return c
  2572  }
  2573  
  2574  // Fields allows partial responses to be retrieved. See
  2575  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2576  // for more information.
  2577  func (c *OrganizationsGetOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetOrganizationSettingsCall {
  2578  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2579  	return c
  2580  }
  2581  
  2582  // IfNoneMatch sets the optional parameter which makes the operation
  2583  // fail if the object's ETag matches the given value. This is useful for
  2584  // getting updates only after the object has changed since the last
  2585  // request. Use googleapi.IsNotModified to check whether the response
  2586  // error from Do is the result of In-None-Match.
  2587  func (c *OrganizationsGetOrganizationSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetOrganizationSettingsCall {
  2588  	c.ifNoneMatch_ = entityTag
  2589  	return c
  2590  }
  2591  
  2592  // Context sets the context to be used in this call's Do method. Any
  2593  // pending HTTP request will be aborted if the provided context is
  2594  // canceled.
  2595  func (c *OrganizationsGetOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsGetOrganizationSettingsCall {
  2596  	c.ctx_ = ctx
  2597  	return c
  2598  }
  2599  
  2600  // Header returns an http.Header that can be modified by the caller to
  2601  // add HTTP headers to the request.
  2602  func (c *OrganizationsGetOrganizationSettingsCall) Header() http.Header {
  2603  	if c.header_ == nil {
  2604  		c.header_ = make(http.Header)
  2605  	}
  2606  	return c.header_
  2607  }
  2608  
  2609  func (c *OrganizationsGetOrganizationSettingsCall) doRequest(alt string) (*http.Response, error) {
  2610  	reqHeaders := make(http.Header)
  2611  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  2612  	for k, v := range c.header_ {
  2613  		reqHeaders[k] = v
  2614  	}
  2615  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2616  	if c.ifNoneMatch_ != "" {
  2617  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2618  	}
  2619  	var body io.Reader = nil
  2620  	c.urlParams_.Set("alt", alt)
  2621  	c.urlParams_.Set("prettyPrint", "false")
  2622  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  2623  	urls += "?" + c.urlParams_.Encode()
  2624  	req, err := http.NewRequest("GET", urls, body)
  2625  	if err != nil {
  2626  		return nil, err
  2627  	}
  2628  	req.Header = reqHeaders
  2629  	googleapi.Expand(req.URL, map[string]string{
  2630  		"name": c.name,
  2631  	})
  2632  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2633  }
  2634  
  2635  // Do executes the "securitycenter.organizations.getOrganizationSettings" call.
  2636  // Exactly one of *OrganizationSettings or error will be non-nil. Any
  2637  // non-2xx status code is an error. Response headers are in either
  2638  // *OrganizationSettings.ServerResponse.Header or (if a response was
  2639  // returned at all) in error.(*googleapi.Error).Header. Use
  2640  // googleapi.IsNotModified to check whether the returned error was
  2641  // because http.StatusNotModified was returned.
  2642  func (c *OrganizationsGetOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, error) {
  2643  	gensupport.SetOptions(c.urlParams_, opts...)
  2644  	res, err := c.doRequest("json")
  2645  	if res != nil && res.StatusCode == http.StatusNotModified {
  2646  		if res.Body != nil {
  2647  			res.Body.Close()
  2648  		}
  2649  		return nil, &googleapi.Error{
  2650  			Code:   res.StatusCode,
  2651  			Header: res.Header,
  2652  		}
  2653  	}
  2654  	if err != nil {
  2655  		return nil, err
  2656  	}
  2657  	defer googleapi.CloseBody(res)
  2658  	if err := googleapi.CheckResponse(res); err != nil {
  2659  		return nil, err
  2660  	}
  2661  	ret := &OrganizationSettings{
  2662  		ServerResponse: googleapi.ServerResponse{
  2663  			Header:         res.Header,
  2664  			HTTPStatusCode: res.StatusCode,
  2665  		},
  2666  	}
  2667  	target := &ret
  2668  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2669  		return nil, err
  2670  	}
  2671  	return ret, nil
  2672  	// {
  2673  	//   "description": "Gets the settings for an organization.",
  2674  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/organizationSettings",
  2675  	//   "httpMethod": "GET",
  2676  	//   "id": "securitycenter.organizations.getOrganizationSettings",
  2677  	//   "parameterOrder": [
  2678  	//     "name"
  2679  	//   ],
  2680  	//   "parameters": {
  2681  	//     "name": {
  2682  	//       "description": "Required. Name of the organization to get organization settings for. Its format is \"organizations/[organization_id]/organizationSettings\".",
  2683  	//       "location": "path",
  2684  	//       "pattern": "^organizations/[^/]+/organizationSettings$",
  2685  	//       "required": true,
  2686  	//       "type": "string"
  2687  	//     }
  2688  	//   },
  2689  	//   "path": "v1p1beta1/{+name}",
  2690  	//   "response": {
  2691  	//     "$ref": "OrganizationSettings"
  2692  	//   },
  2693  	//   "scopes": [
  2694  	//     "https://www.googleapis.com/auth/cloud-platform"
  2695  	//   ]
  2696  	// }
  2697  
  2698  }
  2699  
  2700  // method id "securitycenter.organizations.updateOrganizationSettings":
  2701  
  2702  type OrganizationsUpdateOrganizationSettingsCall struct {
  2703  	s                    *Service
  2704  	name                 string
  2705  	organizationsettings *OrganizationSettings
  2706  	urlParams_           gensupport.URLParams
  2707  	ctx_                 context.Context
  2708  	header_              http.Header
  2709  }
  2710  
  2711  // UpdateOrganizationSettings: Updates an organization's settings.
  2712  func (r *OrganizationsService) UpdateOrganizationSettings(name string, organizationsettings *OrganizationSettings) *OrganizationsUpdateOrganizationSettingsCall {
  2713  	c := &OrganizationsUpdateOrganizationSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2714  	c.name = name
  2715  	c.organizationsettings = organizationsettings
  2716  	return c
  2717  }
  2718  
  2719  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  2720  // use when updating the settings resource. If empty all mutable fields
  2721  // will be updated.
  2722  func (c *OrganizationsUpdateOrganizationSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateOrganizationSettingsCall {
  2723  	c.urlParams_.Set("updateMask", updateMask)
  2724  	return c
  2725  }
  2726  
  2727  // Fields allows partial responses to be retrieved. See
  2728  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2729  // for more information.
  2730  func (c *OrganizationsUpdateOrganizationSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateOrganizationSettingsCall {
  2731  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2732  	return c
  2733  }
  2734  
  2735  // Context sets the context to be used in this call's Do method. Any
  2736  // pending HTTP request will be aborted if the provided context is
  2737  // canceled.
  2738  func (c *OrganizationsUpdateOrganizationSettingsCall) Context(ctx context.Context) *OrganizationsUpdateOrganizationSettingsCall {
  2739  	c.ctx_ = ctx
  2740  	return c
  2741  }
  2742  
  2743  // Header returns an http.Header that can be modified by the caller to
  2744  // add HTTP headers to the request.
  2745  func (c *OrganizationsUpdateOrganizationSettingsCall) Header() http.Header {
  2746  	if c.header_ == nil {
  2747  		c.header_ = make(http.Header)
  2748  	}
  2749  	return c.header_
  2750  }
  2751  
  2752  func (c *OrganizationsUpdateOrganizationSettingsCall) doRequest(alt string) (*http.Response, error) {
  2753  	reqHeaders := make(http.Header)
  2754  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  2755  	for k, v := range c.header_ {
  2756  		reqHeaders[k] = v
  2757  	}
  2758  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2759  	var body io.Reader = nil
  2760  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.organizationsettings)
  2761  	if err != nil {
  2762  		return nil, err
  2763  	}
  2764  	reqHeaders.Set("Content-Type", "application/json")
  2765  	c.urlParams_.Set("alt", alt)
  2766  	c.urlParams_.Set("prettyPrint", "false")
  2767  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  2768  	urls += "?" + c.urlParams_.Encode()
  2769  	req, err := http.NewRequest("PATCH", urls, body)
  2770  	if err != nil {
  2771  		return nil, err
  2772  	}
  2773  	req.Header = reqHeaders
  2774  	googleapi.Expand(req.URL, map[string]string{
  2775  		"name": c.name,
  2776  	})
  2777  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2778  }
  2779  
  2780  // Do executes the "securitycenter.organizations.updateOrganizationSettings" call.
  2781  // Exactly one of *OrganizationSettings or error will be non-nil. Any
  2782  // non-2xx status code is an error. Response headers are in either
  2783  // *OrganizationSettings.ServerResponse.Header or (if a response was
  2784  // returned at all) in error.(*googleapi.Error).Header. Use
  2785  // googleapi.IsNotModified to check whether the returned error was
  2786  // because http.StatusNotModified was returned.
  2787  func (c *OrganizationsUpdateOrganizationSettingsCall) Do(opts ...googleapi.CallOption) (*OrganizationSettings, error) {
  2788  	gensupport.SetOptions(c.urlParams_, opts...)
  2789  	res, err := c.doRequest("json")
  2790  	if res != nil && res.StatusCode == http.StatusNotModified {
  2791  		if res.Body != nil {
  2792  			res.Body.Close()
  2793  		}
  2794  		return nil, &googleapi.Error{
  2795  			Code:   res.StatusCode,
  2796  			Header: res.Header,
  2797  		}
  2798  	}
  2799  	if err != nil {
  2800  		return nil, err
  2801  	}
  2802  	defer googleapi.CloseBody(res)
  2803  	if err := googleapi.CheckResponse(res); err != nil {
  2804  		return nil, err
  2805  	}
  2806  	ret := &OrganizationSettings{
  2807  		ServerResponse: googleapi.ServerResponse{
  2808  			Header:         res.Header,
  2809  			HTTPStatusCode: res.StatusCode,
  2810  		},
  2811  	}
  2812  	target := &ret
  2813  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2814  		return nil, err
  2815  	}
  2816  	return ret, nil
  2817  	// {
  2818  	//   "description": "Updates an organization's settings.",
  2819  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/organizationSettings",
  2820  	//   "httpMethod": "PATCH",
  2821  	//   "id": "securitycenter.organizations.updateOrganizationSettings",
  2822  	//   "parameterOrder": [
  2823  	//     "name"
  2824  	//   ],
  2825  	//   "parameters": {
  2826  	//     "name": {
  2827  	//       "description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".",
  2828  	//       "location": "path",
  2829  	//       "pattern": "^organizations/[^/]+/organizationSettings$",
  2830  	//       "required": true,
  2831  	//       "type": "string"
  2832  	//     },
  2833  	//     "updateMask": {
  2834  	//       "description": "The FieldMask to use when updating the settings resource. If empty all mutable fields will be updated.",
  2835  	//       "format": "google-fieldmask",
  2836  	//       "location": "query",
  2837  	//       "type": "string"
  2838  	//     }
  2839  	//   },
  2840  	//   "path": "v1p1beta1/{+name}",
  2841  	//   "request": {
  2842  	//     "$ref": "OrganizationSettings"
  2843  	//   },
  2844  	//   "response": {
  2845  	//     "$ref": "OrganizationSettings"
  2846  	//   },
  2847  	//   "scopes": [
  2848  	//     "https://www.googleapis.com/auth/cloud-platform"
  2849  	//   ]
  2850  	// }
  2851  
  2852  }
  2853  
  2854  // method id "securitycenter.organizations.assets.group":
  2855  
  2856  type OrganizationsAssetsGroupCall struct {
  2857  	s                  *Service
  2858  	parent             string
  2859  	groupassetsrequest *GroupAssetsRequest
  2860  	urlParams_         gensupport.URLParams
  2861  	ctx_               context.Context
  2862  	header_            http.Header
  2863  }
  2864  
  2865  // Group: Filters an organization's assets and groups them by their
  2866  // specified properties.
  2867  func (r *OrganizationsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *OrganizationsAssetsGroupCall {
  2868  	c := &OrganizationsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2869  	c.parent = parent
  2870  	c.groupassetsrequest = groupassetsrequest
  2871  	return c
  2872  }
  2873  
  2874  // Fields allows partial responses to be retrieved. See
  2875  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2876  // for more information.
  2877  func (c *OrganizationsAssetsGroupCall) Fields(s ...googleapi.Field) *OrganizationsAssetsGroupCall {
  2878  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2879  	return c
  2880  }
  2881  
  2882  // Context sets the context to be used in this call's Do method. Any
  2883  // pending HTTP request will be aborted if the provided context is
  2884  // canceled.
  2885  func (c *OrganizationsAssetsGroupCall) Context(ctx context.Context) *OrganizationsAssetsGroupCall {
  2886  	c.ctx_ = ctx
  2887  	return c
  2888  }
  2889  
  2890  // Header returns an http.Header that can be modified by the caller to
  2891  // add HTTP headers to the request.
  2892  func (c *OrganizationsAssetsGroupCall) Header() http.Header {
  2893  	if c.header_ == nil {
  2894  		c.header_ = make(http.Header)
  2895  	}
  2896  	return c.header_
  2897  }
  2898  
  2899  func (c *OrganizationsAssetsGroupCall) doRequest(alt string) (*http.Response, error) {
  2900  	reqHeaders := make(http.Header)
  2901  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  2902  	for k, v := range c.header_ {
  2903  		reqHeaders[k] = v
  2904  	}
  2905  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2906  	var body io.Reader = nil
  2907  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupassetsrequest)
  2908  	if err != nil {
  2909  		return nil, err
  2910  	}
  2911  	reqHeaders.Set("Content-Type", "application/json")
  2912  	c.urlParams_.Set("alt", alt)
  2913  	c.urlParams_.Set("prettyPrint", "false")
  2914  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/assets:group")
  2915  	urls += "?" + c.urlParams_.Encode()
  2916  	req, err := http.NewRequest("POST", urls, body)
  2917  	if err != nil {
  2918  		return nil, err
  2919  	}
  2920  	req.Header = reqHeaders
  2921  	googleapi.Expand(req.URL, map[string]string{
  2922  		"parent": c.parent,
  2923  	})
  2924  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2925  }
  2926  
  2927  // Do executes the "securitycenter.organizations.assets.group" call.
  2928  // Exactly one of *GroupAssetsResponse or error will be non-nil. Any
  2929  // non-2xx status code is an error. Response headers are in either
  2930  // *GroupAssetsResponse.ServerResponse.Header or (if a response was
  2931  // returned at all) in error.(*googleapi.Error).Header. Use
  2932  // googleapi.IsNotModified to check whether the returned error was
  2933  // because http.StatusNotModified was returned.
  2934  func (c *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsResponse, error) {
  2935  	gensupport.SetOptions(c.urlParams_, opts...)
  2936  	res, err := c.doRequest("json")
  2937  	if res != nil && res.StatusCode == http.StatusNotModified {
  2938  		if res.Body != nil {
  2939  			res.Body.Close()
  2940  		}
  2941  		return nil, &googleapi.Error{
  2942  			Code:   res.StatusCode,
  2943  			Header: res.Header,
  2944  		}
  2945  	}
  2946  	if err != nil {
  2947  		return nil, err
  2948  	}
  2949  	defer googleapi.CloseBody(res)
  2950  	if err := googleapi.CheckResponse(res); err != nil {
  2951  		return nil, err
  2952  	}
  2953  	ret := &GroupAssetsResponse{
  2954  		ServerResponse: googleapi.ServerResponse{
  2955  			Header:         res.Header,
  2956  			HTTPStatusCode: res.StatusCode,
  2957  		},
  2958  	}
  2959  	target := &ret
  2960  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2961  		return nil, err
  2962  	}
  2963  	return ret, nil
  2964  	// {
  2965  	//   "description": "Filters an organization's assets and groups them by their specified properties.",
  2966  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/assets:group",
  2967  	//   "httpMethod": "POST",
  2968  	//   "id": "securitycenter.organizations.assets.group",
  2969  	//   "parameterOrder": [
  2970  	//     "parent"
  2971  	//   ],
  2972  	//   "parameters": {
  2973  	//     "parent": {
  2974  	//       "description": "Required. Name of the organization to groupBy. Its format is \"organizations/[organization_id]\".",
  2975  	//       "location": "path",
  2976  	//       "pattern": "^organizations/[^/]+$",
  2977  	//       "required": true,
  2978  	//       "type": "string"
  2979  	//     }
  2980  	//   },
  2981  	//   "path": "v1p1beta1/{+parent}/assets:group",
  2982  	//   "request": {
  2983  	//     "$ref": "GroupAssetsRequest"
  2984  	//   },
  2985  	//   "response": {
  2986  	//     "$ref": "GroupAssetsResponse"
  2987  	//   },
  2988  	//   "scopes": [
  2989  	//     "https://www.googleapis.com/auth/cloud-platform"
  2990  	//   ]
  2991  	// }
  2992  
  2993  }
  2994  
  2995  // Pages invokes f for each page of results.
  2996  // A non-nil error returned from f will halt the iteration.
  2997  // The provided context supersedes any context provided to the Context method.
  2998  func (c *OrganizationsAssetsGroupCall) Pages(ctx context.Context, f func(*GroupAssetsResponse) error) error {
  2999  	c.ctx_ = ctx
  3000  	defer func(pt string) { c.groupassetsrequest.PageToken = pt }(c.groupassetsrequest.PageToken) // reset paging to original point
  3001  	for {
  3002  		x, err := c.Do()
  3003  		if err != nil {
  3004  			return err
  3005  		}
  3006  		if err := f(x); err != nil {
  3007  			return err
  3008  		}
  3009  		if x.NextPageToken == "" {
  3010  			return nil
  3011  		}
  3012  		c.groupassetsrequest.PageToken = x.NextPageToken
  3013  	}
  3014  }
  3015  
  3016  // method id "securitycenter.organizations.assets.list":
  3017  
  3018  type OrganizationsAssetsListCall struct {
  3019  	s            *Service
  3020  	parent       string
  3021  	urlParams_   gensupport.URLParams
  3022  	ifNoneMatch_ string
  3023  	ctx_         context.Context
  3024  	header_      http.Header
  3025  }
  3026  
  3027  // List: Lists an organization's assets.
  3028  func (r *OrganizationsAssetsService) List(parent string) *OrganizationsAssetsListCall {
  3029  	c := &OrganizationsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3030  	c.parent = parent
  3031  	return c
  3032  }
  3033  
  3034  // CompareDuration sets the optional parameter "compareDuration": When
  3035  // compare_duration is set, the ListAssetsResult's "state_change"
  3036  // attribute is updated to indicate whether the asset was added,
  3037  // removed, or remained present during the compare_duration period of
  3038  // time that precedes the read_time. This is the time between (read_time
  3039  // - compare_duration) and read_time. The state_change value is derived
  3040  // based on the presence of the asset at the two points in time.
  3041  // Intermediate state changes between the two times don't affect the
  3042  // result. For example, the results aren't affected if the asset is
  3043  // removed and re-created again. Possible "state_change" values when
  3044  // compare_duration is specified: * "ADDED": indicates that the asset
  3045  // was not present at the start of compare_duration, but present at
  3046  // read_time. * "REMOVED": indicates that the asset was present at the
  3047  // start of compare_duration, but not present at read_time. * "ACTIVE":
  3048  // indicates that the asset was present at both the start and the end of
  3049  // the time period defined by compare_duration and read_time. If
  3050  // compare_duration is not specified, then the only possible
  3051  // state_change is "UNUSED", which will be the state_change set for all
  3052  // assets present at read_time.
  3053  func (c *OrganizationsAssetsListCall) CompareDuration(compareDuration string) *OrganizationsAssetsListCall {
  3054  	c.urlParams_.Set("compareDuration", compareDuration)
  3055  	return c
  3056  }
  3057  
  3058  // FieldMask sets the optional parameter "fieldMask": A field mask to
  3059  // specify the ListAssetsResult fields to be listed in the response. An
  3060  // empty field mask will list all fields.
  3061  func (c *OrganizationsAssetsListCall) FieldMask(fieldMask string) *OrganizationsAssetsListCall {
  3062  	c.urlParams_.Set("fieldMask", fieldMask)
  3063  	return c
  3064  }
  3065  
  3066  // Filter sets the optional parameter "filter": Expression that defines
  3067  // the filter to apply across assets. The expression is a list of zero
  3068  // or more restrictions combined via logical operators `AND` and `OR`.
  3069  // Parentheses are supported, and `OR` has higher precedence than `AND`.
  3070  // Restrictions have the form ` ` and may have a `-` character in front
  3071  // of them to indicate negation. The fields map to those defined in the
  3072  // Asset resource. Examples include: * name *
  3073  // security_center_properties.resource_name *
  3074  // resource_properties.a_property * security_marks.marks.marka The
  3075  // supported operators are: * `=` for all value types. * `>`, `<`, `>=`,
  3076  // `<=` for integer values. * `:`, meaning substring matching, for
  3077  // strings. The supported value types are: * string literals in quotes.
  3078  // * integer literals without quotes. * boolean literals `true` and
  3079  // `false` without quotes. The following are the allowed field and
  3080  // operator combinations: * name: `=` * update_time: `=`, `>`, `<`,
  3081  // `>=`, `<=` Usage: This should be milliseconds since epoch or an
  3082  // RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00"
  3083  // `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`,
  3084  // `<=` Usage: This should be milliseconds since epoch or an RFC3339
  3085  // string. Examples: `create_time = "2019-06-10T16:07:18-07:00"
  3086  // `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` *
  3087  // resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` *
  3088  // security_marks.marks: `=`, `:` *
  3089  // security_center_properties.resource_name: `=`, `:` *
  3090  // security_center_properties.resource_display_name: `=`, `:` *
  3091  // security_center_properties.resource_type: `=`, `:` *
  3092  // security_center_properties.resource_parent: `=`, `:` *
  3093  // security_center_properties.resource_parent_display_name: `=`, `:` *
  3094  // security_center_properties.resource_project: `=`, `:` *
  3095  // security_center_properties.resource_project_display_name: `=`, `:` *
  3096  // security_center_properties.resource_owners: `=`, `:` For example,
  3097  // `resource_properties.size = 100` is a valid filter string. Use a
  3098  // partial match on the empty string to filter based on a property
  3099  // existing: `resource_properties.my_property : "" Use a negated
  3100  // partial match on the empty string to filter based on a property not
  3101  // existing: `-resource_properties.my_property : ""
  3102  func (c *OrganizationsAssetsListCall) Filter(filter string) *OrganizationsAssetsListCall {
  3103  	c.urlParams_.Set("filter", filter)
  3104  	return c
  3105  }
  3106  
  3107  // OrderBy sets the optional parameter "orderBy": Expression that
  3108  // defines what fields and order to use for sorting. The string value
  3109  // should follow SQL syntax: comma separated list of fields. For
  3110  // example: "name,resource_properties.a_property". The default sorting
  3111  // order is ascending. To specify descending order for a field, a suffix
  3112  // " desc" should be appended to the field name. For example: "name
  3113  // desc,resource_properties.a_property". Redundant space characters in
  3114  // the syntax are insignificant. "name
  3115  // desc,resource_properties.a_property" and " name desc ,
  3116  // resource_properties.a_property " are equivalent. The following fields
  3117  // are supported: name update_time resource_properties
  3118  // security_marks.marks security_center_properties.resource_name
  3119  // security_center_properties.resource_display_name
  3120  // security_center_properties.resource_parent
  3121  // security_center_properties.resource_parent_display_name
  3122  // security_center_properties.resource_project
  3123  // security_center_properties.resource_project_display_name
  3124  // security_center_properties.resource_type
  3125  func (c *OrganizationsAssetsListCall) OrderBy(orderBy string) *OrganizationsAssetsListCall {
  3126  	c.urlParams_.Set("orderBy", orderBy)
  3127  	return c
  3128  }
  3129  
  3130  // PageSize sets the optional parameter "pageSize": The maximum number
  3131  // of results to return in a single response. Default is 10, minimum is
  3132  // 1, maximum is 1000.
  3133  func (c *OrganizationsAssetsListCall) PageSize(pageSize int64) *OrganizationsAssetsListCall {
  3134  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3135  	return c
  3136  }
  3137  
  3138  // PageToken sets the optional parameter "pageToken": The value returned
  3139  // by the last `ListAssetsResponse`; indicates that this is a
  3140  // continuation of a prior `ListAssets` call, and that the system should
  3141  // return the next page of data.
  3142  func (c *OrganizationsAssetsListCall) PageToken(pageToken string) *OrganizationsAssetsListCall {
  3143  	c.urlParams_.Set("pageToken", pageToken)
  3144  	return c
  3145  }
  3146  
  3147  // ReadTime sets the optional parameter "readTime": Time used as a
  3148  // reference point when filtering assets. The filter is limited to
  3149  // assets existing at the supplied time and their values are those at
  3150  // that specific time. Absence of this field will default to the API's
  3151  // version of NOW.
  3152  func (c *OrganizationsAssetsListCall) ReadTime(readTime string) *OrganizationsAssetsListCall {
  3153  	c.urlParams_.Set("readTime", readTime)
  3154  	return c
  3155  }
  3156  
  3157  // Fields allows partial responses to be retrieved. See
  3158  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3159  // for more information.
  3160  func (c *OrganizationsAssetsListCall) Fields(s ...googleapi.Field) *OrganizationsAssetsListCall {
  3161  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3162  	return c
  3163  }
  3164  
  3165  // IfNoneMatch sets the optional parameter which makes the operation
  3166  // fail if the object's ETag matches the given value. This is useful for
  3167  // getting updates only after the object has changed since the last
  3168  // request. Use googleapi.IsNotModified to check whether the response
  3169  // error from Do is the result of In-None-Match.
  3170  func (c *OrganizationsAssetsListCall) IfNoneMatch(entityTag string) *OrganizationsAssetsListCall {
  3171  	c.ifNoneMatch_ = entityTag
  3172  	return c
  3173  }
  3174  
  3175  // Context sets the context to be used in this call's Do method. Any
  3176  // pending HTTP request will be aborted if the provided context is
  3177  // canceled.
  3178  func (c *OrganizationsAssetsListCall) Context(ctx context.Context) *OrganizationsAssetsListCall {
  3179  	c.ctx_ = ctx
  3180  	return c
  3181  }
  3182  
  3183  // Header returns an http.Header that can be modified by the caller to
  3184  // add HTTP headers to the request.
  3185  func (c *OrganizationsAssetsListCall) Header() http.Header {
  3186  	if c.header_ == nil {
  3187  		c.header_ = make(http.Header)
  3188  	}
  3189  	return c.header_
  3190  }
  3191  
  3192  func (c *OrganizationsAssetsListCall) doRequest(alt string) (*http.Response, error) {
  3193  	reqHeaders := make(http.Header)
  3194  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  3195  	for k, v := range c.header_ {
  3196  		reqHeaders[k] = v
  3197  	}
  3198  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3199  	if c.ifNoneMatch_ != "" {
  3200  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3201  	}
  3202  	var body io.Reader = nil
  3203  	c.urlParams_.Set("alt", alt)
  3204  	c.urlParams_.Set("prettyPrint", "false")
  3205  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/assets")
  3206  	urls += "?" + c.urlParams_.Encode()
  3207  	req, err := http.NewRequest("GET", urls, body)
  3208  	if err != nil {
  3209  		return nil, err
  3210  	}
  3211  	req.Header = reqHeaders
  3212  	googleapi.Expand(req.URL, map[string]string{
  3213  		"parent": c.parent,
  3214  	})
  3215  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3216  }
  3217  
  3218  // Do executes the "securitycenter.organizations.assets.list" call.
  3219  // Exactly one of *ListAssetsResponse or error will be non-nil. Any
  3220  // non-2xx status code is an error. Response headers are in either
  3221  // *ListAssetsResponse.ServerResponse.Header or (if a response was
  3222  // returned at all) in error.(*googleapi.Error).Header. Use
  3223  // googleapi.IsNotModified to check whether the returned error was
  3224  // because http.StatusNotModified was returned.
  3225  func (c *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsResponse, error) {
  3226  	gensupport.SetOptions(c.urlParams_, opts...)
  3227  	res, err := c.doRequest("json")
  3228  	if res != nil && res.StatusCode == http.StatusNotModified {
  3229  		if res.Body != nil {
  3230  			res.Body.Close()
  3231  		}
  3232  		return nil, &googleapi.Error{
  3233  			Code:   res.StatusCode,
  3234  			Header: res.Header,
  3235  		}
  3236  	}
  3237  	if err != nil {
  3238  		return nil, err
  3239  	}
  3240  	defer googleapi.CloseBody(res)
  3241  	if err := googleapi.CheckResponse(res); err != nil {
  3242  		return nil, err
  3243  	}
  3244  	ret := &ListAssetsResponse{
  3245  		ServerResponse: googleapi.ServerResponse{
  3246  			Header:         res.Header,
  3247  			HTTPStatusCode: res.StatusCode,
  3248  		},
  3249  	}
  3250  	target := &ret
  3251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3252  		return nil, err
  3253  	}
  3254  	return ret, nil
  3255  	// {
  3256  	//   "description": "Lists an organization's assets.",
  3257  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/assets",
  3258  	//   "httpMethod": "GET",
  3259  	//   "id": "securitycenter.organizations.assets.list",
  3260  	//   "parameterOrder": [
  3261  	//     "parent"
  3262  	//   ],
  3263  	//   "parameters": {
  3264  	//     "compareDuration": {
  3265  	//       "description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.",
  3266  	//       "format": "google-duration",
  3267  	//       "location": "query",
  3268  	//       "type": "string"
  3269  	//     },
  3270  	//     "fieldMask": {
  3271  	//       "description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.",
  3272  	//       "format": "google-fieldmask",
  3273  	//       "location": "query",
  3274  	//       "type": "string"
  3275  	//     },
  3276  	//     "filter": {
  3277  	//       "description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`",
  3278  	//       "location": "query",
  3279  	//       "type": "string"
  3280  	//     },
  3281  	//     "orderBy": {
  3282  	//       "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type",
  3283  	//       "location": "query",
  3284  	//       "type": "string"
  3285  	//     },
  3286  	//     "pageSize": {
  3287  	//       "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.",
  3288  	//       "format": "int32",
  3289  	//       "location": "query",
  3290  	//       "type": "integer"
  3291  	//     },
  3292  	//     "pageToken": {
  3293  	//       "description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.",
  3294  	//       "location": "query",
  3295  	//       "type": "string"
  3296  	//     },
  3297  	//     "parent": {
  3298  	//       "description": "Required. Name of the organization assets should belong to. Its format is \"organizations/[organization_id]\".",
  3299  	//       "location": "path",
  3300  	//       "pattern": "^organizations/[^/]+$",
  3301  	//       "required": true,
  3302  	//       "type": "string"
  3303  	//     },
  3304  	//     "readTime": {
  3305  	//       "description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.",
  3306  	//       "format": "google-datetime",
  3307  	//       "location": "query",
  3308  	//       "type": "string"
  3309  	//     }
  3310  	//   },
  3311  	//   "path": "v1p1beta1/{+parent}/assets",
  3312  	//   "response": {
  3313  	//     "$ref": "ListAssetsResponse"
  3314  	//   },
  3315  	//   "scopes": [
  3316  	//     "https://www.googleapis.com/auth/cloud-platform"
  3317  	//   ]
  3318  	// }
  3319  
  3320  }
  3321  
  3322  // Pages invokes f for each page of results.
  3323  // A non-nil error returned from f will halt the iteration.
  3324  // The provided context supersedes any context provided to the Context method.
  3325  func (c *OrganizationsAssetsListCall) Pages(ctx context.Context, f func(*ListAssetsResponse) error) error {
  3326  	c.ctx_ = ctx
  3327  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3328  	for {
  3329  		x, err := c.Do()
  3330  		if err != nil {
  3331  			return err
  3332  		}
  3333  		if err := f(x); err != nil {
  3334  			return err
  3335  		}
  3336  		if x.NextPageToken == "" {
  3337  			return nil
  3338  		}
  3339  		c.PageToken(x.NextPageToken)
  3340  	}
  3341  }
  3342  
  3343  // method id "securitycenter.organizations.assets.runDiscovery":
  3344  
  3345  type OrganizationsAssetsRunDiscoveryCall struct {
  3346  	s                        *Service
  3347  	parent                   string
  3348  	runassetdiscoveryrequest *RunAssetDiscoveryRequest
  3349  	urlParams_               gensupport.URLParams
  3350  	ctx_                     context.Context
  3351  	header_                  http.Header
  3352  }
  3353  
  3354  // RunDiscovery: Runs asset discovery. The discovery is tracked with a
  3355  // long-running operation. This API can only be called with limited
  3356  // frequency for an organization. If it is called too frequently the
  3357  // caller will receive a TOO_MANY_REQUESTS error.
  3358  func (r *OrganizationsAssetsService) RunDiscovery(parent string, runassetdiscoveryrequest *RunAssetDiscoveryRequest) *OrganizationsAssetsRunDiscoveryCall {
  3359  	c := &OrganizationsAssetsRunDiscoveryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3360  	c.parent = parent
  3361  	c.runassetdiscoveryrequest = runassetdiscoveryrequest
  3362  	return c
  3363  }
  3364  
  3365  // Fields allows partial responses to be retrieved. See
  3366  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3367  // for more information.
  3368  func (c *OrganizationsAssetsRunDiscoveryCall) Fields(s ...googleapi.Field) *OrganizationsAssetsRunDiscoveryCall {
  3369  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3370  	return c
  3371  }
  3372  
  3373  // Context sets the context to be used in this call's Do method. Any
  3374  // pending HTTP request will be aborted if the provided context is
  3375  // canceled.
  3376  func (c *OrganizationsAssetsRunDiscoveryCall) Context(ctx context.Context) *OrganizationsAssetsRunDiscoveryCall {
  3377  	c.ctx_ = ctx
  3378  	return c
  3379  }
  3380  
  3381  // Header returns an http.Header that can be modified by the caller to
  3382  // add HTTP headers to the request.
  3383  func (c *OrganizationsAssetsRunDiscoveryCall) Header() http.Header {
  3384  	if c.header_ == nil {
  3385  		c.header_ = make(http.Header)
  3386  	}
  3387  	return c.header_
  3388  }
  3389  
  3390  func (c *OrganizationsAssetsRunDiscoveryCall) doRequest(alt string) (*http.Response, error) {
  3391  	reqHeaders := make(http.Header)
  3392  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  3393  	for k, v := range c.header_ {
  3394  		reqHeaders[k] = v
  3395  	}
  3396  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3397  	var body io.Reader = nil
  3398  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runassetdiscoveryrequest)
  3399  	if err != nil {
  3400  		return nil, err
  3401  	}
  3402  	reqHeaders.Set("Content-Type", "application/json")
  3403  	c.urlParams_.Set("alt", alt)
  3404  	c.urlParams_.Set("prettyPrint", "false")
  3405  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/assets:runDiscovery")
  3406  	urls += "?" + c.urlParams_.Encode()
  3407  	req, err := http.NewRequest("POST", urls, body)
  3408  	if err != nil {
  3409  		return nil, err
  3410  	}
  3411  	req.Header = reqHeaders
  3412  	googleapi.Expand(req.URL, map[string]string{
  3413  		"parent": c.parent,
  3414  	})
  3415  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3416  }
  3417  
  3418  // Do executes the "securitycenter.organizations.assets.runDiscovery" call.
  3419  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3420  // status code is an error. Response headers are in either
  3421  // *Operation.ServerResponse.Header or (if a response was returned at
  3422  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3423  // to check whether the returned error was because
  3424  // http.StatusNotModified was returned.
  3425  func (c *OrganizationsAssetsRunDiscoveryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3426  	gensupport.SetOptions(c.urlParams_, opts...)
  3427  	res, err := c.doRequest("json")
  3428  	if res != nil && res.StatusCode == http.StatusNotModified {
  3429  		if res.Body != nil {
  3430  			res.Body.Close()
  3431  		}
  3432  		return nil, &googleapi.Error{
  3433  			Code:   res.StatusCode,
  3434  			Header: res.Header,
  3435  		}
  3436  	}
  3437  	if err != nil {
  3438  		return nil, err
  3439  	}
  3440  	defer googleapi.CloseBody(res)
  3441  	if err := googleapi.CheckResponse(res); err != nil {
  3442  		return nil, err
  3443  	}
  3444  	ret := &Operation{
  3445  		ServerResponse: googleapi.ServerResponse{
  3446  			Header:         res.Header,
  3447  			HTTPStatusCode: res.StatusCode,
  3448  		},
  3449  	}
  3450  	target := &ret
  3451  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3452  		return nil, err
  3453  	}
  3454  	return ret, nil
  3455  	// {
  3456  	//   "description": "Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.",
  3457  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/assets:runDiscovery",
  3458  	//   "httpMethod": "POST",
  3459  	//   "id": "securitycenter.organizations.assets.runDiscovery",
  3460  	//   "parameterOrder": [
  3461  	//     "parent"
  3462  	//   ],
  3463  	//   "parameters": {
  3464  	//     "parent": {
  3465  	//       "description": "Required. Name of the organization to run asset discovery for. Its format is \"organizations/[organization_id]\".",
  3466  	//       "location": "path",
  3467  	//       "pattern": "^organizations/[^/]+$",
  3468  	//       "required": true,
  3469  	//       "type": "string"
  3470  	//     }
  3471  	//   },
  3472  	//   "path": "v1p1beta1/{+parent}/assets:runDiscovery",
  3473  	//   "request": {
  3474  	//     "$ref": "RunAssetDiscoveryRequest"
  3475  	//   },
  3476  	//   "response": {
  3477  	//     "$ref": "Operation"
  3478  	//   },
  3479  	//   "scopes": [
  3480  	//     "https://www.googleapis.com/auth/cloud-platform"
  3481  	//   ]
  3482  	// }
  3483  
  3484  }
  3485  
  3486  // method id "securitycenter.organizations.assets.updateSecurityMarks":
  3487  
  3488  type OrganizationsAssetsUpdateSecurityMarksCall struct {
  3489  	s                                               *Service
  3490  	name                                            string
  3491  	googlecloudsecuritycenterv1p1beta1securitymarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks
  3492  	urlParams_                                      gensupport.URLParams
  3493  	ctx_                                            context.Context
  3494  	header_                                         http.Header
  3495  }
  3496  
  3497  // UpdateSecurityMarks: Updates security marks.
  3498  func (r *OrganizationsAssetsService) UpdateSecurityMarks(name string, googlecloudsecuritycenterv1p1beta1securitymarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks) *OrganizationsAssetsUpdateSecurityMarksCall {
  3499  	c := &OrganizationsAssetsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3500  	c.name = name
  3501  	c.googlecloudsecuritycenterv1p1beta1securitymarks = googlecloudsecuritycenterv1p1beta1securitymarks
  3502  	return c
  3503  }
  3504  
  3505  // StartTime sets the optional parameter "startTime": The time at which
  3506  // the updated SecurityMarks take effect. If not set uses current server
  3507  // time. Updates will be applied to the SecurityMarks that are active
  3508  // immediately preceding this time.
  3509  func (c *OrganizationsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsAssetsUpdateSecurityMarksCall {
  3510  	c.urlParams_.Set("startTime", startTime)
  3511  	return c
  3512  }
  3513  
  3514  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  3515  // use when updating the security marks resource. The field mask must
  3516  // not contain duplicate fields. If empty or set to "marks", all marks
  3517  // will be replaced. Individual marks can be updated using "marks.".
  3518  func (c *OrganizationsAssetsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsAssetsUpdateSecurityMarksCall {
  3519  	c.urlParams_.Set("updateMask", updateMask)
  3520  	return c
  3521  }
  3522  
  3523  // Fields allows partial responses to be retrieved. See
  3524  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3525  // for more information.
  3526  func (c *OrganizationsAssetsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsAssetsUpdateSecurityMarksCall {
  3527  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3528  	return c
  3529  }
  3530  
  3531  // Context sets the context to be used in this call's Do method. Any
  3532  // pending HTTP request will be aborted if the provided context is
  3533  // canceled.
  3534  func (c *OrganizationsAssetsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsAssetsUpdateSecurityMarksCall {
  3535  	c.ctx_ = ctx
  3536  	return c
  3537  }
  3538  
  3539  // Header returns an http.Header that can be modified by the caller to
  3540  // add HTTP headers to the request.
  3541  func (c *OrganizationsAssetsUpdateSecurityMarksCall) Header() http.Header {
  3542  	if c.header_ == nil {
  3543  		c.header_ = make(http.Header)
  3544  	}
  3545  	return c.header_
  3546  }
  3547  
  3548  func (c *OrganizationsAssetsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) {
  3549  	reqHeaders := make(http.Header)
  3550  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  3551  	for k, v := range c.header_ {
  3552  		reqHeaders[k] = v
  3553  	}
  3554  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3555  	var body io.Reader = nil
  3556  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1p1beta1securitymarks)
  3557  	if err != nil {
  3558  		return nil, err
  3559  	}
  3560  	reqHeaders.Set("Content-Type", "application/json")
  3561  	c.urlParams_.Set("alt", alt)
  3562  	c.urlParams_.Set("prettyPrint", "false")
  3563  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  3564  	urls += "?" + c.urlParams_.Encode()
  3565  	req, err := http.NewRequest("PATCH", urls, body)
  3566  	if err != nil {
  3567  		return nil, err
  3568  	}
  3569  	req.Header = reqHeaders
  3570  	googleapi.Expand(req.URL, map[string]string{
  3571  		"name": c.name,
  3572  	})
  3573  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3574  }
  3575  
  3576  // Do executes the "securitycenter.organizations.assets.updateSecurityMarks" call.
  3577  // Exactly one of *GoogleCloudSecuritycenterV1p1beta1SecurityMarks or
  3578  // error will be non-nil. Any non-2xx status code is an error. Response
  3579  // headers are in either
  3580  // *GoogleCloudSecuritycenterV1p1beta1SecurityMarks.ServerResponse.Header
  3581  //
  3582  //	or (if a response was returned at all) in
  3583  //
  3584  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3585  // whether the returned error was because http.StatusNotModified was
  3586  // returned.
  3587  func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1p1beta1SecurityMarks, error) {
  3588  	gensupport.SetOptions(c.urlParams_, opts...)
  3589  	res, err := c.doRequest("json")
  3590  	if res != nil && res.StatusCode == http.StatusNotModified {
  3591  		if res.Body != nil {
  3592  			res.Body.Close()
  3593  		}
  3594  		return nil, &googleapi.Error{
  3595  			Code:   res.StatusCode,
  3596  			Header: res.Header,
  3597  		}
  3598  	}
  3599  	if err != nil {
  3600  		return nil, err
  3601  	}
  3602  	defer googleapi.CloseBody(res)
  3603  	if err := googleapi.CheckResponse(res); err != nil {
  3604  		return nil, err
  3605  	}
  3606  	ret := &GoogleCloudSecuritycenterV1p1beta1SecurityMarks{
  3607  		ServerResponse: googleapi.ServerResponse{
  3608  			Header:         res.Header,
  3609  			HTTPStatusCode: res.StatusCode,
  3610  		},
  3611  	}
  3612  	target := &ret
  3613  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3614  		return nil, err
  3615  	}
  3616  	return ret, nil
  3617  	// {
  3618  	//   "description": "Updates security marks.",
  3619  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/assets/{assetsId}/securityMarks",
  3620  	//   "httpMethod": "PATCH",
  3621  	//   "id": "securitycenter.organizations.assets.updateSecurityMarks",
  3622  	//   "parameterOrder": [
  3623  	//     "name"
  3624  	//   ],
  3625  	//   "parameters": {
  3626  	//     "name": {
  3627  	//       "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".",
  3628  	//       "location": "path",
  3629  	//       "pattern": "^organizations/[^/]+/assets/[^/]+/securityMarks$",
  3630  	//       "required": true,
  3631  	//       "type": "string"
  3632  	//     },
  3633  	//     "startTime": {
  3634  	//       "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time.",
  3635  	//       "format": "google-datetime",
  3636  	//       "location": "query",
  3637  	//       "type": "string"
  3638  	//     },
  3639  	//     "updateMask": {
  3640  	//       "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".",
  3641  	//       "format": "google-fieldmask",
  3642  	//       "location": "query",
  3643  	//       "type": "string"
  3644  	//     }
  3645  	//   },
  3646  	//   "path": "v1p1beta1/{+name}",
  3647  	//   "request": {
  3648  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks"
  3649  	//   },
  3650  	//   "response": {
  3651  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks"
  3652  	//   },
  3653  	//   "scopes": [
  3654  	//     "https://www.googleapis.com/auth/cloud-platform"
  3655  	//   ]
  3656  	// }
  3657  
  3658  }
  3659  
  3660  // method id "securitycenter.organizations.notificationConfigs.create":
  3661  
  3662  type OrganizationsNotificationConfigsCreateCall struct {
  3663  	s                  *Service
  3664  	parent             string
  3665  	notificationconfig *NotificationConfig
  3666  	urlParams_         gensupport.URLParams
  3667  	ctx_               context.Context
  3668  	header_            http.Header
  3669  }
  3670  
  3671  // Create: Creates a notification config.
  3672  func (r *OrganizationsNotificationConfigsService) Create(parent string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsCreateCall {
  3673  	c := &OrganizationsNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3674  	c.parent = parent
  3675  	c.notificationconfig = notificationconfig
  3676  	return c
  3677  }
  3678  
  3679  // ConfigId sets the optional parameter "configId": Required. Unique
  3680  // identifier provided by the client within the parent scope. It must be
  3681  // between 1 and 128 characters, and contains alphanumeric characters,
  3682  // underscores or hyphens only.
  3683  func (c *OrganizationsNotificationConfigsCreateCall) ConfigId(configId string) *OrganizationsNotificationConfigsCreateCall {
  3684  	c.urlParams_.Set("configId", configId)
  3685  	return c
  3686  }
  3687  
  3688  // Fields allows partial responses to be retrieved. See
  3689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3690  // for more information.
  3691  func (c *OrganizationsNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsCreateCall {
  3692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3693  	return c
  3694  }
  3695  
  3696  // Context sets the context to be used in this call's Do method. Any
  3697  // pending HTTP request will be aborted if the provided context is
  3698  // canceled.
  3699  func (c *OrganizationsNotificationConfigsCreateCall) Context(ctx context.Context) *OrganizationsNotificationConfigsCreateCall {
  3700  	c.ctx_ = ctx
  3701  	return c
  3702  }
  3703  
  3704  // Header returns an http.Header that can be modified by the caller to
  3705  // add HTTP headers to the request.
  3706  func (c *OrganizationsNotificationConfigsCreateCall) Header() http.Header {
  3707  	if c.header_ == nil {
  3708  		c.header_ = make(http.Header)
  3709  	}
  3710  	return c.header_
  3711  }
  3712  
  3713  func (c *OrganizationsNotificationConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  3714  	reqHeaders := make(http.Header)
  3715  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  3716  	for k, v := range c.header_ {
  3717  		reqHeaders[k] = v
  3718  	}
  3719  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3720  	var body io.Reader = nil
  3721  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig)
  3722  	if err != nil {
  3723  		return nil, err
  3724  	}
  3725  	reqHeaders.Set("Content-Type", "application/json")
  3726  	c.urlParams_.Set("alt", alt)
  3727  	c.urlParams_.Set("prettyPrint", "false")
  3728  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/notificationConfigs")
  3729  	urls += "?" + c.urlParams_.Encode()
  3730  	req, err := http.NewRequest("POST", urls, body)
  3731  	if err != nil {
  3732  		return nil, err
  3733  	}
  3734  	req.Header = reqHeaders
  3735  	googleapi.Expand(req.URL, map[string]string{
  3736  		"parent": c.parent,
  3737  	})
  3738  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3739  }
  3740  
  3741  // Do executes the "securitycenter.organizations.notificationConfigs.create" call.
  3742  // Exactly one of *NotificationConfig or error will be non-nil. Any
  3743  // non-2xx status code is an error. Response headers are in either
  3744  // *NotificationConfig.ServerResponse.Header or (if a response was
  3745  // returned at all) in error.(*googleapi.Error).Header. Use
  3746  // googleapi.IsNotModified to check whether the returned error was
  3747  // because http.StatusNotModified was returned.
  3748  func (c *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) {
  3749  	gensupport.SetOptions(c.urlParams_, opts...)
  3750  	res, err := c.doRequest("json")
  3751  	if res != nil && res.StatusCode == http.StatusNotModified {
  3752  		if res.Body != nil {
  3753  			res.Body.Close()
  3754  		}
  3755  		return nil, &googleapi.Error{
  3756  			Code:   res.StatusCode,
  3757  			Header: res.Header,
  3758  		}
  3759  	}
  3760  	if err != nil {
  3761  		return nil, err
  3762  	}
  3763  	defer googleapi.CloseBody(res)
  3764  	if err := googleapi.CheckResponse(res); err != nil {
  3765  		return nil, err
  3766  	}
  3767  	ret := &NotificationConfig{
  3768  		ServerResponse: googleapi.ServerResponse{
  3769  			Header:         res.Header,
  3770  			HTTPStatusCode: res.StatusCode,
  3771  		},
  3772  	}
  3773  	target := &ret
  3774  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3775  		return nil, err
  3776  	}
  3777  	return ret, nil
  3778  	// {
  3779  	//   "description": "Creates a notification config.",
  3780  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/notificationConfigs",
  3781  	//   "httpMethod": "POST",
  3782  	//   "id": "securitycenter.organizations.notificationConfigs.create",
  3783  	//   "parameterOrder": [
  3784  	//     "parent"
  3785  	//   ],
  3786  	//   "parameters": {
  3787  	//     "configId": {
  3788  	//       "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only.",
  3789  	//       "location": "query",
  3790  	//       "type": "string"
  3791  	//     },
  3792  	//     "parent": {
  3793  	//       "description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\".",
  3794  	//       "location": "path",
  3795  	//       "pattern": "^organizations/[^/]+$",
  3796  	//       "required": true,
  3797  	//       "type": "string"
  3798  	//     }
  3799  	//   },
  3800  	//   "path": "v1p1beta1/{+parent}/notificationConfigs",
  3801  	//   "request": {
  3802  	//     "$ref": "NotificationConfig"
  3803  	//   },
  3804  	//   "response": {
  3805  	//     "$ref": "NotificationConfig"
  3806  	//   },
  3807  	//   "scopes": [
  3808  	//     "https://www.googleapis.com/auth/cloud-platform"
  3809  	//   ]
  3810  	// }
  3811  
  3812  }
  3813  
  3814  // method id "securitycenter.organizations.notificationConfigs.delete":
  3815  
  3816  type OrganizationsNotificationConfigsDeleteCall struct {
  3817  	s          *Service
  3818  	name       string
  3819  	urlParams_ gensupport.URLParams
  3820  	ctx_       context.Context
  3821  	header_    http.Header
  3822  }
  3823  
  3824  // Delete: Deletes a notification config.
  3825  func (r *OrganizationsNotificationConfigsService) Delete(name string) *OrganizationsNotificationConfigsDeleteCall {
  3826  	c := &OrganizationsNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3827  	c.name = name
  3828  	return c
  3829  }
  3830  
  3831  // Fields allows partial responses to be retrieved. See
  3832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3833  // for more information.
  3834  func (c *OrganizationsNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsDeleteCall {
  3835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3836  	return c
  3837  }
  3838  
  3839  // Context sets the context to be used in this call's Do method. Any
  3840  // pending HTTP request will be aborted if the provided context is
  3841  // canceled.
  3842  func (c *OrganizationsNotificationConfigsDeleteCall) Context(ctx context.Context) *OrganizationsNotificationConfigsDeleteCall {
  3843  	c.ctx_ = ctx
  3844  	return c
  3845  }
  3846  
  3847  // Header returns an http.Header that can be modified by the caller to
  3848  // add HTTP headers to the request.
  3849  func (c *OrganizationsNotificationConfigsDeleteCall) Header() http.Header {
  3850  	if c.header_ == nil {
  3851  		c.header_ = make(http.Header)
  3852  	}
  3853  	return c.header_
  3854  }
  3855  
  3856  func (c *OrganizationsNotificationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3857  	reqHeaders := make(http.Header)
  3858  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  3859  	for k, v := range c.header_ {
  3860  		reqHeaders[k] = v
  3861  	}
  3862  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3863  	var body io.Reader = nil
  3864  	c.urlParams_.Set("alt", alt)
  3865  	c.urlParams_.Set("prettyPrint", "false")
  3866  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  3867  	urls += "?" + c.urlParams_.Encode()
  3868  	req, err := http.NewRequest("DELETE", urls, body)
  3869  	if err != nil {
  3870  		return nil, err
  3871  	}
  3872  	req.Header = reqHeaders
  3873  	googleapi.Expand(req.URL, map[string]string{
  3874  		"name": c.name,
  3875  	})
  3876  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3877  }
  3878  
  3879  // Do executes the "securitycenter.organizations.notificationConfigs.delete" call.
  3880  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3881  // code is an error. Response headers are in either
  3882  // *Empty.ServerResponse.Header or (if a response was returned at all)
  3883  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3884  // check whether the returned error was because http.StatusNotModified
  3885  // was returned.
  3886  func (c *OrganizationsNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3887  	gensupport.SetOptions(c.urlParams_, opts...)
  3888  	res, err := c.doRequest("json")
  3889  	if res != nil && res.StatusCode == http.StatusNotModified {
  3890  		if res.Body != nil {
  3891  			res.Body.Close()
  3892  		}
  3893  		return nil, &googleapi.Error{
  3894  			Code:   res.StatusCode,
  3895  			Header: res.Header,
  3896  		}
  3897  	}
  3898  	if err != nil {
  3899  		return nil, err
  3900  	}
  3901  	defer googleapi.CloseBody(res)
  3902  	if err := googleapi.CheckResponse(res); err != nil {
  3903  		return nil, err
  3904  	}
  3905  	ret := &Empty{
  3906  		ServerResponse: googleapi.ServerResponse{
  3907  			Header:         res.Header,
  3908  			HTTPStatusCode: res.StatusCode,
  3909  		},
  3910  	}
  3911  	target := &ret
  3912  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3913  		return nil, err
  3914  	}
  3915  	return ret, nil
  3916  	// {
  3917  	//   "description": "Deletes a notification config.",
  3918  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}",
  3919  	//   "httpMethod": "DELETE",
  3920  	//   "id": "securitycenter.organizations.notificationConfigs.delete",
  3921  	//   "parameterOrder": [
  3922  	//     "name"
  3923  	//   ],
  3924  	//   "parameters": {
  3925  	//     "name": {
  3926  	//       "description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\".",
  3927  	//       "location": "path",
  3928  	//       "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$",
  3929  	//       "required": true,
  3930  	//       "type": "string"
  3931  	//     }
  3932  	//   },
  3933  	//   "path": "v1p1beta1/{+name}",
  3934  	//   "response": {
  3935  	//     "$ref": "Empty"
  3936  	//   },
  3937  	//   "scopes": [
  3938  	//     "https://www.googleapis.com/auth/cloud-platform"
  3939  	//   ]
  3940  	// }
  3941  
  3942  }
  3943  
  3944  // method id "securitycenter.organizations.notificationConfigs.get":
  3945  
  3946  type OrganizationsNotificationConfigsGetCall struct {
  3947  	s            *Service
  3948  	name         string
  3949  	urlParams_   gensupport.URLParams
  3950  	ifNoneMatch_ string
  3951  	ctx_         context.Context
  3952  	header_      http.Header
  3953  }
  3954  
  3955  // Get: Gets a notification config.
  3956  func (r *OrganizationsNotificationConfigsService) Get(name string) *OrganizationsNotificationConfigsGetCall {
  3957  	c := &OrganizationsNotificationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3958  	c.name = name
  3959  	return c
  3960  }
  3961  
  3962  // Fields allows partial responses to be retrieved. See
  3963  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3964  // for more information.
  3965  func (c *OrganizationsNotificationConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsGetCall {
  3966  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3967  	return c
  3968  }
  3969  
  3970  // IfNoneMatch sets the optional parameter which makes the operation
  3971  // fail if the object's ETag matches the given value. This is useful for
  3972  // getting updates only after the object has changed since the last
  3973  // request. Use googleapi.IsNotModified to check whether the response
  3974  // error from Do is the result of In-None-Match.
  3975  func (c *OrganizationsNotificationConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsGetCall {
  3976  	c.ifNoneMatch_ = entityTag
  3977  	return c
  3978  }
  3979  
  3980  // Context sets the context to be used in this call's Do method. Any
  3981  // pending HTTP request will be aborted if the provided context is
  3982  // canceled.
  3983  func (c *OrganizationsNotificationConfigsGetCall) Context(ctx context.Context) *OrganizationsNotificationConfigsGetCall {
  3984  	c.ctx_ = ctx
  3985  	return c
  3986  }
  3987  
  3988  // Header returns an http.Header that can be modified by the caller to
  3989  // add HTTP headers to the request.
  3990  func (c *OrganizationsNotificationConfigsGetCall) Header() http.Header {
  3991  	if c.header_ == nil {
  3992  		c.header_ = make(http.Header)
  3993  	}
  3994  	return c.header_
  3995  }
  3996  
  3997  func (c *OrganizationsNotificationConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  3998  	reqHeaders := make(http.Header)
  3999  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4000  	for k, v := range c.header_ {
  4001  		reqHeaders[k] = v
  4002  	}
  4003  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4004  	if c.ifNoneMatch_ != "" {
  4005  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4006  	}
  4007  	var body io.Reader = nil
  4008  	c.urlParams_.Set("alt", alt)
  4009  	c.urlParams_.Set("prettyPrint", "false")
  4010  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  4011  	urls += "?" + c.urlParams_.Encode()
  4012  	req, err := http.NewRequest("GET", urls, body)
  4013  	if err != nil {
  4014  		return nil, err
  4015  	}
  4016  	req.Header = reqHeaders
  4017  	googleapi.Expand(req.URL, map[string]string{
  4018  		"name": c.name,
  4019  	})
  4020  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4021  }
  4022  
  4023  // Do executes the "securitycenter.organizations.notificationConfigs.get" call.
  4024  // Exactly one of *NotificationConfig or error will be non-nil. Any
  4025  // non-2xx status code is an error. Response headers are in either
  4026  // *NotificationConfig.ServerResponse.Header or (if a response was
  4027  // returned at all) in error.(*googleapi.Error).Header. Use
  4028  // googleapi.IsNotModified to check whether the returned error was
  4029  // because http.StatusNotModified was returned.
  4030  func (c *OrganizationsNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) {
  4031  	gensupport.SetOptions(c.urlParams_, opts...)
  4032  	res, err := c.doRequest("json")
  4033  	if res != nil && res.StatusCode == http.StatusNotModified {
  4034  		if res.Body != nil {
  4035  			res.Body.Close()
  4036  		}
  4037  		return nil, &googleapi.Error{
  4038  			Code:   res.StatusCode,
  4039  			Header: res.Header,
  4040  		}
  4041  	}
  4042  	if err != nil {
  4043  		return nil, err
  4044  	}
  4045  	defer googleapi.CloseBody(res)
  4046  	if err := googleapi.CheckResponse(res); err != nil {
  4047  		return nil, err
  4048  	}
  4049  	ret := &NotificationConfig{
  4050  		ServerResponse: googleapi.ServerResponse{
  4051  			Header:         res.Header,
  4052  			HTTPStatusCode: res.StatusCode,
  4053  		},
  4054  	}
  4055  	target := &ret
  4056  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4057  		return nil, err
  4058  	}
  4059  	return ret, nil
  4060  	// {
  4061  	//   "description": "Gets a notification config.",
  4062  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}",
  4063  	//   "httpMethod": "GET",
  4064  	//   "id": "securitycenter.organizations.notificationConfigs.get",
  4065  	//   "parameterOrder": [
  4066  	//     "name"
  4067  	//   ],
  4068  	//   "parameters": {
  4069  	//     "name": {
  4070  	//       "description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\".",
  4071  	//       "location": "path",
  4072  	//       "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$",
  4073  	//       "required": true,
  4074  	//       "type": "string"
  4075  	//     }
  4076  	//   },
  4077  	//   "path": "v1p1beta1/{+name}",
  4078  	//   "response": {
  4079  	//     "$ref": "NotificationConfig"
  4080  	//   },
  4081  	//   "scopes": [
  4082  	//     "https://www.googleapis.com/auth/cloud-platform"
  4083  	//   ]
  4084  	// }
  4085  
  4086  }
  4087  
  4088  // method id "securitycenter.organizations.notificationConfigs.list":
  4089  
  4090  type OrganizationsNotificationConfigsListCall struct {
  4091  	s            *Service
  4092  	parent       string
  4093  	urlParams_   gensupport.URLParams
  4094  	ifNoneMatch_ string
  4095  	ctx_         context.Context
  4096  	header_      http.Header
  4097  }
  4098  
  4099  // List: Lists notification configs.
  4100  func (r *OrganizationsNotificationConfigsService) List(parent string) *OrganizationsNotificationConfigsListCall {
  4101  	c := &OrganizationsNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4102  	c.parent = parent
  4103  	return c
  4104  }
  4105  
  4106  // PageSize sets the optional parameter "pageSize": The maximum number
  4107  // of results to return in a single response. Default is 10, minimum is
  4108  // 1, maximum is 1000.
  4109  func (c *OrganizationsNotificationConfigsListCall) PageSize(pageSize int64) *OrganizationsNotificationConfigsListCall {
  4110  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4111  	return c
  4112  }
  4113  
  4114  // PageToken sets the optional parameter "pageToken": The value returned
  4115  // by the last `ListNotificationConfigsResponse`; indicates that this is
  4116  // a continuation of a prior `ListNotificationConfigs` call, and that
  4117  // the system should return the next page of data.
  4118  func (c *OrganizationsNotificationConfigsListCall) PageToken(pageToken string) *OrganizationsNotificationConfigsListCall {
  4119  	c.urlParams_.Set("pageToken", pageToken)
  4120  	return c
  4121  }
  4122  
  4123  // Fields allows partial responses to be retrieved. See
  4124  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4125  // for more information.
  4126  func (c *OrganizationsNotificationConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsListCall {
  4127  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4128  	return c
  4129  }
  4130  
  4131  // IfNoneMatch sets the optional parameter which makes the operation
  4132  // fail if the object's ETag matches the given value. This is useful for
  4133  // getting updates only after the object has changed since the last
  4134  // request. Use googleapi.IsNotModified to check whether the response
  4135  // error from Do is the result of In-None-Match.
  4136  func (c *OrganizationsNotificationConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsNotificationConfigsListCall {
  4137  	c.ifNoneMatch_ = entityTag
  4138  	return c
  4139  }
  4140  
  4141  // Context sets the context to be used in this call's Do method. Any
  4142  // pending HTTP request will be aborted if the provided context is
  4143  // canceled.
  4144  func (c *OrganizationsNotificationConfigsListCall) Context(ctx context.Context) *OrganizationsNotificationConfigsListCall {
  4145  	c.ctx_ = ctx
  4146  	return c
  4147  }
  4148  
  4149  // Header returns an http.Header that can be modified by the caller to
  4150  // add HTTP headers to the request.
  4151  func (c *OrganizationsNotificationConfigsListCall) Header() http.Header {
  4152  	if c.header_ == nil {
  4153  		c.header_ = make(http.Header)
  4154  	}
  4155  	return c.header_
  4156  }
  4157  
  4158  func (c *OrganizationsNotificationConfigsListCall) doRequest(alt string) (*http.Response, error) {
  4159  	reqHeaders := make(http.Header)
  4160  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4161  	for k, v := range c.header_ {
  4162  		reqHeaders[k] = v
  4163  	}
  4164  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4165  	if c.ifNoneMatch_ != "" {
  4166  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4167  	}
  4168  	var body io.Reader = nil
  4169  	c.urlParams_.Set("alt", alt)
  4170  	c.urlParams_.Set("prettyPrint", "false")
  4171  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/notificationConfigs")
  4172  	urls += "?" + c.urlParams_.Encode()
  4173  	req, err := http.NewRequest("GET", urls, body)
  4174  	if err != nil {
  4175  		return nil, err
  4176  	}
  4177  	req.Header = reqHeaders
  4178  	googleapi.Expand(req.URL, map[string]string{
  4179  		"parent": c.parent,
  4180  	})
  4181  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4182  }
  4183  
  4184  // Do executes the "securitycenter.organizations.notificationConfigs.list" call.
  4185  // Exactly one of *ListNotificationConfigsResponse or error will be
  4186  // non-nil. Any non-2xx status code is an error. Response headers are in
  4187  // either *ListNotificationConfigsResponse.ServerResponse.Header or (if
  4188  // a response was returned at all) in error.(*googleapi.Error).Header.
  4189  // Use googleapi.IsNotModified to check whether the returned error was
  4190  // because http.StatusNotModified was returned.
  4191  func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationConfigsResponse, error) {
  4192  	gensupport.SetOptions(c.urlParams_, opts...)
  4193  	res, err := c.doRequest("json")
  4194  	if res != nil && res.StatusCode == http.StatusNotModified {
  4195  		if res.Body != nil {
  4196  			res.Body.Close()
  4197  		}
  4198  		return nil, &googleapi.Error{
  4199  			Code:   res.StatusCode,
  4200  			Header: res.Header,
  4201  		}
  4202  	}
  4203  	if err != nil {
  4204  		return nil, err
  4205  	}
  4206  	defer googleapi.CloseBody(res)
  4207  	if err := googleapi.CheckResponse(res); err != nil {
  4208  		return nil, err
  4209  	}
  4210  	ret := &ListNotificationConfigsResponse{
  4211  		ServerResponse: googleapi.ServerResponse{
  4212  			Header:         res.Header,
  4213  			HTTPStatusCode: res.StatusCode,
  4214  		},
  4215  	}
  4216  	target := &ret
  4217  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4218  		return nil, err
  4219  	}
  4220  	return ret, nil
  4221  	// {
  4222  	//   "description": "Lists notification configs.",
  4223  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/notificationConfigs",
  4224  	//   "httpMethod": "GET",
  4225  	//   "id": "securitycenter.organizations.notificationConfigs.list",
  4226  	//   "parameterOrder": [
  4227  	//     "parent"
  4228  	//   ],
  4229  	//   "parameters": {
  4230  	//     "pageSize": {
  4231  	//       "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.",
  4232  	//       "format": "int32",
  4233  	//       "location": "query",
  4234  	//       "type": "integer"
  4235  	//     },
  4236  	//     "pageToken": {
  4237  	//       "description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.",
  4238  	//       "location": "query",
  4239  	//       "type": "string"
  4240  	//     },
  4241  	//     "parent": {
  4242  	//       "description": "Required. Name of the organization to list notification configs. Its format is \"organizations/[organization_id]\".",
  4243  	//       "location": "path",
  4244  	//       "pattern": "^organizations/[^/]+$",
  4245  	//       "required": true,
  4246  	//       "type": "string"
  4247  	//     }
  4248  	//   },
  4249  	//   "path": "v1p1beta1/{+parent}/notificationConfigs",
  4250  	//   "response": {
  4251  	//     "$ref": "ListNotificationConfigsResponse"
  4252  	//   },
  4253  	//   "scopes": [
  4254  	//     "https://www.googleapis.com/auth/cloud-platform"
  4255  	//   ]
  4256  	// }
  4257  
  4258  }
  4259  
  4260  // Pages invokes f for each page of results.
  4261  // A non-nil error returned from f will halt the iteration.
  4262  // The provided context supersedes any context provided to the Context method.
  4263  func (c *OrganizationsNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListNotificationConfigsResponse) error) error {
  4264  	c.ctx_ = ctx
  4265  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4266  	for {
  4267  		x, err := c.Do()
  4268  		if err != nil {
  4269  			return err
  4270  		}
  4271  		if err := f(x); err != nil {
  4272  			return err
  4273  		}
  4274  		if x.NextPageToken == "" {
  4275  			return nil
  4276  		}
  4277  		c.PageToken(x.NextPageToken)
  4278  	}
  4279  }
  4280  
  4281  // method id "securitycenter.organizations.notificationConfigs.patch":
  4282  
  4283  type OrganizationsNotificationConfigsPatchCall struct {
  4284  	s                  *Service
  4285  	name               string
  4286  	notificationconfig *NotificationConfig
  4287  	urlParams_         gensupport.URLParams
  4288  	ctx_               context.Context
  4289  	header_            http.Header
  4290  }
  4291  
  4292  // Patch: Updates a notification config. The following update fields are
  4293  // allowed: description, pubsub_topic, streaming_config.filter
  4294  func (r *OrganizationsNotificationConfigsService) Patch(name string, notificationconfig *NotificationConfig) *OrganizationsNotificationConfigsPatchCall {
  4295  	c := &OrganizationsNotificationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4296  	c.name = name
  4297  	c.notificationconfig = notificationconfig
  4298  	return c
  4299  }
  4300  
  4301  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  4302  // use when updating the notification config. If empty all mutable
  4303  // fields will be updated.
  4304  func (c *OrganizationsNotificationConfigsPatchCall) UpdateMask(updateMask string) *OrganizationsNotificationConfigsPatchCall {
  4305  	c.urlParams_.Set("updateMask", updateMask)
  4306  	return c
  4307  }
  4308  
  4309  // Fields allows partial responses to be retrieved. See
  4310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4311  // for more information.
  4312  func (c *OrganizationsNotificationConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsNotificationConfigsPatchCall {
  4313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4314  	return c
  4315  }
  4316  
  4317  // Context sets the context to be used in this call's Do method. Any
  4318  // pending HTTP request will be aborted if the provided context is
  4319  // canceled.
  4320  func (c *OrganizationsNotificationConfigsPatchCall) Context(ctx context.Context) *OrganizationsNotificationConfigsPatchCall {
  4321  	c.ctx_ = ctx
  4322  	return c
  4323  }
  4324  
  4325  // Header returns an http.Header that can be modified by the caller to
  4326  // add HTTP headers to the request.
  4327  func (c *OrganizationsNotificationConfigsPatchCall) Header() http.Header {
  4328  	if c.header_ == nil {
  4329  		c.header_ = make(http.Header)
  4330  	}
  4331  	return c.header_
  4332  }
  4333  
  4334  func (c *OrganizationsNotificationConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  4335  	reqHeaders := make(http.Header)
  4336  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4337  	for k, v := range c.header_ {
  4338  		reqHeaders[k] = v
  4339  	}
  4340  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4341  	var body io.Reader = nil
  4342  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationconfig)
  4343  	if err != nil {
  4344  		return nil, err
  4345  	}
  4346  	reqHeaders.Set("Content-Type", "application/json")
  4347  	c.urlParams_.Set("alt", alt)
  4348  	c.urlParams_.Set("prettyPrint", "false")
  4349  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  4350  	urls += "?" + c.urlParams_.Encode()
  4351  	req, err := http.NewRequest("PATCH", urls, body)
  4352  	if err != nil {
  4353  		return nil, err
  4354  	}
  4355  	req.Header = reqHeaders
  4356  	googleapi.Expand(req.URL, map[string]string{
  4357  		"name": c.name,
  4358  	})
  4359  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4360  }
  4361  
  4362  // Do executes the "securitycenter.organizations.notificationConfigs.patch" call.
  4363  // Exactly one of *NotificationConfig or error will be non-nil. Any
  4364  // non-2xx status code is an error. Response headers are in either
  4365  // *NotificationConfig.ServerResponse.Header or (if a response was
  4366  // returned at all) in error.(*googleapi.Error).Header. Use
  4367  // googleapi.IsNotModified to check whether the returned error was
  4368  // because http.StatusNotModified was returned.
  4369  func (c *OrganizationsNotificationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationConfig, error) {
  4370  	gensupport.SetOptions(c.urlParams_, opts...)
  4371  	res, err := c.doRequest("json")
  4372  	if res != nil && res.StatusCode == http.StatusNotModified {
  4373  		if res.Body != nil {
  4374  			res.Body.Close()
  4375  		}
  4376  		return nil, &googleapi.Error{
  4377  			Code:   res.StatusCode,
  4378  			Header: res.Header,
  4379  		}
  4380  	}
  4381  	if err != nil {
  4382  		return nil, err
  4383  	}
  4384  	defer googleapi.CloseBody(res)
  4385  	if err := googleapi.CheckResponse(res); err != nil {
  4386  		return nil, err
  4387  	}
  4388  	ret := &NotificationConfig{
  4389  		ServerResponse: googleapi.ServerResponse{
  4390  			Header:         res.Header,
  4391  			HTTPStatusCode: res.StatusCode,
  4392  		},
  4393  	}
  4394  	target := &ret
  4395  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4396  		return nil, err
  4397  	}
  4398  	return ret, nil
  4399  	// {
  4400  	//   "description": "Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter",
  4401  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}",
  4402  	//   "httpMethod": "PATCH",
  4403  	//   "id": "securitycenter.organizations.notificationConfigs.patch",
  4404  	//   "parameterOrder": [
  4405  	//     "name"
  4406  	//   ],
  4407  	//   "parameters": {
  4408  	//     "name": {
  4409  	//       "description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\".",
  4410  	//       "location": "path",
  4411  	//       "pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$",
  4412  	//       "required": true,
  4413  	//       "type": "string"
  4414  	//     },
  4415  	//     "updateMask": {
  4416  	//       "description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.",
  4417  	//       "format": "google-fieldmask",
  4418  	//       "location": "query",
  4419  	//       "type": "string"
  4420  	//     }
  4421  	//   },
  4422  	//   "path": "v1p1beta1/{+name}",
  4423  	//   "request": {
  4424  	//     "$ref": "NotificationConfig"
  4425  	//   },
  4426  	//   "response": {
  4427  	//     "$ref": "NotificationConfig"
  4428  	//   },
  4429  	//   "scopes": [
  4430  	//     "https://www.googleapis.com/auth/cloud-platform"
  4431  	//   ]
  4432  	// }
  4433  
  4434  }
  4435  
  4436  // method id "securitycenter.organizations.operations.cancel":
  4437  
  4438  type OrganizationsOperationsCancelCall struct {
  4439  	s          *Service
  4440  	name       string
  4441  	urlParams_ gensupport.URLParams
  4442  	ctx_       context.Context
  4443  	header_    http.Header
  4444  }
  4445  
  4446  // Cancel: Starts asynchronous cancellation on a long-running operation.
  4447  // The server makes a best effort to cancel the operation, but success
  4448  // is not guaranteed. If the server doesn't support this method, it
  4449  // returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
  4450  // Operations.GetOperation or other methods to check whether the
  4451  // cancellation succeeded or whether the operation completed despite
  4452  // cancellation. On successful cancellation, the operation is not
  4453  // deleted; instead, it becomes an operation with an Operation.error
  4454  // value with a google.rpc.Status.code of 1, corresponding to
  4455  // `Code.CANCELLED`.
  4456  func (r *OrganizationsOperationsService) Cancel(name string) *OrganizationsOperationsCancelCall {
  4457  	c := &OrganizationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4458  	c.name = name
  4459  	return c
  4460  }
  4461  
  4462  // Fields allows partial responses to be retrieved. See
  4463  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4464  // for more information.
  4465  func (c *OrganizationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsOperationsCancelCall {
  4466  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4467  	return c
  4468  }
  4469  
  4470  // Context sets the context to be used in this call's Do method. Any
  4471  // pending HTTP request will be aborted if the provided context is
  4472  // canceled.
  4473  func (c *OrganizationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsOperationsCancelCall {
  4474  	c.ctx_ = ctx
  4475  	return c
  4476  }
  4477  
  4478  // Header returns an http.Header that can be modified by the caller to
  4479  // add HTTP headers to the request.
  4480  func (c *OrganizationsOperationsCancelCall) Header() http.Header {
  4481  	if c.header_ == nil {
  4482  		c.header_ = make(http.Header)
  4483  	}
  4484  	return c.header_
  4485  }
  4486  
  4487  func (c *OrganizationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4488  	reqHeaders := make(http.Header)
  4489  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4490  	for k, v := range c.header_ {
  4491  		reqHeaders[k] = v
  4492  	}
  4493  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4494  	var body io.Reader = nil
  4495  	c.urlParams_.Set("alt", alt)
  4496  	c.urlParams_.Set("prettyPrint", "false")
  4497  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}:cancel")
  4498  	urls += "?" + c.urlParams_.Encode()
  4499  	req, err := http.NewRequest("POST", urls, body)
  4500  	if err != nil {
  4501  		return nil, err
  4502  	}
  4503  	req.Header = reqHeaders
  4504  	googleapi.Expand(req.URL, map[string]string{
  4505  		"name": c.name,
  4506  	})
  4507  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4508  }
  4509  
  4510  // Do executes the "securitycenter.organizations.operations.cancel" call.
  4511  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4512  // code is an error. Response headers are in either
  4513  // *Empty.ServerResponse.Header or (if a response was returned at all)
  4514  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4515  // check whether the returned error was because http.StatusNotModified
  4516  // was returned.
  4517  func (c *OrganizationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4518  	gensupport.SetOptions(c.urlParams_, opts...)
  4519  	res, err := c.doRequest("json")
  4520  	if res != nil && res.StatusCode == http.StatusNotModified {
  4521  		if res.Body != nil {
  4522  			res.Body.Close()
  4523  		}
  4524  		return nil, &googleapi.Error{
  4525  			Code:   res.StatusCode,
  4526  			Header: res.Header,
  4527  		}
  4528  	}
  4529  	if err != nil {
  4530  		return nil, err
  4531  	}
  4532  	defer googleapi.CloseBody(res)
  4533  	if err := googleapi.CheckResponse(res); err != nil {
  4534  		return nil, err
  4535  	}
  4536  	ret := &Empty{
  4537  		ServerResponse: googleapi.ServerResponse{
  4538  			Header:         res.Header,
  4539  			HTTPStatusCode: res.StatusCode,
  4540  		},
  4541  	}
  4542  	target := &ret
  4543  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4544  		return nil, err
  4545  	}
  4546  	return ret, nil
  4547  	// {
  4548  	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
  4549  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/operations/{operationsId}:cancel",
  4550  	//   "httpMethod": "POST",
  4551  	//   "id": "securitycenter.organizations.operations.cancel",
  4552  	//   "parameterOrder": [
  4553  	//     "name"
  4554  	//   ],
  4555  	//   "parameters": {
  4556  	//     "name": {
  4557  	//       "description": "The name of the operation resource to be cancelled.",
  4558  	//       "location": "path",
  4559  	//       "pattern": "^organizations/[^/]+/operations/[^/]+$",
  4560  	//       "required": true,
  4561  	//       "type": "string"
  4562  	//     }
  4563  	//   },
  4564  	//   "path": "v1p1beta1/{+name}:cancel",
  4565  	//   "response": {
  4566  	//     "$ref": "Empty"
  4567  	//   },
  4568  	//   "scopes": [
  4569  	//     "https://www.googleapis.com/auth/cloud-platform"
  4570  	//   ]
  4571  	// }
  4572  
  4573  }
  4574  
  4575  // method id "securitycenter.organizations.operations.delete":
  4576  
  4577  type OrganizationsOperationsDeleteCall struct {
  4578  	s          *Service
  4579  	name       string
  4580  	urlParams_ gensupport.URLParams
  4581  	ctx_       context.Context
  4582  	header_    http.Header
  4583  }
  4584  
  4585  // Delete: Deletes a long-running operation. This method indicates that
  4586  // the client is no longer interested in the operation result. It does
  4587  // not cancel the operation. If the server doesn't support this method,
  4588  // it returns `google.rpc.Code.UNIMPLEMENTED`.
  4589  func (r *OrganizationsOperationsService) Delete(name string) *OrganizationsOperationsDeleteCall {
  4590  	c := &OrganizationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4591  	c.name = name
  4592  	return c
  4593  }
  4594  
  4595  // Fields allows partial responses to be retrieved. See
  4596  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4597  // for more information.
  4598  func (c *OrganizationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsOperationsDeleteCall {
  4599  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4600  	return c
  4601  }
  4602  
  4603  // Context sets the context to be used in this call's Do method. Any
  4604  // pending HTTP request will be aborted if the provided context is
  4605  // canceled.
  4606  func (c *OrganizationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsOperationsDeleteCall {
  4607  	c.ctx_ = ctx
  4608  	return c
  4609  }
  4610  
  4611  // Header returns an http.Header that can be modified by the caller to
  4612  // add HTTP headers to the request.
  4613  func (c *OrganizationsOperationsDeleteCall) Header() http.Header {
  4614  	if c.header_ == nil {
  4615  		c.header_ = make(http.Header)
  4616  	}
  4617  	return c.header_
  4618  }
  4619  
  4620  func (c *OrganizationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4621  	reqHeaders := make(http.Header)
  4622  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4623  	for k, v := range c.header_ {
  4624  		reqHeaders[k] = v
  4625  	}
  4626  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4627  	var body io.Reader = nil
  4628  	c.urlParams_.Set("alt", alt)
  4629  	c.urlParams_.Set("prettyPrint", "false")
  4630  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  4631  	urls += "?" + c.urlParams_.Encode()
  4632  	req, err := http.NewRequest("DELETE", urls, body)
  4633  	if err != nil {
  4634  		return nil, err
  4635  	}
  4636  	req.Header = reqHeaders
  4637  	googleapi.Expand(req.URL, map[string]string{
  4638  		"name": c.name,
  4639  	})
  4640  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4641  }
  4642  
  4643  // Do executes the "securitycenter.organizations.operations.delete" call.
  4644  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4645  // code is an error. Response headers are in either
  4646  // *Empty.ServerResponse.Header or (if a response was returned at all)
  4647  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4648  // check whether the returned error was because http.StatusNotModified
  4649  // was returned.
  4650  func (c *OrganizationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4651  	gensupport.SetOptions(c.urlParams_, opts...)
  4652  	res, err := c.doRequest("json")
  4653  	if res != nil && res.StatusCode == http.StatusNotModified {
  4654  		if res.Body != nil {
  4655  			res.Body.Close()
  4656  		}
  4657  		return nil, &googleapi.Error{
  4658  			Code:   res.StatusCode,
  4659  			Header: res.Header,
  4660  		}
  4661  	}
  4662  	if err != nil {
  4663  		return nil, err
  4664  	}
  4665  	defer googleapi.CloseBody(res)
  4666  	if err := googleapi.CheckResponse(res); err != nil {
  4667  		return nil, err
  4668  	}
  4669  	ret := &Empty{
  4670  		ServerResponse: googleapi.ServerResponse{
  4671  			Header:         res.Header,
  4672  			HTTPStatusCode: res.StatusCode,
  4673  		},
  4674  	}
  4675  	target := &ret
  4676  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4677  		return nil, err
  4678  	}
  4679  	return ret, nil
  4680  	// {
  4681  	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
  4682  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/operations/{operationsId}",
  4683  	//   "httpMethod": "DELETE",
  4684  	//   "id": "securitycenter.organizations.operations.delete",
  4685  	//   "parameterOrder": [
  4686  	//     "name"
  4687  	//   ],
  4688  	//   "parameters": {
  4689  	//     "name": {
  4690  	//       "description": "The name of the operation resource to be deleted.",
  4691  	//       "location": "path",
  4692  	//       "pattern": "^organizations/[^/]+/operations/[^/]+$",
  4693  	//       "required": true,
  4694  	//       "type": "string"
  4695  	//     }
  4696  	//   },
  4697  	//   "path": "v1p1beta1/{+name}",
  4698  	//   "response": {
  4699  	//     "$ref": "Empty"
  4700  	//   },
  4701  	//   "scopes": [
  4702  	//     "https://www.googleapis.com/auth/cloud-platform"
  4703  	//   ]
  4704  	// }
  4705  
  4706  }
  4707  
  4708  // method id "securitycenter.organizations.operations.get":
  4709  
  4710  type OrganizationsOperationsGetCall struct {
  4711  	s            *Service
  4712  	name         string
  4713  	urlParams_   gensupport.URLParams
  4714  	ifNoneMatch_ string
  4715  	ctx_         context.Context
  4716  	header_      http.Header
  4717  }
  4718  
  4719  // Get: Gets the latest state of a long-running operation. Clients can
  4720  // use this method to poll the operation result at intervals as
  4721  // recommended by the API service.
  4722  func (r *OrganizationsOperationsService) Get(name string) *OrganizationsOperationsGetCall {
  4723  	c := &OrganizationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4724  	c.name = name
  4725  	return c
  4726  }
  4727  
  4728  // Fields allows partial responses to be retrieved. See
  4729  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4730  // for more information.
  4731  func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsOperationsGetCall {
  4732  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4733  	return c
  4734  }
  4735  
  4736  // IfNoneMatch sets the optional parameter which makes the operation
  4737  // fail if the object's ETag matches the given value. This is useful for
  4738  // getting updates only after the object has changed since the last
  4739  // request. Use googleapi.IsNotModified to check whether the response
  4740  // error from Do is the result of In-None-Match.
  4741  func (c *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsOperationsGetCall {
  4742  	c.ifNoneMatch_ = entityTag
  4743  	return c
  4744  }
  4745  
  4746  // Context sets the context to be used in this call's Do method. Any
  4747  // pending HTTP request will be aborted if the provided context is
  4748  // canceled.
  4749  func (c *OrganizationsOperationsGetCall) Context(ctx context.Context) *OrganizationsOperationsGetCall {
  4750  	c.ctx_ = ctx
  4751  	return c
  4752  }
  4753  
  4754  // Header returns an http.Header that can be modified by the caller to
  4755  // add HTTP headers to the request.
  4756  func (c *OrganizationsOperationsGetCall) Header() http.Header {
  4757  	if c.header_ == nil {
  4758  		c.header_ = make(http.Header)
  4759  	}
  4760  	return c.header_
  4761  }
  4762  
  4763  func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4764  	reqHeaders := make(http.Header)
  4765  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4766  	for k, v := range c.header_ {
  4767  		reqHeaders[k] = v
  4768  	}
  4769  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4770  	if c.ifNoneMatch_ != "" {
  4771  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4772  	}
  4773  	var body io.Reader = nil
  4774  	c.urlParams_.Set("alt", alt)
  4775  	c.urlParams_.Set("prettyPrint", "false")
  4776  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  4777  	urls += "?" + c.urlParams_.Encode()
  4778  	req, err := http.NewRequest("GET", urls, body)
  4779  	if err != nil {
  4780  		return nil, err
  4781  	}
  4782  	req.Header = reqHeaders
  4783  	googleapi.Expand(req.URL, map[string]string{
  4784  		"name": c.name,
  4785  	})
  4786  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4787  }
  4788  
  4789  // Do executes the "securitycenter.organizations.operations.get" call.
  4790  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4791  // status code is an error. Response headers are in either
  4792  // *Operation.ServerResponse.Header or (if a response was returned at
  4793  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4794  // to check whether the returned error was because
  4795  // http.StatusNotModified was returned.
  4796  func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4797  	gensupport.SetOptions(c.urlParams_, opts...)
  4798  	res, err := c.doRequest("json")
  4799  	if res != nil && res.StatusCode == http.StatusNotModified {
  4800  		if res.Body != nil {
  4801  			res.Body.Close()
  4802  		}
  4803  		return nil, &googleapi.Error{
  4804  			Code:   res.StatusCode,
  4805  			Header: res.Header,
  4806  		}
  4807  	}
  4808  	if err != nil {
  4809  		return nil, err
  4810  	}
  4811  	defer googleapi.CloseBody(res)
  4812  	if err := googleapi.CheckResponse(res); err != nil {
  4813  		return nil, err
  4814  	}
  4815  	ret := &Operation{
  4816  		ServerResponse: googleapi.ServerResponse{
  4817  			Header:         res.Header,
  4818  			HTTPStatusCode: res.StatusCode,
  4819  		},
  4820  	}
  4821  	target := &ret
  4822  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4823  		return nil, err
  4824  	}
  4825  	return ret, nil
  4826  	// {
  4827  	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
  4828  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/operations/{operationsId}",
  4829  	//   "httpMethod": "GET",
  4830  	//   "id": "securitycenter.organizations.operations.get",
  4831  	//   "parameterOrder": [
  4832  	//     "name"
  4833  	//   ],
  4834  	//   "parameters": {
  4835  	//     "name": {
  4836  	//       "description": "The name of the operation resource.",
  4837  	//       "location": "path",
  4838  	//       "pattern": "^organizations/[^/]+/operations/[^/]+$",
  4839  	//       "required": true,
  4840  	//       "type": "string"
  4841  	//     }
  4842  	//   },
  4843  	//   "path": "v1p1beta1/{+name}",
  4844  	//   "response": {
  4845  	//     "$ref": "Operation"
  4846  	//   },
  4847  	//   "scopes": [
  4848  	//     "https://www.googleapis.com/auth/cloud-platform"
  4849  	//   ]
  4850  	// }
  4851  
  4852  }
  4853  
  4854  // method id "securitycenter.organizations.operations.list":
  4855  
  4856  type OrganizationsOperationsListCall struct {
  4857  	s            *Service
  4858  	name         string
  4859  	urlParams_   gensupport.URLParams
  4860  	ifNoneMatch_ string
  4861  	ctx_         context.Context
  4862  	header_      http.Header
  4863  }
  4864  
  4865  // List: Lists operations that match the specified filter in the
  4866  // request. If the server doesn't support this method, it returns
  4867  // `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
  4868  // override the binding to use different resource name schemes, such as
  4869  // `users/*/operations`. To override the binding, API services can add a
  4870  // binding such as "/v1/{name=users/*}/operations" to their service
  4871  // configuration. For backwards compatibility, the default name includes
  4872  // the operations collection id, however overriding users must ensure
  4873  // the name binding is the parent resource, without the operations
  4874  // collection id.
  4875  func (r *OrganizationsOperationsService) List(name string) *OrganizationsOperationsListCall {
  4876  	c := &OrganizationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4877  	c.name = name
  4878  	return c
  4879  }
  4880  
  4881  // Filter sets the optional parameter "filter": The standard list
  4882  // filter.
  4883  func (c *OrganizationsOperationsListCall) Filter(filter string) *OrganizationsOperationsListCall {
  4884  	c.urlParams_.Set("filter", filter)
  4885  	return c
  4886  }
  4887  
  4888  // PageSize sets the optional parameter "pageSize": The standard list
  4889  // page size.
  4890  func (c *OrganizationsOperationsListCall) PageSize(pageSize int64) *OrganizationsOperationsListCall {
  4891  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4892  	return c
  4893  }
  4894  
  4895  // PageToken sets the optional parameter "pageToken": The standard list
  4896  // page token.
  4897  func (c *OrganizationsOperationsListCall) PageToken(pageToken string) *OrganizationsOperationsListCall {
  4898  	c.urlParams_.Set("pageToken", pageToken)
  4899  	return c
  4900  }
  4901  
  4902  // Fields allows partial responses to be retrieved. See
  4903  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4904  // for more information.
  4905  func (c *OrganizationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsOperationsListCall {
  4906  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4907  	return c
  4908  }
  4909  
  4910  // IfNoneMatch sets the optional parameter which makes the operation
  4911  // fail if the object's ETag matches the given value. This is useful for
  4912  // getting updates only after the object has changed since the last
  4913  // request. Use googleapi.IsNotModified to check whether the response
  4914  // error from Do is the result of In-None-Match.
  4915  func (c *OrganizationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsOperationsListCall {
  4916  	c.ifNoneMatch_ = entityTag
  4917  	return c
  4918  }
  4919  
  4920  // Context sets the context to be used in this call's Do method. Any
  4921  // pending HTTP request will be aborted if the provided context is
  4922  // canceled.
  4923  func (c *OrganizationsOperationsListCall) Context(ctx context.Context) *OrganizationsOperationsListCall {
  4924  	c.ctx_ = ctx
  4925  	return c
  4926  }
  4927  
  4928  // Header returns an http.Header that can be modified by the caller to
  4929  // add HTTP headers to the request.
  4930  func (c *OrganizationsOperationsListCall) Header() http.Header {
  4931  	if c.header_ == nil {
  4932  		c.header_ = make(http.Header)
  4933  	}
  4934  	return c.header_
  4935  }
  4936  
  4937  func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4938  	reqHeaders := make(http.Header)
  4939  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  4940  	for k, v := range c.header_ {
  4941  		reqHeaders[k] = v
  4942  	}
  4943  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4944  	if c.ifNoneMatch_ != "" {
  4945  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4946  	}
  4947  	var body io.Reader = nil
  4948  	c.urlParams_.Set("alt", alt)
  4949  	c.urlParams_.Set("prettyPrint", "false")
  4950  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  4951  	urls += "?" + c.urlParams_.Encode()
  4952  	req, err := http.NewRequest("GET", urls, body)
  4953  	if err != nil {
  4954  		return nil, err
  4955  	}
  4956  	req.Header = reqHeaders
  4957  	googleapi.Expand(req.URL, map[string]string{
  4958  		"name": c.name,
  4959  	})
  4960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4961  }
  4962  
  4963  // Do executes the "securitycenter.organizations.operations.list" call.
  4964  // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  4965  // non-2xx status code is an error. Response headers are in either
  4966  // *ListOperationsResponse.ServerResponse.Header or (if a response was
  4967  // returned at all) in error.(*googleapi.Error).Header. Use
  4968  // googleapi.IsNotModified to check whether the returned error was
  4969  // because http.StatusNotModified was returned.
  4970  func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  4971  	gensupport.SetOptions(c.urlParams_, opts...)
  4972  	res, err := c.doRequest("json")
  4973  	if res != nil && res.StatusCode == http.StatusNotModified {
  4974  		if res.Body != nil {
  4975  			res.Body.Close()
  4976  		}
  4977  		return nil, &googleapi.Error{
  4978  			Code:   res.StatusCode,
  4979  			Header: res.Header,
  4980  		}
  4981  	}
  4982  	if err != nil {
  4983  		return nil, err
  4984  	}
  4985  	defer googleapi.CloseBody(res)
  4986  	if err := googleapi.CheckResponse(res); err != nil {
  4987  		return nil, err
  4988  	}
  4989  	ret := &ListOperationsResponse{
  4990  		ServerResponse: googleapi.ServerResponse{
  4991  			Header:         res.Header,
  4992  			HTTPStatusCode: res.StatusCode,
  4993  		},
  4994  	}
  4995  	target := &ret
  4996  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4997  		return nil, err
  4998  	}
  4999  	return ret, nil
  5000  	// {
  5001  	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
  5002  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/operations",
  5003  	//   "httpMethod": "GET",
  5004  	//   "id": "securitycenter.organizations.operations.list",
  5005  	//   "parameterOrder": [
  5006  	//     "name"
  5007  	//   ],
  5008  	//   "parameters": {
  5009  	//     "filter": {
  5010  	//       "description": "The standard list filter.",
  5011  	//       "location": "query",
  5012  	//       "type": "string"
  5013  	//     },
  5014  	//     "name": {
  5015  	//       "description": "The name of the operation's parent resource.",
  5016  	//       "location": "path",
  5017  	//       "pattern": "^organizations/[^/]+/operations$",
  5018  	//       "required": true,
  5019  	//       "type": "string"
  5020  	//     },
  5021  	//     "pageSize": {
  5022  	//       "description": "The standard list page size.",
  5023  	//       "format": "int32",
  5024  	//       "location": "query",
  5025  	//       "type": "integer"
  5026  	//     },
  5027  	//     "pageToken": {
  5028  	//       "description": "The standard list page token.",
  5029  	//       "location": "query",
  5030  	//       "type": "string"
  5031  	//     }
  5032  	//   },
  5033  	//   "path": "v1p1beta1/{+name}",
  5034  	//   "response": {
  5035  	//     "$ref": "ListOperationsResponse"
  5036  	//   },
  5037  	//   "scopes": [
  5038  	//     "https://www.googleapis.com/auth/cloud-platform"
  5039  	//   ]
  5040  	// }
  5041  
  5042  }
  5043  
  5044  // Pages invokes f for each page of results.
  5045  // A non-nil error returned from f will halt the iteration.
  5046  // The provided context supersedes any context provided to the Context method.
  5047  func (c *OrganizationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5048  	c.ctx_ = ctx
  5049  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5050  	for {
  5051  		x, err := c.Do()
  5052  		if err != nil {
  5053  			return err
  5054  		}
  5055  		if err := f(x); err != nil {
  5056  			return err
  5057  		}
  5058  		if x.NextPageToken == "" {
  5059  			return nil
  5060  		}
  5061  		c.PageToken(x.NextPageToken)
  5062  	}
  5063  }
  5064  
  5065  // method id "securitycenter.organizations.sources.create":
  5066  
  5067  type OrganizationsSourcesCreateCall struct {
  5068  	s          *Service
  5069  	parent     string
  5070  	source     *Source
  5071  	urlParams_ gensupport.URLParams
  5072  	ctx_       context.Context
  5073  	header_    http.Header
  5074  }
  5075  
  5076  // Create: Creates a source.
  5077  func (r *OrganizationsSourcesService) Create(parent string, source *Source) *OrganizationsSourcesCreateCall {
  5078  	c := &OrganizationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5079  	c.parent = parent
  5080  	c.source = source
  5081  	return c
  5082  }
  5083  
  5084  // Fields allows partial responses to be retrieved. See
  5085  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5086  // for more information.
  5087  func (c *OrganizationsSourcesCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesCreateCall {
  5088  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5089  	return c
  5090  }
  5091  
  5092  // Context sets the context to be used in this call's Do method. Any
  5093  // pending HTTP request will be aborted if the provided context is
  5094  // canceled.
  5095  func (c *OrganizationsSourcesCreateCall) Context(ctx context.Context) *OrganizationsSourcesCreateCall {
  5096  	c.ctx_ = ctx
  5097  	return c
  5098  }
  5099  
  5100  // Header returns an http.Header that can be modified by the caller to
  5101  // add HTTP headers to the request.
  5102  func (c *OrganizationsSourcesCreateCall) Header() http.Header {
  5103  	if c.header_ == nil {
  5104  		c.header_ = make(http.Header)
  5105  	}
  5106  	return c.header_
  5107  }
  5108  
  5109  func (c *OrganizationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
  5110  	reqHeaders := make(http.Header)
  5111  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5112  	for k, v := range c.header_ {
  5113  		reqHeaders[k] = v
  5114  	}
  5115  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5116  	var body io.Reader = nil
  5117  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
  5118  	if err != nil {
  5119  		return nil, err
  5120  	}
  5121  	reqHeaders.Set("Content-Type", "application/json")
  5122  	c.urlParams_.Set("alt", alt)
  5123  	c.urlParams_.Set("prettyPrint", "false")
  5124  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/sources")
  5125  	urls += "?" + c.urlParams_.Encode()
  5126  	req, err := http.NewRequest("POST", urls, body)
  5127  	if err != nil {
  5128  		return nil, err
  5129  	}
  5130  	req.Header = reqHeaders
  5131  	googleapi.Expand(req.URL, map[string]string{
  5132  		"parent": c.parent,
  5133  	})
  5134  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5135  }
  5136  
  5137  // Do executes the "securitycenter.organizations.sources.create" call.
  5138  // Exactly one of *Source or error will be non-nil. Any non-2xx status
  5139  // code is an error. Response headers are in either
  5140  // *Source.ServerResponse.Header or (if a response was returned at all)
  5141  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5142  // check whether the returned error was because http.StatusNotModified
  5143  // was returned.
  5144  func (c *OrganizationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Source, error) {
  5145  	gensupport.SetOptions(c.urlParams_, opts...)
  5146  	res, err := c.doRequest("json")
  5147  	if res != nil && res.StatusCode == http.StatusNotModified {
  5148  		if res.Body != nil {
  5149  			res.Body.Close()
  5150  		}
  5151  		return nil, &googleapi.Error{
  5152  			Code:   res.StatusCode,
  5153  			Header: res.Header,
  5154  		}
  5155  	}
  5156  	if err != nil {
  5157  		return nil, err
  5158  	}
  5159  	defer googleapi.CloseBody(res)
  5160  	if err := googleapi.CheckResponse(res); err != nil {
  5161  		return nil, err
  5162  	}
  5163  	ret := &Source{
  5164  		ServerResponse: googleapi.ServerResponse{
  5165  			Header:         res.Header,
  5166  			HTTPStatusCode: res.StatusCode,
  5167  		},
  5168  	}
  5169  	target := &ret
  5170  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5171  		return nil, err
  5172  	}
  5173  	return ret, nil
  5174  	// {
  5175  	//   "description": "Creates a source.",
  5176  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources",
  5177  	//   "httpMethod": "POST",
  5178  	//   "id": "securitycenter.organizations.sources.create",
  5179  	//   "parameterOrder": [
  5180  	//     "parent"
  5181  	//   ],
  5182  	//   "parameters": {
  5183  	//     "parent": {
  5184  	//       "description": "Required. Resource name of the new source's parent. Its format should be \"organizations/[organization_id]\".",
  5185  	//       "location": "path",
  5186  	//       "pattern": "^organizations/[^/]+$",
  5187  	//       "required": true,
  5188  	//       "type": "string"
  5189  	//     }
  5190  	//   },
  5191  	//   "path": "v1p1beta1/{+parent}/sources",
  5192  	//   "request": {
  5193  	//     "$ref": "Source"
  5194  	//   },
  5195  	//   "response": {
  5196  	//     "$ref": "Source"
  5197  	//   },
  5198  	//   "scopes": [
  5199  	//     "https://www.googleapis.com/auth/cloud-platform"
  5200  	//   ]
  5201  	// }
  5202  
  5203  }
  5204  
  5205  // method id "securitycenter.organizations.sources.get":
  5206  
  5207  type OrganizationsSourcesGetCall struct {
  5208  	s            *Service
  5209  	name         string
  5210  	urlParams_   gensupport.URLParams
  5211  	ifNoneMatch_ string
  5212  	ctx_         context.Context
  5213  	header_      http.Header
  5214  }
  5215  
  5216  // Get: Gets a source.
  5217  func (r *OrganizationsSourcesService) Get(name string) *OrganizationsSourcesGetCall {
  5218  	c := &OrganizationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5219  	c.name = name
  5220  	return c
  5221  }
  5222  
  5223  // Fields allows partial responses to be retrieved. See
  5224  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5225  // for more information.
  5226  func (c *OrganizationsSourcesGetCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetCall {
  5227  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5228  	return c
  5229  }
  5230  
  5231  // IfNoneMatch sets the optional parameter which makes the operation
  5232  // fail if the object's ETag matches the given value. This is useful for
  5233  // getting updates only after the object has changed since the last
  5234  // request. Use googleapi.IsNotModified to check whether the response
  5235  // error from Do is the result of In-None-Match.
  5236  func (c *OrganizationsSourcesGetCall) IfNoneMatch(entityTag string) *OrganizationsSourcesGetCall {
  5237  	c.ifNoneMatch_ = entityTag
  5238  	return c
  5239  }
  5240  
  5241  // Context sets the context to be used in this call's Do method. Any
  5242  // pending HTTP request will be aborted if the provided context is
  5243  // canceled.
  5244  func (c *OrganizationsSourcesGetCall) Context(ctx context.Context) *OrganizationsSourcesGetCall {
  5245  	c.ctx_ = ctx
  5246  	return c
  5247  }
  5248  
  5249  // Header returns an http.Header that can be modified by the caller to
  5250  // add HTTP headers to the request.
  5251  func (c *OrganizationsSourcesGetCall) Header() http.Header {
  5252  	if c.header_ == nil {
  5253  		c.header_ = make(http.Header)
  5254  	}
  5255  	return c.header_
  5256  }
  5257  
  5258  func (c *OrganizationsSourcesGetCall) doRequest(alt string) (*http.Response, error) {
  5259  	reqHeaders := make(http.Header)
  5260  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5261  	for k, v := range c.header_ {
  5262  		reqHeaders[k] = v
  5263  	}
  5264  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5265  	if c.ifNoneMatch_ != "" {
  5266  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5267  	}
  5268  	var body io.Reader = nil
  5269  	c.urlParams_.Set("alt", alt)
  5270  	c.urlParams_.Set("prettyPrint", "false")
  5271  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  5272  	urls += "?" + c.urlParams_.Encode()
  5273  	req, err := http.NewRequest("GET", urls, body)
  5274  	if err != nil {
  5275  		return nil, err
  5276  	}
  5277  	req.Header = reqHeaders
  5278  	googleapi.Expand(req.URL, map[string]string{
  5279  		"name": c.name,
  5280  	})
  5281  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5282  }
  5283  
  5284  // Do executes the "securitycenter.organizations.sources.get" call.
  5285  // Exactly one of *Source or error will be non-nil. Any non-2xx status
  5286  // code is an error. Response headers are in either
  5287  // *Source.ServerResponse.Header or (if a response was returned at all)
  5288  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5289  // check whether the returned error was because http.StatusNotModified
  5290  // was returned.
  5291  func (c *OrganizationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) {
  5292  	gensupport.SetOptions(c.urlParams_, opts...)
  5293  	res, err := c.doRequest("json")
  5294  	if res != nil && res.StatusCode == http.StatusNotModified {
  5295  		if res.Body != nil {
  5296  			res.Body.Close()
  5297  		}
  5298  		return nil, &googleapi.Error{
  5299  			Code:   res.StatusCode,
  5300  			Header: res.Header,
  5301  		}
  5302  	}
  5303  	if err != nil {
  5304  		return nil, err
  5305  	}
  5306  	defer googleapi.CloseBody(res)
  5307  	if err := googleapi.CheckResponse(res); err != nil {
  5308  		return nil, err
  5309  	}
  5310  	ret := &Source{
  5311  		ServerResponse: googleapi.ServerResponse{
  5312  			Header:         res.Header,
  5313  			HTTPStatusCode: res.StatusCode,
  5314  		},
  5315  	}
  5316  	target := &ret
  5317  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5318  		return nil, err
  5319  	}
  5320  	return ret, nil
  5321  	// {
  5322  	//   "description": "Gets a source.",
  5323  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}",
  5324  	//   "httpMethod": "GET",
  5325  	//   "id": "securitycenter.organizations.sources.get",
  5326  	//   "parameterOrder": [
  5327  	//     "name"
  5328  	//   ],
  5329  	//   "parameters": {
  5330  	//     "name": {
  5331  	//       "description": "Required. Relative resource name of the source. Its format is \"organizations/[organization_id]/source/[source_id]\".",
  5332  	//       "location": "path",
  5333  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  5334  	//       "required": true,
  5335  	//       "type": "string"
  5336  	//     }
  5337  	//   },
  5338  	//   "path": "v1p1beta1/{+name}",
  5339  	//   "response": {
  5340  	//     "$ref": "Source"
  5341  	//   },
  5342  	//   "scopes": [
  5343  	//     "https://www.googleapis.com/auth/cloud-platform"
  5344  	//   ]
  5345  	// }
  5346  
  5347  }
  5348  
  5349  // method id "securitycenter.organizations.sources.getIamPolicy":
  5350  
  5351  type OrganizationsSourcesGetIamPolicyCall struct {
  5352  	s                   *Service
  5353  	resource            string
  5354  	getiampolicyrequest *GetIamPolicyRequest
  5355  	urlParams_          gensupport.URLParams
  5356  	ctx_                context.Context
  5357  	header_             http.Header
  5358  }
  5359  
  5360  // GetIamPolicy: Gets the access control policy on the specified Source.
  5361  func (r *OrganizationsSourcesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsSourcesGetIamPolicyCall {
  5362  	c := &OrganizationsSourcesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5363  	c.resource = resource
  5364  	c.getiampolicyrequest = getiampolicyrequest
  5365  	return c
  5366  }
  5367  
  5368  // Fields allows partial responses to be retrieved. See
  5369  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5370  // for more information.
  5371  func (c *OrganizationsSourcesGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesGetIamPolicyCall {
  5372  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5373  	return c
  5374  }
  5375  
  5376  // Context sets the context to be used in this call's Do method. Any
  5377  // pending HTTP request will be aborted if the provided context is
  5378  // canceled.
  5379  func (c *OrganizationsSourcesGetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesGetIamPolicyCall {
  5380  	c.ctx_ = ctx
  5381  	return c
  5382  }
  5383  
  5384  // Header returns an http.Header that can be modified by the caller to
  5385  // add HTTP headers to the request.
  5386  func (c *OrganizationsSourcesGetIamPolicyCall) Header() http.Header {
  5387  	if c.header_ == nil {
  5388  		c.header_ = make(http.Header)
  5389  	}
  5390  	return c.header_
  5391  }
  5392  
  5393  func (c *OrganizationsSourcesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5394  	reqHeaders := make(http.Header)
  5395  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5396  	for k, v := range c.header_ {
  5397  		reqHeaders[k] = v
  5398  	}
  5399  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5400  	var body io.Reader = nil
  5401  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  5402  	if err != nil {
  5403  		return nil, err
  5404  	}
  5405  	reqHeaders.Set("Content-Type", "application/json")
  5406  	c.urlParams_.Set("alt", alt)
  5407  	c.urlParams_.Set("prettyPrint", "false")
  5408  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+resource}:getIamPolicy")
  5409  	urls += "?" + c.urlParams_.Encode()
  5410  	req, err := http.NewRequest("POST", urls, body)
  5411  	if err != nil {
  5412  		return nil, err
  5413  	}
  5414  	req.Header = reqHeaders
  5415  	googleapi.Expand(req.URL, map[string]string{
  5416  		"resource": c.resource,
  5417  	})
  5418  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5419  }
  5420  
  5421  // Do executes the "securitycenter.organizations.sources.getIamPolicy" call.
  5422  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5423  // code is an error. Response headers are in either
  5424  // *Policy.ServerResponse.Header or (if a response was returned at all)
  5425  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5426  // check whether the returned error was because http.StatusNotModified
  5427  // was returned.
  5428  func (c *OrganizationsSourcesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5429  	gensupport.SetOptions(c.urlParams_, opts...)
  5430  	res, err := c.doRequest("json")
  5431  	if res != nil && res.StatusCode == http.StatusNotModified {
  5432  		if res.Body != nil {
  5433  			res.Body.Close()
  5434  		}
  5435  		return nil, &googleapi.Error{
  5436  			Code:   res.StatusCode,
  5437  			Header: res.Header,
  5438  		}
  5439  	}
  5440  	if err != nil {
  5441  		return nil, err
  5442  	}
  5443  	defer googleapi.CloseBody(res)
  5444  	if err := googleapi.CheckResponse(res); err != nil {
  5445  		return nil, err
  5446  	}
  5447  	ret := &Policy{
  5448  		ServerResponse: googleapi.ServerResponse{
  5449  			Header:         res.Header,
  5450  			HTTPStatusCode: res.StatusCode,
  5451  		},
  5452  	}
  5453  	target := &ret
  5454  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5455  		return nil, err
  5456  	}
  5457  	return ret, nil
  5458  	// {
  5459  	//   "description": "Gets the access control policy on the specified Source.",
  5460  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}:getIamPolicy",
  5461  	//   "httpMethod": "POST",
  5462  	//   "id": "securitycenter.organizations.sources.getIamPolicy",
  5463  	//   "parameterOrder": [
  5464  	//     "resource"
  5465  	//   ],
  5466  	//   "parameters": {
  5467  	//     "resource": {
  5468  	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
  5469  	//       "location": "path",
  5470  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  5471  	//       "required": true,
  5472  	//       "type": "string"
  5473  	//     }
  5474  	//   },
  5475  	//   "path": "v1p1beta1/{+resource}:getIamPolicy",
  5476  	//   "request": {
  5477  	//     "$ref": "GetIamPolicyRequest"
  5478  	//   },
  5479  	//   "response": {
  5480  	//     "$ref": "Policy"
  5481  	//   },
  5482  	//   "scopes": [
  5483  	//     "https://www.googleapis.com/auth/cloud-platform"
  5484  	//   ]
  5485  	// }
  5486  
  5487  }
  5488  
  5489  // method id "securitycenter.organizations.sources.list":
  5490  
  5491  type OrganizationsSourcesListCall struct {
  5492  	s            *Service
  5493  	parent       string
  5494  	urlParams_   gensupport.URLParams
  5495  	ifNoneMatch_ string
  5496  	ctx_         context.Context
  5497  	header_      http.Header
  5498  }
  5499  
  5500  // List: Lists all sources belonging to an organization.
  5501  func (r *OrganizationsSourcesService) List(parent string) *OrganizationsSourcesListCall {
  5502  	c := &OrganizationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5503  	c.parent = parent
  5504  	return c
  5505  }
  5506  
  5507  // PageSize sets the optional parameter "pageSize": The maximum number
  5508  // of results to return in a single response. Default is 10, minimum is
  5509  // 1, maximum is 1000.
  5510  func (c *OrganizationsSourcesListCall) PageSize(pageSize int64) *OrganizationsSourcesListCall {
  5511  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5512  	return c
  5513  }
  5514  
  5515  // PageToken sets the optional parameter "pageToken": The value returned
  5516  // by the last `ListSourcesResponse`; indicates that this is a
  5517  // continuation of a prior `ListSources` call, and that the system
  5518  // should return the next page of data.
  5519  func (c *OrganizationsSourcesListCall) PageToken(pageToken string) *OrganizationsSourcesListCall {
  5520  	c.urlParams_.Set("pageToken", pageToken)
  5521  	return c
  5522  }
  5523  
  5524  // Fields allows partial responses to be retrieved. See
  5525  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5526  // for more information.
  5527  func (c *OrganizationsSourcesListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesListCall {
  5528  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5529  	return c
  5530  }
  5531  
  5532  // IfNoneMatch sets the optional parameter which makes the operation
  5533  // fail if the object's ETag matches the given value. This is useful for
  5534  // getting updates only after the object has changed since the last
  5535  // request. Use googleapi.IsNotModified to check whether the response
  5536  // error from Do is the result of In-None-Match.
  5537  func (c *OrganizationsSourcesListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesListCall {
  5538  	c.ifNoneMatch_ = entityTag
  5539  	return c
  5540  }
  5541  
  5542  // Context sets the context to be used in this call's Do method. Any
  5543  // pending HTTP request will be aborted if the provided context is
  5544  // canceled.
  5545  func (c *OrganizationsSourcesListCall) Context(ctx context.Context) *OrganizationsSourcesListCall {
  5546  	c.ctx_ = ctx
  5547  	return c
  5548  }
  5549  
  5550  // Header returns an http.Header that can be modified by the caller to
  5551  // add HTTP headers to the request.
  5552  func (c *OrganizationsSourcesListCall) Header() http.Header {
  5553  	if c.header_ == nil {
  5554  		c.header_ = make(http.Header)
  5555  	}
  5556  	return c.header_
  5557  }
  5558  
  5559  func (c *OrganizationsSourcesListCall) doRequest(alt string) (*http.Response, error) {
  5560  	reqHeaders := make(http.Header)
  5561  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5562  	for k, v := range c.header_ {
  5563  		reqHeaders[k] = v
  5564  	}
  5565  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5566  	if c.ifNoneMatch_ != "" {
  5567  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5568  	}
  5569  	var body io.Reader = nil
  5570  	c.urlParams_.Set("alt", alt)
  5571  	c.urlParams_.Set("prettyPrint", "false")
  5572  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/sources")
  5573  	urls += "?" + c.urlParams_.Encode()
  5574  	req, err := http.NewRequest("GET", urls, body)
  5575  	if err != nil {
  5576  		return nil, err
  5577  	}
  5578  	req.Header = reqHeaders
  5579  	googleapi.Expand(req.URL, map[string]string{
  5580  		"parent": c.parent,
  5581  	})
  5582  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5583  }
  5584  
  5585  // Do executes the "securitycenter.organizations.sources.list" call.
  5586  // Exactly one of *ListSourcesResponse or error will be non-nil. Any
  5587  // non-2xx status code is an error. Response headers are in either
  5588  // *ListSourcesResponse.ServerResponse.Header or (if a response was
  5589  // returned at all) in error.(*googleapi.Error).Header. Use
  5590  // googleapi.IsNotModified to check whether the returned error was
  5591  // because http.StatusNotModified was returned.
  5592  func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) {
  5593  	gensupport.SetOptions(c.urlParams_, opts...)
  5594  	res, err := c.doRequest("json")
  5595  	if res != nil && res.StatusCode == http.StatusNotModified {
  5596  		if res.Body != nil {
  5597  			res.Body.Close()
  5598  		}
  5599  		return nil, &googleapi.Error{
  5600  			Code:   res.StatusCode,
  5601  			Header: res.Header,
  5602  		}
  5603  	}
  5604  	if err != nil {
  5605  		return nil, err
  5606  	}
  5607  	defer googleapi.CloseBody(res)
  5608  	if err := googleapi.CheckResponse(res); err != nil {
  5609  		return nil, err
  5610  	}
  5611  	ret := &ListSourcesResponse{
  5612  		ServerResponse: googleapi.ServerResponse{
  5613  			Header:         res.Header,
  5614  			HTTPStatusCode: res.StatusCode,
  5615  		},
  5616  	}
  5617  	target := &ret
  5618  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5619  		return nil, err
  5620  	}
  5621  	return ret, nil
  5622  	// {
  5623  	//   "description": "Lists all sources belonging to an organization.",
  5624  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources",
  5625  	//   "httpMethod": "GET",
  5626  	//   "id": "securitycenter.organizations.sources.list",
  5627  	//   "parameterOrder": [
  5628  	//     "parent"
  5629  	//   ],
  5630  	//   "parameters": {
  5631  	//     "pageSize": {
  5632  	//       "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.",
  5633  	//       "format": "int32",
  5634  	//       "location": "query",
  5635  	//       "type": "integer"
  5636  	//     },
  5637  	//     "pageToken": {
  5638  	//       "description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.",
  5639  	//       "location": "query",
  5640  	//       "type": "string"
  5641  	//     },
  5642  	//     "parent": {
  5643  	//       "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\".",
  5644  	//       "location": "path",
  5645  	//       "pattern": "^organizations/[^/]+$",
  5646  	//       "required": true,
  5647  	//       "type": "string"
  5648  	//     }
  5649  	//   },
  5650  	//   "path": "v1p1beta1/{+parent}/sources",
  5651  	//   "response": {
  5652  	//     "$ref": "ListSourcesResponse"
  5653  	//   },
  5654  	//   "scopes": [
  5655  	//     "https://www.googleapis.com/auth/cloud-platform"
  5656  	//   ]
  5657  	// }
  5658  
  5659  }
  5660  
  5661  // Pages invokes f for each page of results.
  5662  // A non-nil error returned from f will halt the iteration.
  5663  // The provided context supersedes any context provided to the Context method.
  5664  func (c *OrganizationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error {
  5665  	c.ctx_ = ctx
  5666  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5667  	for {
  5668  		x, err := c.Do()
  5669  		if err != nil {
  5670  			return err
  5671  		}
  5672  		if err := f(x); err != nil {
  5673  			return err
  5674  		}
  5675  		if x.NextPageToken == "" {
  5676  			return nil
  5677  		}
  5678  		c.PageToken(x.NextPageToken)
  5679  	}
  5680  }
  5681  
  5682  // method id "securitycenter.organizations.sources.patch":
  5683  
  5684  type OrganizationsSourcesPatchCall struct {
  5685  	s          *Service
  5686  	name       string
  5687  	source     *Source
  5688  	urlParams_ gensupport.URLParams
  5689  	ctx_       context.Context
  5690  	header_    http.Header
  5691  }
  5692  
  5693  // Patch: Updates a source.
  5694  func (r *OrganizationsSourcesService) Patch(name string, source *Source) *OrganizationsSourcesPatchCall {
  5695  	c := &OrganizationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5696  	c.name = name
  5697  	c.source = source
  5698  	return c
  5699  }
  5700  
  5701  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  5702  // use when updating the source resource. If empty all mutable fields
  5703  // will be updated.
  5704  func (c *OrganizationsSourcesPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesPatchCall {
  5705  	c.urlParams_.Set("updateMask", updateMask)
  5706  	return c
  5707  }
  5708  
  5709  // Fields allows partial responses to be retrieved. See
  5710  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5711  // for more information.
  5712  func (c *OrganizationsSourcesPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesPatchCall {
  5713  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5714  	return c
  5715  }
  5716  
  5717  // Context sets the context to be used in this call's Do method. Any
  5718  // pending HTTP request will be aborted if the provided context is
  5719  // canceled.
  5720  func (c *OrganizationsSourcesPatchCall) Context(ctx context.Context) *OrganizationsSourcesPatchCall {
  5721  	c.ctx_ = ctx
  5722  	return c
  5723  }
  5724  
  5725  // Header returns an http.Header that can be modified by the caller to
  5726  // add HTTP headers to the request.
  5727  func (c *OrganizationsSourcesPatchCall) Header() http.Header {
  5728  	if c.header_ == nil {
  5729  		c.header_ = make(http.Header)
  5730  	}
  5731  	return c.header_
  5732  }
  5733  
  5734  func (c *OrganizationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
  5735  	reqHeaders := make(http.Header)
  5736  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5737  	for k, v := range c.header_ {
  5738  		reqHeaders[k] = v
  5739  	}
  5740  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5741  	var body io.Reader = nil
  5742  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
  5743  	if err != nil {
  5744  		return nil, err
  5745  	}
  5746  	reqHeaders.Set("Content-Type", "application/json")
  5747  	c.urlParams_.Set("alt", alt)
  5748  	c.urlParams_.Set("prettyPrint", "false")
  5749  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  5750  	urls += "?" + c.urlParams_.Encode()
  5751  	req, err := http.NewRequest("PATCH", urls, body)
  5752  	if err != nil {
  5753  		return nil, err
  5754  	}
  5755  	req.Header = reqHeaders
  5756  	googleapi.Expand(req.URL, map[string]string{
  5757  		"name": c.name,
  5758  	})
  5759  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5760  }
  5761  
  5762  // Do executes the "securitycenter.organizations.sources.patch" call.
  5763  // Exactly one of *Source or error will be non-nil. Any non-2xx status
  5764  // code is an error. Response headers are in either
  5765  // *Source.ServerResponse.Header or (if a response was returned at all)
  5766  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5767  // check whether the returned error was because http.StatusNotModified
  5768  // was returned.
  5769  func (c *OrganizationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Source, error) {
  5770  	gensupport.SetOptions(c.urlParams_, opts...)
  5771  	res, err := c.doRequest("json")
  5772  	if res != nil && res.StatusCode == http.StatusNotModified {
  5773  		if res.Body != nil {
  5774  			res.Body.Close()
  5775  		}
  5776  		return nil, &googleapi.Error{
  5777  			Code:   res.StatusCode,
  5778  			Header: res.Header,
  5779  		}
  5780  	}
  5781  	if err != nil {
  5782  		return nil, err
  5783  	}
  5784  	defer googleapi.CloseBody(res)
  5785  	if err := googleapi.CheckResponse(res); err != nil {
  5786  		return nil, err
  5787  	}
  5788  	ret := &Source{
  5789  		ServerResponse: googleapi.ServerResponse{
  5790  			Header:         res.Header,
  5791  			HTTPStatusCode: res.StatusCode,
  5792  		},
  5793  	}
  5794  	target := &ret
  5795  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5796  		return nil, err
  5797  	}
  5798  	return ret, nil
  5799  	// {
  5800  	//   "description": "Updates a source.",
  5801  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}",
  5802  	//   "httpMethod": "PATCH",
  5803  	//   "id": "securitycenter.organizations.sources.patch",
  5804  	//   "parameterOrder": [
  5805  	//     "name"
  5806  	//   ],
  5807  	//   "parameters": {
  5808  	//     "name": {
  5809  	//       "description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"",
  5810  	//       "location": "path",
  5811  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  5812  	//       "required": true,
  5813  	//       "type": "string"
  5814  	//     },
  5815  	//     "updateMask": {
  5816  	//       "description": "The FieldMask to use when updating the source resource. If empty all mutable fields will be updated.",
  5817  	//       "format": "google-fieldmask",
  5818  	//       "location": "query",
  5819  	//       "type": "string"
  5820  	//     }
  5821  	//   },
  5822  	//   "path": "v1p1beta1/{+name}",
  5823  	//   "request": {
  5824  	//     "$ref": "Source"
  5825  	//   },
  5826  	//   "response": {
  5827  	//     "$ref": "Source"
  5828  	//   },
  5829  	//   "scopes": [
  5830  	//     "https://www.googleapis.com/auth/cloud-platform"
  5831  	//   ]
  5832  	// }
  5833  
  5834  }
  5835  
  5836  // method id "securitycenter.organizations.sources.setIamPolicy":
  5837  
  5838  type OrganizationsSourcesSetIamPolicyCall struct {
  5839  	s                   *Service
  5840  	resource            string
  5841  	setiampolicyrequest *SetIamPolicyRequest
  5842  	urlParams_          gensupport.URLParams
  5843  	ctx_                context.Context
  5844  	header_             http.Header
  5845  }
  5846  
  5847  // SetIamPolicy: Sets the access control policy on the specified Source.
  5848  func (r *OrganizationsSourcesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSourcesSetIamPolicyCall {
  5849  	c := &OrganizationsSourcesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5850  	c.resource = resource
  5851  	c.setiampolicyrequest = setiampolicyrequest
  5852  	return c
  5853  }
  5854  
  5855  // Fields allows partial responses to be retrieved. See
  5856  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5857  // for more information.
  5858  func (c *OrganizationsSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSourcesSetIamPolicyCall {
  5859  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5860  	return c
  5861  }
  5862  
  5863  // Context sets the context to be used in this call's Do method. Any
  5864  // pending HTTP request will be aborted if the provided context is
  5865  // canceled.
  5866  func (c *OrganizationsSourcesSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSourcesSetIamPolicyCall {
  5867  	c.ctx_ = ctx
  5868  	return c
  5869  }
  5870  
  5871  // Header returns an http.Header that can be modified by the caller to
  5872  // add HTTP headers to the request.
  5873  func (c *OrganizationsSourcesSetIamPolicyCall) Header() http.Header {
  5874  	if c.header_ == nil {
  5875  		c.header_ = make(http.Header)
  5876  	}
  5877  	return c.header_
  5878  }
  5879  
  5880  func (c *OrganizationsSourcesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5881  	reqHeaders := make(http.Header)
  5882  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  5883  	for k, v := range c.header_ {
  5884  		reqHeaders[k] = v
  5885  	}
  5886  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5887  	var body io.Reader = nil
  5888  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5889  	if err != nil {
  5890  		return nil, err
  5891  	}
  5892  	reqHeaders.Set("Content-Type", "application/json")
  5893  	c.urlParams_.Set("alt", alt)
  5894  	c.urlParams_.Set("prettyPrint", "false")
  5895  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+resource}:setIamPolicy")
  5896  	urls += "?" + c.urlParams_.Encode()
  5897  	req, err := http.NewRequest("POST", urls, body)
  5898  	if err != nil {
  5899  		return nil, err
  5900  	}
  5901  	req.Header = reqHeaders
  5902  	googleapi.Expand(req.URL, map[string]string{
  5903  		"resource": c.resource,
  5904  	})
  5905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5906  }
  5907  
  5908  // Do executes the "securitycenter.organizations.sources.setIamPolicy" call.
  5909  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5910  // code is an error. Response headers are in either
  5911  // *Policy.ServerResponse.Header or (if a response was returned at all)
  5912  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5913  // check whether the returned error was because http.StatusNotModified
  5914  // was returned.
  5915  func (c *OrganizationsSourcesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5916  	gensupport.SetOptions(c.urlParams_, opts...)
  5917  	res, err := c.doRequest("json")
  5918  	if res != nil && res.StatusCode == http.StatusNotModified {
  5919  		if res.Body != nil {
  5920  			res.Body.Close()
  5921  		}
  5922  		return nil, &googleapi.Error{
  5923  			Code:   res.StatusCode,
  5924  			Header: res.Header,
  5925  		}
  5926  	}
  5927  	if err != nil {
  5928  		return nil, err
  5929  	}
  5930  	defer googleapi.CloseBody(res)
  5931  	if err := googleapi.CheckResponse(res); err != nil {
  5932  		return nil, err
  5933  	}
  5934  	ret := &Policy{
  5935  		ServerResponse: googleapi.ServerResponse{
  5936  			Header:         res.Header,
  5937  			HTTPStatusCode: res.StatusCode,
  5938  		},
  5939  	}
  5940  	target := &ret
  5941  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5942  		return nil, err
  5943  	}
  5944  	return ret, nil
  5945  	// {
  5946  	//   "description": "Sets the access control policy on the specified Source.",
  5947  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}:setIamPolicy",
  5948  	//   "httpMethod": "POST",
  5949  	//   "id": "securitycenter.organizations.sources.setIamPolicy",
  5950  	//   "parameterOrder": [
  5951  	//     "resource"
  5952  	//   ],
  5953  	//   "parameters": {
  5954  	//     "resource": {
  5955  	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
  5956  	//       "location": "path",
  5957  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  5958  	//       "required": true,
  5959  	//       "type": "string"
  5960  	//     }
  5961  	//   },
  5962  	//   "path": "v1p1beta1/{+resource}:setIamPolicy",
  5963  	//   "request": {
  5964  	//     "$ref": "SetIamPolicyRequest"
  5965  	//   },
  5966  	//   "response": {
  5967  	//     "$ref": "Policy"
  5968  	//   },
  5969  	//   "scopes": [
  5970  	//     "https://www.googleapis.com/auth/cloud-platform"
  5971  	//   ]
  5972  	// }
  5973  
  5974  }
  5975  
  5976  // method id "securitycenter.organizations.sources.testIamPermissions":
  5977  
  5978  type OrganizationsSourcesTestIamPermissionsCall struct {
  5979  	s                         *Service
  5980  	resource                  string
  5981  	testiampermissionsrequest *TestIamPermissionsRequest
  5982  	urlParams_                gensupport.URLParams
  5983  	ctx_                      context.Context
  5984  	header_                   http.Header
  5985  }
  5986  
  5987  // TestIamPermissions: Returns the permissions that a caller has on the
  5988  // specified source.
  5989  func (r *OrganizationsSourcesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsSourcesTestIamPermissionsCall {
  5990  	c := &OrganizationsSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5991  	c.resource = resource
  5992  	c.testiampermissionsrequest = testiampermissionsrequest
  5993  	return c
  5994  }
  5995  
  5996  // Fields allows partial responses to be retrieved. See
  5997  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5998  // for more information.
  5999  func (c *OrganizationsSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsSourcesTestIamPermissionsCall {
  6000  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6001  	return c
  6002  }
  6003  
  6004  // Context sets the context to be used in this call's Do method. Any
  6005  // pending HTTP request will be aborted if the provided context is
  6006  // canceled.
  6007  func (c *OrganizationsSourcesTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsSourcesTestIamPermissionsCall {
  6008  	c.ctx_ = ctx
  6009  	return c
  6010  }
  6011  
  6012  // Header returns an http.Header that can be modified by the caller to
  6013  // add HTTP headers to the request.
  6014  func (c *OrganizationsSourcesTestIamPermissionsCall) Header() http.Header {
  6015  	if c.header_ == nil {
  6016  		c.header_ = make(http.Header)
  6017  	}
  6018  	return c.header_
  6019  }
  6020  
  6021  func (c *OrganizationsSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6022  	reqHeaders := make(http.Header)
  6023  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6024  	for k, v := range c.header_ {
  6025  		reqHeaders[k] = v
  6026  	}
  6027  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6028  	var body io.Reader = nil
  6029  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6030  	if err != nil {
  6031  		return nil, err
  6032  	}
  6033  	reqHeaders.Set("Content-Type", "application/json")
  6034  	c.urlParams_.Set("alt", alt)
  6035  	c.urlParams_.Set("prettyPrint", "false")
  6036  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+resource}:testIamPermissions")
  6037  	urls += "?" + c.urlParams_.Encode()
  6038  	req, err := http.NewRequest("POST", urls, body)
  6039  	if err != nil {
  6040  		return nil, err
  6041  	}
  6042  	req.Header = reqHeaders
  6043  	googleapi.Expand(req.URL, map[string]string{
  6044  		"resource": c.resource,
  6045  	})
  6046  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6047  }
  6048  
  6049  // Do executes the "securitycenter.organizations.sources.testIamPermissions" call.
  6050  // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  6051  // Any non-2xx status code is an error. Response headers are in either
  6052  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  6053  // was returned at all) in error.(*googleapi.Error).Header. Use
  6054  // googleapi.IsNotModified to check whether the returned error was
  6055  // because http.StatusNotModified was returned.
  6056  func (c *OrganizationsSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6057  	gensupport.SetOptions(c.urlParams_, opts...)
  6058  	res, err := c.doRequest("json")
  6059  	if res != nil && res.StatusCode == http.StatusNotModified {
  6060  		if res.Body != nil {
  6061  			res.Body.Close()
  6062  		}
  6063  		return nil, &googleapi.Error{
  6064  			Code:   res.StatusCode,
  6065  			Header: res.Header,
  6066  		}
  6067  	}
  6068  	if err != nil {
  6069  		return nil, err
  6070  	}
  6071  	defer googleapi.CloseBody(res)
  6072  	if err := googleapi.CheckResponse(res); err != nil {
  6073  		return nil, err
  6074  	}
  6075  	ret := &TestIamPermissionsResponse{
  6076  		ServerResponse: googleapi.ServerResponse{
  6077  			Header:         res.Header,
  6078  			HTTPStatusCode: res.StatusCode,
  6079  		},
  6080  	}
  6081  	target := &ret
  6082  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6083  		return nil, err
  6084  	}
  6085  	return ret, nil
  6086  	// {
  6087  	//   "description": "Returns the permissions that a caller has on the specified source.",
  6088  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}:testIamPermissions",
  6089  	//   "httpMethod": "POST",
  6090  	//   "id": "securitycenter.organizations.sources.testIamPermissions",
  6091  	//   "parameterOrder": [
  6092  	//     "resource"
  6093  	//   ],
  6094  	//   "parameters": {
  6095  	//     "resource": {
  6096  	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
  6097  	//       "location": "path",
  6098  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  6099  	//       "required": true,
  6100  	//       "type": "string"
  6101  	//     }
  6102  	//   },
  6103  	//   "path": "v1p1beta1/{+resource}:testIamPermissions",
  6104  	//   "request": {
  6105  	//     "$ref": "TestIamPermissionsRequest"
  6106  	//   },
  6107  	//   "response": {
  6108  	//     "$ref": "TestIamPermissionsResponse"
  6109  	//   },
  6110  	//   "scopes": [
  6111  	//     "https://www.googleapis.com/auth/cloud-platform"
  6112  	//   ]
  6113  	// }
  6114  
  6115  }
  6116  
  6117  // method id "securitycenter.organizations.sources.findings.create":
  6118  
  6119  type OrganizationsSourcesFindingsCreateCall struct {
  6120  	s                                         *Service
  6121  	parent                                    string
  6122  	googlecloudsecuritycenterv1p1beta1finding *GoogleCloudSecuritycenterV1p1beta1Finding
  6123  	urlParams_                                gensupport.URLParams
  6124  	ctx_                                      context.Context
  6125  	header_                                   http.Header
  6126  }
  6127  
  6128  // Create: Creates a finding. The corresponding source must exist for
  6129  // finding creation to succeed.
  6130  func (r *OrganizationsSourcesFindingsService) Create(parent string, googlecloudsecuritycenterv1p1beta1finding *GoogleCloudSecuritycenterV1p1beta1Finding) *OrganizationsSourcesFindingsCreateCall {
  6131  	c := &OrganizationsSourcesFindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6132  	c.parent = parent
  6133  	c.googlecloudsecuritycenterv1p1beta1finding = googlecloudsecuritycenterv1p1beta1finding
  6134  	return c
  6135  }
  6136  
  6137  // FindingId sets the optional parameter "findingId": Required. Unique
  6138  // identifier provided by the client within the parent scope.
  6139  func (c *OrganizationsSourcesFindingsCreateCall) FindingId(findingId string) *OrganizationsSourcesFindingsCreateCall {
  6140  	c.urlParams_.Set("findingId", findingId)
  6141  	return c
  6142  }
  6143  
  6144  // Fields allows partial responses to be retrieved. See
  6145  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6146  // for more information.
  6147  func (c *OrganizationsSourcesFindingsCreateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsCreateCall {
  6148  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6149  	return c
  6150  }
  6151  
  6152  // Context sets the context to be used in this call's Do method. Any
  6153  // pending HTTP request will be aborted if the provided context is
  6154  // canceled.
  6155  func (c *OrganizationsSourcesFindingsCreateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsCreateCall {
  6156  	c.ctx_ = ctx
  6157  	return c
  6158  }
  6159  
  6160  // Header returns an http.Header that can be modified by the caller to
  6161  // add HTTP headers to the request.
  6162  func (c *OrganizationsSourcesFindingsCreateCall) Header() http.Header {
  6163  	if c.header_ == nil {
  6164  		c.header_ = make(http.Header)
  6165  	}
  6166  	return c.header_
  6167  }
  6168  
  6169  func (c *OrganizationsSourcesFindingsCreateCall) doRequest(alt string) (*http.Response, error) {
  6170  	reqHeaders := make(http.Header)
  6171  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6172  	for k, v := range c.header_ {
  6173  		reqHeaders[k] = v
  6174  	}
  6175  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6176  	var body io.Reader = nil
  6177  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1p1beta1finding)
  6178  	if err != nil {
  6179  		return nil, err
  6180  	}
  6181  	reqHeaders.Set("Content-Type", "application/json")
  6182  	c.urlParams_.Set("alt", alt)
  6183  	c.urlParams_.Set("prettyPrint", "false")
  6184  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/findings")
  6185  	urls += "?" + c.urlParams_.Encode()
  6186  	req, err := http.NewRequest("POST", urls, body)
  6187  	if err != nil {
  6188  		return nil, err
  6189  	}
  6190  	req.Header = reqHeaders
  6191  	googleapi.Expand(req.URL, map[string]string{
  6192  		"parent": c.parent,
  6193  	})
  6194  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6195  }
  6196  
  6197  // Do executes the "securitycenter.organizations.sources.findings.create" call.
  6198  // Exactly one of *GoogleCloudSecuritycenterV1p1beta1Finding or error
  6199  // will be non-nil. Any non-2xx status code is an error. Response
  6200  // headers are in either
  6201  // *GoogleCloudSecuritycenterV1p1beta1Finding.ServerResponse.Header or
  6202  // (if a response was returned at all) in
  6203  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6204  // whether the returned error was because http.StatusNotModified was
  6205  // returned.
  6206  func (c *OrganizationsSourcesFindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1p1beta1Finding, error) {
  6207  	gensupport.SetOptions(c.urlParams_, opts...)
  6208  	res, err := c.doRequest("json")
  6209  	if res != nil && res.StatusCode == http.StatusNotModified {
  6210  		if res.Body != nil {
  6211  			res.Body.Close()
  6212  		}
  6213  		return nil, &googleapi.Error{
  6214  			Code:   res.StatusCode,
  6215  			Header: res.Header,
  6216  		}
  6217  	}
  6218  	if err != nil {
  6219  		return nil, err
  6220  	}
  6221  	defer googleapi.CloseBody(res)
  6222  	if err := googleapi.CheckResponse(res); err != nil {
  6223  		return nil, err
  6224  	}
  6225  	ret := &GoogleCloudSecuritycenterV1p1beta1Finding{
  6226  		ServerResponse: googleapi.ServerResponse{
  6227  			Header:         res.Header,
  6228  			HTTPStatusCode: res.StatusCode,
  6229  		},
  6230  	}
  6231  	target := &ret
  6232  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6233  		return nil, err
  6234  	}
  6235  	return ret, nil
  6236  	// {
  6237  	//   "description": "Creates a finding. The corresponding source must exist for finding creation to succeed.",
  6238  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings",
  6239  	//   "httpMethod": "POST",
  6240  	//   "id": "securitycenter.organizations.sources.findings.create",
  6241  	//   "parameterOrder": [
  6242  	//     "parent"
  6243  	//   ],
  6244  	//   "parameters": {
  6245  	//     "findingId": {
  6246  	//       "description": "Required. Unique identifier provided by the client within the parent scope.",
  6247  	//       "location": "query",
  6248  	//       "type": "string"
  6249  	//     },
  6250  	//     "parent": {
  6251  	//       "description": "Required. Resource name of the new finding's parent. Its format should be \"organizations/[organization_id]/sources/[source_id]\".",
  6252  	//       "location": "path",
  6253  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  6254  	//       "required": true,
  6255  	//       "type": "string"
  6256  	//     }
  6257  	//   },
  6258  	//   "path": "v1p1beta1/{+parent}/findings",
  6259  	//   "request": {
  6260  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1Finding"
  6261  	//   },
  6262  	//   "response": {
  6263  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1Finding"
  6264  	//   },
  6265  	//   "scopes": [
  6266  	//     "https://www.googleapis.com/auth/cloud-platform"
  6267  	//   ]
  6268  	// }
  6269  
  6270  }
  6271  
  6272  // method id "securitycenter.organizations.sources.findings.group":
  6273  
  6274  type OrganizationsSourcesFindingsGroupCall struct {
  6275  	s                    *Service
  6276  	parent               string
  6277  	groupfindingsrequest *GroupFindingsRequest
  6278  	urlParams_           gensupport.URLParams
  6279  	ctx_                 context.Context
  6280  	header_              http.Header
  6281  }
  6282  
  6283  // Group: Filters an organization or source's findings and groups them
  6284  // by their specified properties. To group across all sources provide a
  6285  // `-` as the source id. Example:
  6286  // /v1p1beta1/organizations/{organization_id}/sources/-/findings
  6287  func (r *OrganizationsSourcesFindingsService) Group(parent string, groupfindingsrequest *GroupFindingsRequest) *OrganizationsSourcesFindingsGroupCall {
  6288  	c := &OrganizationsSourcesFindingsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6289  	c.parent = parent
  6290  	c.groupfindingsrequest = groupfindingsrequest
  6291  	return c
  6292  }
  6293  
  6294  // Fields allows partial responses to be retrieved. See
  6295  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6296  // for more information.
  6297  func (c *OrganizationsSourcesFindingsGroupCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsGroupCall {
  6298  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6299  	return c
  6300  }
  6301  
  6302  // Context sets the context to be used in this call's Do method. Any
  6303  // pending HTTP request will be aborted if the provided context is
  6304  // canceled.
  6305  func (c *OrganizationsSourcesFindingsGroupCall) Context(ctx context.Context) *OrganizationsSourcesFindingsGroupCall {
  6306  	c.ctx_ = ctx
  6307  	return c
  6308  }
  6309  
  6310  // Header returns an http.Header that can be modified by the caller to
  6311  // add HTTP headers to the request.
  6312  func (c *OrganizationsSourcesFindingsGroupCall) Header() http.Header {
  6313  	if c.header_ == nil {
  6314  		c.header_ = make(http.Header)
  6315  	}
  6316  	return c.header_
  6317  }
  6318  
  6319  func (c *OrganizationsSourcesFindingsGroupCall) doRequest(alt string) (*http.Response, error) {
  6320  	reqHeaders := make(http.Header)
  6321  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6322  	for k, v := range c.header_ {
  6323  		reqHeaders[k] = v
  6324  	}
  6325  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6326  	var body io.Reader = nil
  6327  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupfindingsrequest)
  6328  	if err != nil {
  6329  		return nil, err
  6330  	}
  6331  	reqHeaders.Set("Content-Type", "application/json")
  6332  	c.urlParams_.Set("alt", alt)
  6333  	c.urlParams_.Set("prettyPrint", "false")
  6334  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/findings:group")
  6335  	urls += "?" + c.urlParams_.Encode()
  6336  	req, err := http.NewRequest("POST", urls, body)
  6337  	if err != nil {
  6338  		return nil, err
  6339  	}
  6340  	req.Header = reqHeaders
  6341  	googleapi.Expand(req.URL, map[string]string{
  6342  		"parent": c.parent,
  6343  	})
  6344  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6345  }
  6346  
  6347  // Do executes the "securitycenter.organizations.sources.findings.group" call.
  6348  // Exactly one of *GroupFindingsResponse or error will be non-nil. Any
  6349  // non-2xx status code is an error. Response headers are in either
  6350  // *GroupFindingsResponse.ServerResponse.Header or (if a response was
  6351  // returned at all) in error.(*googleapi.Error).Header. Use
  6352  // googleapi.IsNotModified to check whether the returned error was
  6353  // because http.StatusNotModified was returned.
  6354  func (c *OrganizationsSourcesFindingsGroupCall) Do(opts ...googleapi.CallOption) (*GroupFindingsResponse, error) {
  6355  	gensupport.SetOptions(c.urlParams_, opts...)
  6356  	res, err := c.doRequest("json")
  6357  	if res != nil && res.StatusCode == http.StatusNotModified {
  6358  		if res.Body != nil {
  6359  			res.Body.Close()
  6360  		}
  6361  		return nil, &googleapi.Error{
  6362  			Code:   res.StatusCode,
  6363  			Header: res.Header,
  6364  		}
  6365  	}
  6366  	if err != nil {
  6367  		return nil, err
  6368  	}
  6369  	defer googleapi.CloseBody(res)
  6370  	if err := googleapi.CheckResponse(res); err != nil {
  6371  		return nil, err
  6372  	}
  6373  	ret := &GroupFindingsResponse{
  6374  		ServerResponse: googleapi.ServerResponse{
  6375  			Header:         res.Header,
  6376  			HTTPStatusCode: res.StatusCode,
  6377  		},
  6378  	}
  6379  	target := &ret
  6380  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6381  		return nil, err
  6382  	}
  6383  	return ret, nil
  6384  	// {
  6385  	//   "description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings",
  6386  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings:group",
  6387  	//   "httpMethod": "POST",
  6388  	//   "id": "securitycenter.organizations.sources.findings.group",
  6389  	//   "parameterOrder": [
  6390  	//     "parent"
  6391  	//   ],
  6392  	//   "parameters": {
  6393  	//     "parent": {
  6394  	//       "description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\". To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-",
  6395  	//       "location": "path",
  6396  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  6397  	//       "required": true,
  6398  	//       "type": "string"
  6399  	//     }
  6400  	//   },
  6401  	//   "path": "v1p1beta1/{+parent}/findings:group",
  6402  	//   "request": {
  6403  	//     "$ref": "GroupFindingsRequest"
  6404  	//   },
  6405  	//   "response": {
  6406  	//     "$ref": "GroupFindingsResponse"
  6407  	//   },
  6408  	//   "scopes": [
  6409  	//     "https://www.googleapis.com/auth/cloud-platform"
  6410  	//   ]
  6411  	// }
  6412  
  6413  }
  6414  
  6415  // Pages invokes f for each page of results.
  6416  // A non-nil error returned from f will halt the iteration.
  6417  // The provided context supersedes any context provided to the Context method.
  6418  func (c *OrganizationsSourcesFindingsGroupCall) Pages(ctx context.Context, f func(*GroupFindingsResponse) error) error {
  6419  	c.ctx_ = ctx
  6420  	defer func(pt string) { c.groupfindingsrequest.PageToken = pt }(c.groupfindingsrequest.PageToken) // reset paging to original point
  6421  	for {
  6422  		x, err := c.Do()
  6423  		if err != nil {
  6424  			return err
  6425  		}
  6426  		if err := f(x); err != nil {
  6427  			return err
  6428  		}
  6429  		if x.NextPageToken == "" {
  6430  			return nil
  6431  		}
  6432  		c.groupfindingsrequest.PageToken = x.NextPageToken
  6433  	}
  6434  }
  6435  
  6436  // method id "securitycenter.organizations.sources.findings.list":
  6437  
  6438  type OrganizationsSourcesFindingsListCall struct {
  6439  	s            *Service
  6440  	parent       string
  6441  	urlParams_   gensupport.URLParams
  6442  	ifNoneMatch_ string
  6443  	ctx_         context.Context
  6444  	header_      http.Header
  6445  }
  6446  
  6447  // List: Lists an organization or source's findings. To list across all
  6448  // sources provide a `-` as the source id. Example:
  6449  // /v1p1beta1/organizations/{organization_id}/sources/-/findings
  6450  func (r *OrganizationsSourcesFindingsService) List(parent string) *OrganizationsSourcesFindingsListCall {
  6451  	c := &OrganizationsSourcesFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6452  	c.parent = parent
  6453  	return c
  6454  }
  6455  
  6456  // CompareDuration sets the optional parameter "compareDuration": When
  6457  // compare_duration is set, the ListFindingsResult's "state_change"
  6458  // attribute is updated to indicate whether the finding had its state
  6459  // changed, the finding's state remained unchanged, or if the finding
  6460  // was added in any state during the compare_duration period of time
  6461  // that precedes the read_time. This is the time between (read_time -
  6462  // compare_duration) and read_time. The state_change value is derived
  6463  // based on the presence and state of the finding at the two points in
  6464  // time. Intermediate state changes between the two times don't affect
  6465  // the result. For example, the results aren't affected if the finding
  6466  // is made inactive and then active again. Possible "state_change"
  6467  // values when compare_duration is specified: * "CHANGED": indicates
  6468  // that the finding was present and matched the given filter at the
  6469  // start of compare_duration, but changed its state at read_time. *
  6470  // "UNCHANGED": indicates that the finding was present and matched the
  6471  // given filter at the start of compare_duration and did not change
  6472  // state at read_time. * "ADDED": indicates that the finding did not
  6473  // match the given filter or was not present at the start of
  6474  // compare_duration, but was present at read_time. * "REMOVED":
  6475  // indicates that the finding was present and matched the filter at the
  6476  // start of compare_duration, but did not match the filter at read_time.
  6477  // If compare_duration is not specified, then the only possible
  6478  // state_change is "UNUSED", which will be the state_change set for all
  6479  // findings present at read_time.
  6480  func (c *OrganizationsSourcesFindingsListCall) CompareDuration(compareDuration string) *OrganizationsSourcesFindingsListCall {
  6481  	c.urlParams_.Set("compareDuration", compareDuration)
  6482  	return c
  6483  }
  6484  
  6485  // FieldMask sets the optional parameter "fieldMask": A field mask to
  6486  // specify the Finding fields to be listed in the response. An empty
  6487  // field mask will list all fields.
  6488  func (c *OrganizationsSourcesFindingsListCall) FieldMask(fieldMask string) *OrganizationsSourcesFindingsListCall {
  6489  	c.urlParams_.Set("fieldMask", fieldMask)
  6490  	return c
  6491  }
  6492  
  6493  // Filter sets the optional parameter "filter": Expression that defines
  6494  // the filter to apply across findings. The expression is a list of one
  6495  // or more restrictions combined via logical operators `AND` and `OR`.
  6496  // Parentheses are supported, and `OR` has higher precedence than `AND`.
  6497  // Restrictions have the form ` ` and may have a `-` character in front
  6498  // of them to indicate negation. Examples include: * name *
  6499  // source_properties.a_property * security_marks.marks.marka The
  6500  // supported operators are: * `=` for all value types. * `>`, `<`, `>=`,
  6501  // `<=` for integer values. * `:`, meaning substring matching, for
  6502  // strings. The supported value types are: * string literals in quotes.
  6503  // * integer literals without quotes. * boolean literals `true` and
  6504  // `false` without quotes. The following field and operator combinations
  6505  // are supported: name: `=` parent: `=`, `:` resource_name: `=`, `:`
  6506  // state: `=`, `:` category: `=`, `:` external_uri: `=`, `:` event_time:
  6507  // `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since
  6508  // epoch or an RFC3339 string. Examples: `event_time =
  6509  // "2019-06-10T16:07:18-07:00" `event_time = 1560208038000`
  6510  // security_marks.marks: `=`, `:` source_properties: `=`, `:`, `>`, `<`,
  6511  // `>=`, `<=` For example, `source_properties.size = 100` is a valid
  6512  // filter string. Use a partial match on the empty string to filter
  6513  // based on a property existing: `source_properties.my_property : ""
  6514  // Use a negated partial match on the empty string to filter based on a
  6515  // property not existing: `-source_properties.my_property : ""
  6516  func (c *OrganizationsSourcesFindingsListCall) Filter(filter string) *OrganizationsSourcesFindingsListCall {
  6517  	c.urlParams_.Set("filter", filter)
  6518  	return c
  6519  }
  6520  
  6521  // OrderBy sets the optional parameter "orderBy": Expression that
  6522  // defines what fields and order to use for sorting. The string value
  6523  // should follow SQL syntax: comma separated list of fields. For
  6524  // example: "name,resource_properties.a_property". The default sorting
  6525  // order is ascending. To specify descending order for a field, a suffix
  6526  // " desc" should be appended to the field name. For example: "name
  6527  // desc,source_properties.a_property". Redundant space characters in the
  6528  // syntax are insignificant. "name desc,source_properties.a_property"
  6529  // and " name desc , source_properties.a_property " are equivalent. The
  6530  // following fields are supported: name parent state category
  6531  // resource_name event_time source_properties security_marks.marks
  6532  func (c *OrganizationsSourcesFindingsListCall) OrderBy(orderBy string) *OrganizationsSourcesFindingsListCall {
  6533  	c.urlParams_.Set("orderBy", orderBy)
  6534  	return c
  6535  }
  6536  
  6537  // PageSize sets the optional parameter "pageSize": The maximum number
  6538  // of results to return in a single response. Default is 10, minimum is
  6539  // 1, maximum is 1000.
  6540  func (c *OrganizationsSourcesFindingsListCall) PageSize(pageSize int64) *OrganizationsSourcesFindingsListCall {
  6541  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6542  	return c
  6543  }
  6544  
  6545  // PageToken sets the optional parameter "pageToken": The value returned
  6546  // by the last `ListFindingsResponse`; indicates that this is a
  6547  // continuation of a prior `ListFindings` call, and that the system
  6548  // should return the next page of data.
  6549  func (c *OrganizationsSourcesFindingsListCall) PageToken(pageToken string) *OrganizationsSourcesFindingsListCall {
  6550  	c.urlParams_.Set("pageToken", pageToken)
  6551  	return c
  6552  }
  6553  
  6554  // ReadTime sets the optional parameter "readTime": Time used as a
  6555  // reference point when filtering findings. The filter is limited to
  6556  // findings existing at the supplied time and their values are those at
  6557  // that specific time. Absence of this field will default to the API's
  6558  // version of NOW.
  6559  func (c *OrganizationsSourcesFindingsListCall) ReadTime(readTime string) *OrganizationsSourcesFindingsListCall {
  6560  	c.urlParams_.Set("readTime", readTime)
  6561  	return c
  6562  }
  6563  
  6564  // Fields allows partial responses to be retrieved. See
  6565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6566  // for more information.
  6567  func (c *OrganizationsSourcesFindingsListCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsListCall {
  6568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6569  	return c
  6570  }
  6571  
  6572  // IfNoneMatch sets the optional parameter which makes the operation
  6573  // fail if the object's ETag matches the given value. This is useful for
  6574  // getting updates only after the object has changed since the last
  6575  // request. Use googleapi.IsNotModified to check whether the response
  6576  // error from Do is the result of In-None-Match.
  6577  func (c *OrganizationsSourcesFindingsListCall) IfNoneMatch(entityTag string) *OrganizationsSourcesFindingsListCall {
  6578  	c.ifNoneMatch_ = entityTag
  6579  	return c
  6580  }
  6581  
  6582  // Context sets the context to be used in this call's Do method. Any
  6583  // pending HTTP request will be aborted if the provided context is
  6584  // canceled.
  6585  func (c *OrganizationsSourcesFindingsListCall) Context(ctx context.Context) *OrganizationsSourcesFindingsListCall {
  6586  	c.ctx_ = ctx
  6587  	return c
  6588  }
  6589  
  6590  // Header returns an http.Header that can be modified by the caller to
  6591  // add HTTP headers to the request.
  6592  func (c *OrganizationsSourcesFindingsListCall) Header() http.Header {
  6593  	if c.header_ == nil {
  6594  		c.header_ = make(http.Header)
  6595  	}
  6596  	return c.header_
  6597  }
  6598  
  6599  func (c *OrganizationsSourcesFindingsListCall) doRequest(alt string) (*http.Response, error) {
  6600  	reqHeaders := make(http.Header)
  6601  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6602  	for k, v := range c.header_ {
  6603  		reqHeaders[k] = v
  6604  	}
  6605  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6606  	if c.ifNoneMatch_ != "" {
  6607  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6608  	}
  6609  	var body io.Reader = nil
  6610  	c.urlParams_.Set("alt", alt)
  6611  	c.urlParams_.Set("prettyPrint", "false")
  6612  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/findings")
  6613  	urls += "?" + c.urlParams_.Encode()
  6614  	req, err := http.NewRequest("GET", urls, body)
  6615  	if err != nil {
  6616  		return nil, err
  6617  	}
  6618  	req.Header = reqHeaders
  6619  	googleapi.Expand(req.URL, map[string]string{
  6620  		"parent": c.parent,
  6621  	})
  6622  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6623  }
  6624  
  6625  // Do executes the "securitycenter.organizations.sources.findings.list" call.
  6626  // Exactly one of *ListFindingsResponse or error will be non-nil. Any
  6627  // non-2xx status code is an error. Response headers are in either
  6628  // *ListFindingsResponse.ServerResponse.Header or (if a response was
  6629  // returned at all) in error.(*googleapi.Error).Header. Use
  6630  // googleapi.IsNotModified to check whether the returned error was
  6631  // because http.StatusNotModified was returned.
  6632  func (c *OrganizationsSourcesFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) {
  6633  	gensupport.SetOptions(c.urlParams_, opts...)
  6634  	res, err := c.doRequest("json")
  6635  	if res != nil && res.StatusCode == http.StatusNotModified {
  6636  		if res.Body != nil {
  6637  			res.Body.Close()
  6638  		}
  6639  		return nil, &googleapi.Error{
  6640  			Code:   res.StatusCode,
  6641  			Header: res.Header,
  6642  		}
  6643  	}
  6644  	if err != nil {
  6645  		return nil, err
  6646  	}
  6647  	defer googleapi.CloseBody(res)
  6648  	if err := googleapi.CheckResponse(res); err != nil {
  6649  		return nil, err
  6650  	}
  6651  	ret := &ListFindingsResponse{
  6652  		ServerResponse: googleapi.ServerResponse{
  6653  			Header:         res.Header,
  6654  			HTTPStatusCode: res.StatusCode,
  6655  		},
  6656  	}
  6657  	target := &ret
  6658  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6659  		return nil, err
  6660  	}
  6661  	return ret, nil
  6662  	// {
  6663  	//   "description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings",
  6664  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings",
  6665  	//   "httpMethod": "GET",
  6666  	//   "id": "securitycenter.organizations.sources.findings.list",
  6667  	//   "parameterOrder": [
  6668  	//     "parent"
  6669  	//   ],
  6670  	//   "parameters": {
  6671  	//     "compareDuration": {
  6672  	//       "description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.",
  6673  	//       "format": "google-duration",
  6674  	//       "location": "query",
  6675  	//       "type": "string"
  6676  	//     },
  6677  	//     "fieldMask": {
  6678  	//       "description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.",
  6679  	//       "format": "google-fieldmask",
  6680  	//       "location": "query",
  6681  	//       "type": "string"
  6682  	//     },
  6683  	//     "filter": {
  6684  	//       "description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: name: `=` parent: `=`, `:` resource_name: `=`, `:` state: `=`, `:` category: `=`, `:` external_uri: `=`, `:` event_time: `=`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` security_marks.marks: `=`, `:` source_properties: `=`, `:`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"`",
  6685  	//       "location": "query",
  6686  	//       "type": "string"
  6687  	//     },
  6688  	//     "orderBy": {
  6689  	//       "description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks",
  6690  	//       "location": "query",
  6691  	//       "type": "string"
  6692  	//     },
  6693  	//     "pageSize": {
  6694  	//       "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.",
  6695  	//       "format": "int32",
  6696  	//       "location": "query",
  6697  	//       "type": "integer"
  6698  	//     },
  6699  	//     "pageToken": {
  6700  	//       "description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.",
  6701  	//       "location": "query",
  6702  	//       "type": "string"
  6703  	//     },
  6704  	//     "parent": {
  6705  	//       "description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-",
  6706  	//       "location": "path",
  6707  	//       "pattern": "^organizations/[^/]+/sources/[^/]+$",
  6708  	//       "required": true,
  6709  	//       "type": "string"
  6710  	//     },
  6711  	//     "readTime": {
  6712  	//       "description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.",
  6713  	//       "format": "google-datetime",
  6714  	//       "location": "query",
  6715  	//       "type": "string"
  6716  	//     }
  6717  	//   },
  6718  	//   "path": "v1p1beta1/{+parent}/findings",
  6719  	//   "response": {
  6720  	//     "$ref": "ListFindingsResponse"
  6721  	//   },
  6722  	//   "scopes": [
  6723  	//     "https://www.googleapis.com/auth/cloud-platform"
  6724  	//   ]
  6725  	// }
  6726  
  6727  }
  6728  
  6729  // Pages invokes f for each page of results.
  6730  // A non-nil error returned from f will halt the iteration.
  6731  // The provided context supersedes any context provided to the Context method.
  6732  func (c *OrganizationsSourcesFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error {
  6733  	c.ctx_ = ctx
  6734  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6735  	for {
  6736  		x, err := c.Do()
  6737  		if err != nil {
  6738  			return err
  6739  		}
  6740  		if err := f(x); err != nil {
  6741  			return err
  6742  		}
  6743  		if x.NextPageToken == "" {
  6744  			return nil
  6745  		}
  6746  		c.PageToken(x.NextPageToken)
  6747  	}
  6748  }
  6749  
  6750  // method id "securitycenter.organizations.sources.findings.patch":
  6751  
  6752  type OrganizationsSourcesFindingsPatchCall struct {
  6753  	s                                         *Service
  6754  	name                                      string
  6755  	googlecloudsecuritycenterv1p1beta1finding *GoogleCloudSecuritycenterV1p1beta1Finding
  6756  	urlParams_                                gensupport.URLParams
  6757  	ctx_                                      context.Context
  6758  	header_                                   http.Header
  6759  }
  6760  
  6761  // Patch: Creates or updates a finding. The corresponding source must
  6762  // exist for a finding creation to succeed.
  6763  func (r *OrganizationsSourcesFindingsService) Patch(name string, googlecloudsecuritycenterv1p1beta1finding *GoogleCloudSecuritycenterV1p1beta1Finding) *OrganizationsSourcesFindingsPatchCall {
  6764  	c := &OrganizationsSourcesFindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6765  	c.name = name
  6766  	c.googlecloudsecuritycenterv1p1beta1finding = googlecloudsecuritycenterv1p1beta1finding
  6767  	return c
  6768  }
  6769  
  6770  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  6771  // use when updating the finding resource. This field should not be
  6772  // specified when creating a finding. When updating a finding, an empty
  6773  // mask is treated as updating all mutable fields and replacing
  6774  // source_properties. Individual source_properties can be added/updated
  6775  // by using "source_properties." in the field mask.
  6776  func (c *OrganizationsSourcesFindingsPatchCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsPatchCall {
  6777  	c.urlParams_.Set("updateMask", updateMask)
  6778  	return c
  6779  }
  6780  
  6781  // Fields allows partial responses to be retrieved. See
  6782  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6783  // for more information.
  6784  func (c *OrganizationsSourcesFindingsPatchCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsPatchCall {
  6785  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6786  	return c
  6787  }
  6788  
  6789  // Context sets the context to be used in this call's Do method. Any
  6790  // pending HTTP request will be aborted if the provided context is
  6791  // canceled.
  6792  func (c *OrganizationsSourcesFindingsPatchCall) Context(ctx context.Context) *OrganizationsSourcesFindingsPatchCall {
  6793  	c.ctx_ = ctx
  6794  	return c
  6795  }
  6796  
  6797  // Header returns an http.Header that can be modified by the caller to
  6798  // add HTTP headers to the request.
  6799  func (c *OrganizationsSourcesFindingsPatchCall) Header() http.Header {
  6800  	if c.header_ == nil {
  6801  		c.header_ = make(http.Header)
  6802  	}
  6803  	return c.header_
  6804  }
  6805  
  6806  func (c *OrganizationsSourcesFindingsPatchCall) doRequest(alt string) (*http.Response, error) {
  6807  	reqHeaders := make(http.Header)
  6808  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6809  	for k, v := range c.header_ {
  6810  		reqHeaders[k] = v
  6811  	}
  6812  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6813  	var body io.Reader = nil
  6814  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1p1beta1finding)
  6815  	if err != nil {
  6816  		return nil, err
  6817  	}
  6818  	reqHeaders.Set("Content-Type", "application/json")
  6819  	c.urlParams_.Set("alt", alt)
  6820  	c.urlParams_.Set("prettyPrint", "false")
  6821  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  6822  	urls += "?" + c.urlParams_.Encode()
  6823  	req, err := http.NewRequest("PATCH", urls, body)
  6824  	if err != nil {
  6825  		return nil, err
  6826  	}
  6827  	req.Header = reqHeaders
  6828  	googleapi.Expand(req.URL, map[string]string{
  6829  		"name": c.name,
  6830  	})
  6831  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6832  }
  6833  
  6834  // Do executes the "securitycenter.organizations.sources.findings.patch" call.
  6835  // Exactly one of *GoogleCloudSecuritycenterV1p1beta1Finding or error
  6836  // will be non-nil. Any non-2xx status code is an error. Response
  6837  // headers are in either
  6838  // *GoogleCloudSecuritycenterV1p1beta1Finding.ServerResponse.Header or
  6839  // (if a response was returned at all) in
  6840  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6841  // whether the returned error was because http.StatusNotModified was
  6842  // returned.
  6843  func (c *OrganizationsSourcesFindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1p1beta1Finding, error) {
  6844  	gensupport.SetOptions(c.urlParams_, opts...)
  6845  	res, err := c.doRequest("json")
  6846  	if res != nil && res.StatusCode == http.StatusNotModified {
  6847  		if res.Body != nil {
  6848  			res.Body.Close()
  6849  		}
  6850  		return nil, &googleapi.Error{
  6851  			Code:   res.StatusCode,
  6852  			Header: res.Header,
  6853  		}
  6854  	}
  6855  	if err != nil {
  6856  		return nil, err
  6857  	}
  6858  	defer googleapi.CloseBody(res)
  6859  	if err := googleapi.CheckResponse(res); err != nil {
  6860  		return nil, err
  6861  	}
  6862  	ret := &GoogleCloudSecuritycenterV1p1beta1Finding{
  6863  		ServerResponse: googleapi.ServerResponse{
  6864  			Header:         res.Header,
  6865  			HTTPStatusCode: res.StatusCode,
  6866  		},
  6867  	}
  6868  	target := &ret
  6869  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6870  		return nil, err
  6871  	}
  6872  	return ret, nil
  6873  	// {
  6874  	//   "description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.",
  6875  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}",
  6876  	//   "httpMethod": "PATCH",
  6877  	//   "id": "securitycenter.organizations.sources.findings.patch",
  6878  	//   "parameterOrder": [
  6879  	//     "name"
  6880  	//   ],
  6881  	//   "parameters": {
  6882  	//     "name": {
  6883  	//       "description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"",
  6884  	//       "location": "path",
  6885  	//       "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$",
  6886  	//       "required": true,
  6887  	//       "type": "string"
  6888  	//     },
  6889  	//     "updateMask": {
  6890  	//       "description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.",
  6891  	//       "format": "google-fieldmask",
  6892  	//       "location": "query",
  6893  	//       "type": "string"
  6894  	//     }
  6895  	//   },
  6896  	//   "path": "v1p1beta1/{+name}",
  6897  	//   "request": {
  6898  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1Finding"
  6899  	//   },
  6900  	//   "response": {
  6901  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1Finding"
  6902  	//   },
  6903  	//   "scopes": [
  6904  	//     "https://www.googleapis.com/auth/cloud-platform"
  6905  	//   ]
  6906  	// }
  6907  
  6908  }
  6909  
  6910  // method id "securitycenter.organizations.sources.findings.setState":
  6911  
  6912  type OrganizationsSourcesFindingsSetStateCall struct {
  6913  	s                      *Service
  6914  	name                   string
  6915  	setfindingstaterequest *SetFindingStateRequest
  6916  	urlParams_             gensupport.URLParams
  6917  	ctx_                   context.Context
  6918  	header_                http.Header
  6919  }
  6920  
  6921  // SetState: Updates the state of a finding.
  6922  func (r *OrganizationsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *OrganizationsSourcesFindingsSetStateCall {
  6923  	c := &OrganizationsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6924  	c.name = name
  6925  	c.setfindingstaterequest = setfindingstaterequest
  6926  	return c
  6927  }
  6928  
  6929  // Fields allows partial responses to be retrieved. See
  6930  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6931  // for more information.
  6932  func (c *OrganizationsSourcesFindingsSetStateCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsSetStateCall {
  6933  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6934  	return c
  6935  }
  6936  
  6937  // Context sets the context to be used in this call's Do method. Any
  6938  // pending HTTP request will be aborted if the provided context is
  6939  // canceled.
  6940  func (c *OrganizationsSourcesFindingsSetStateCall) Context(ctx context.Context) *OrganizationsSourcesFindingsSetStateCall {
  6941  	c.ctx_ = ctx
  6942  	return c
  6943  }
  6944  
  6945  // Header returns an http.Header that can be modified by the caller to
  6946  // add HTTP headers to the request.
  6947  func (c *OrganizationsSourcesFindingsSetStateCall) Header() http.Header {
  6948  	if c.header_ == nil {
  6949  		c.header_ = make(http.Header)
  6950  	}
  6951  	return c.header_
  6952  }
  6953  
  6954  func (c *OrganizationsSourcesFindingsSetStateCall) doRequest(alt string) (*http.Response, error) {
  6955  	reqHeaders := make(http.Header)
  6956  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  6957  	for k, v := range c.header_ {
  6958  		reqHeaders[k] = v
  6959  	}
  6960  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6961  	var body io.Reader = nil
  6962  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setfindingstaterequest)
  6963  	if err != nil {
  6964  		return nil, err
  6965  	}
  6966  	reqHeaders.Set("Content-Type", "application/json")
  6967  	c.urlParams_.Set("alt", alt)
  6968  	c.urlParams_.Set("prettyPrint", "false")
  6969  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}:setState")
  6970  	urls += "?" + c.urlParams_.Encode()
  6971  	req, err := http.NewRequest("POST", urls, body)
  6972  	if err != nil {
  6973  		return nil, err
  6974  	}
  6975  	req.Header = reqHeaders
  6976  	googleapi.Expand(req.URL, map[string]string{
  6977  		"name": c.name,
  6978  	})
  6979  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6980  }
  6981  
  6982  // Do executes the "securitycenter.organizations.sources.findings.setState" call.
  6983  // Exactly one of *GoogleCloudSecuritycenterV1p1beta1Finding or error
  6984  // will be non-nil. Any non-2xx status code is an error. Response
  6985  // headers are in either
  6986  // *GoogleCloudSecuritycenterV1p1beta1Finding.ServerResponse.Header or
  6987  // (if a response was returned at all) in
  6988  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6989  // whether the returned error was because http.StatusNotModified was
  6990  // returned.
  6991  func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1p1beta1Finding, error) {
  6992  	gensupport.SetOptions(c.urlParams_, opts...)
  6993  	res, err := c.doRequest("json")
  6994  	if res != nil && res.StatusCode == http.StatusNotModified {
  6995  		if res.Body != nil {
  6996  			res.Body.Close()
  6997  		}
  6998  		return nil, &googleapi.Error{
  6999  			Code:   res.StatusCode,
  7000  			Header: res.Header,
  7001  		}
  7002  	}
  7003  	if err != nil {
  7004  		return nil, err
  7005  	}
  7006  	defer googleapi.CloseBody(res)
  7007  	if err := googleapi.CheckResponse(res); err != nil {
  7008  		return nil, err
  7009  	}
  7010  	ret := &GoogleCloudSecuritycenterV1p1beta1Finding{
  7011  		ServerResponse: googleapi.ServerResponse{
  7012  			Header:         res.Header,
  7013  			HTTPStatusCode: res.StatusCode,
  7014  		},
  7015  	}
  7016  	target := &ret
  7017  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7018  		return nil, err
  7019  	}
  7020  	return ret, nil
  7021  	// {
  7022  	//   "description": "Updates the state of a finding.",
  7023  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setState",
  7024  	//   "httpMethod": "POST",
  7025  	//   "id": "securitycenter.organizations.sources.findings.setState",
  7026  	//   "parameterOrder": [
  7027  	//     "name"
  7028  	//   ],
  7029  	//   "parameters": {
  7030  	//     "name": {
  7031  	//       "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".",
  7032  	//       "location": "path",
  7033  	//       "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$",
  7034  	//       "required": true,
  7035  	//       "type": "string"
  7036  	//     }
  7037  	//   },
  7038  	//   "path": "v1p1beta1/{+name}:setState",
  7039  	//   "request": {
  7040  	//     "$ref": "SetFindingStateRequest"
  7041  	//   },
  7042  	//   "response": {
  7043  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1Finding"
  7044  	//   },
  7045  	//   "scopes": [
  7046  	//     "https://www.googleapis.com/auth/cloud-platform"
  7047  	//   ]
  7048  	// }
  7049  
  7050  }
  7051  
  7052  // method id "securitycenter.organizations.sources.findings.updateSecurityMarks":
  7053  
  7054  type OrganizationsSourcesFindingsUpdateSecurityMarksCall struct {
  7055  	s                                               *Service
  7056  	name                                            string
  7057  	googlecloudsecuritycenterv1p1beta1securitymarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks
  7058  	urlParams_                                      gensupport.URLParams
  7059  	ctx_                                            context.Context
  7060  	header_                                         http.Header
  7061  }
  7062  
  7063  // UpdateSecurityMarks: Updates security marks.
  7064  func (r *OrganizationsSourcesFindingsService) UpdateSecurityMarks(name string, googlecloudsecuritycenterv1p1beta1securitymarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks) *OrganizationsSourcesFindingsUpdateSecurityMarksCall {
  7065  	c := &OrganizationsSourcesFindingsUpdateSecurityMarksCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7066  	c.name = name
  7067  	c.googlecloudsecuritycenterv1p1beta1securitymarks = googlecloudsecuritycenterv1p1beta1securitymarks
  7068  	return c
  7069  }
  7070  
  7071  // StartTime sets the optional parameter "startTime": The time at which
  7072  // the updated SecurityMarks take effect. If not set uses current server
  7073  // time. Updates will be applied to the SecurityMarks that are active
  7074  // immediately preceding this time.
  7075  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall {
  7076  	c.urlParams_.Set("startTime", startTime)
  7077  	return c
  7078  }
  7079  
  7080  // UpdateMask sets the optional parameter "updateMask": The FieldMask to
  7081  // use when updating the security marks resource. The field mask must
  7082  // not contain duplicate fields. If empty or set to "marks", all marks
  7083  // will be replaced. Individual marks can be updated using "marks.".
  7084  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) UpdateMask(updateMask string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall {
  7085  	c.urlParams_.Set("updateMask", updateMask)
  7086  	return c
  7087  }
  7088  
  7089  // Fields allows partial responses to be retrieved. See
  7090  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7091  // for more information.
  7092  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Fields(s ...googleapi.Field) *OrganizationsSourcesFindingsUpdateSecurityMarksCall {
  7093  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7094  	return c
  7095  }
  7096  
  7097  // Context sets the context to be used in this call's Do method. Any
  7098  // pending HTTP request will be aborted if the provided context is
  7099  // canceled.
  7100  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Context(ctx context.Context) *OrganizationsSourcesFindingsUpdateSecurityMarksCall {
  7101  	c.ctx_ = ctx
  7102  	return c
  7103  }
  7104  
  7105  // Header returns an http.Header that can be modified by the caller to
  7106  // add HTTP headers to the request.
  7107  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Header() http.Header {
  7108  	if c.header_ == nil {
  7109  		c.header_ = make(http.Header)
  7110  	}
  7111  	return c.header_
  7112  }
  7113  
  7114  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) doRequest(alt string) (*http.Response, error) {
  7115  	reqHeaders := make(http.Header)
  7116  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200825")
  7117  	for k, v := range c.header_ {
  7118  		reqHeaders[k] = v
  7119  	}
  7120  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7121  	var body io.Reader = nil
  7122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudsecuritycenterv1p1beta1securitymarks)
  7123  	if err != nil {
  7124  		return nil, err
  7125  	}
  7126  	reqHeaders.Set("Content-Type", "application/json")
  7127  	c.urlParams_.Set("alt", alt)
  7128  	c.urlParams_.Set("prettyPrint", "false")
  7129  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
  7130  	urls += "?" + c.urlParams_.Encode()
  7131  	req, err := http.NewRequest("PATCH", urls, body)
  7132  	if err != nil {
  7133  		return nil, err
  7134  	}
  7135  	req.Header = reqHeaders
  7136  	googleapi.Expand(req.URL, map[string]string{
  7137  		"name": c.name,
  7138  	})
  7139  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7140  }
  7141  
  7142  // Do executes the "securitycenter.organizations.sources.findings.updateSecurityMarks" call.
  7143  // Exactly one of *GoogleCloudSecuritycenterV1p1beta1SecurityMarks or
  7144  // error will be non-nil. Any non-2xx status code is an error. Response
  7145  // headers are in either
  7146  // *GoogleCloudSecuritycenterV1p1beta1SecurityMarks.ServerResponse.Header
  7147  //
  7148  //	or (if a response was returned at all) in
  7149  //
  7150  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7151  // whether the returned error was because http.StatusNotModified was
  7152  // returned.
  7153  func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) (*GoogleCloudSecuritycenterV1p1beta1SecurityMarks, error) {
  7154  	gensupport.SetOptions(c.urlParams_, opts...)
  7155  	res, err := c.doRequest("json")
  7156  	if res != nil && res.StatusCode == http.StatusNotModified {
  7157  		if res.Body != nil {
  7158  			res.Body.Close()
  7159  		}
  7160  		return nil, &googleapi.Error{
  7161  			Code:   res.StatusCode,
  7162  			Header: res.Header,
  7163  		}
  7164  	}
  7165  	if err != nil {
  7166  		return nil, err
  7167  	}
  7168  	defer googleapi.CloseBody(res)
  7169  	if err := googleapi.CheckResponse(res); err != nil {
  7170  		return nil, err
  7171  	}
  7172  	ret := &GoogleCloudSecuritycenterV1p1beta1SecurityMarks{
  7173  		ServerResponse: googleapi.ServerResponse{
  7174  			Header:         res.Header,
  7175  			HTTPStatusCode: res.StatusCode,
  7176  		},
  7177  	}
  7178  	target := &ret
  7179  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7180  		return nil, err
  7181  	}
  7182  	return ret, nil
  7183  	// {
  7184  	//   "description": "Updates security marks.",
  7185  	//   "flatPath": "v1p1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks",
  7186  	//   "httpMethod": "PATCH",
  7187  	//   "id": "securitycenter.organizations.sources.findings.updateSecurityMarks",
  7188  	//   "parameterOrder": [
  7189  	//     "name"
  7190  	//   ],
  7191  	//   "parameters": {
  7192  	//     "name": {
  7193  	//       "description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".",
  7194  	//       "location": "path",
  7195  	//       "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$",
  7196  	//       "required": true,
  7197  	//       "type": "string"
  7198  	//     },
  7199  	//     "startTime": {
  7200  	//       "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time.",
  7201  	//       "format": "google-datetime",
  7202  	//       "location": "query",
  7203  	//       "type": "string"
  7204  	//     },
  7205  	//     "updateMask": {
  7206  	//       "description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".",
  7207  	//       "format": "google-fieldmask",
  7208  	//       "location": "query",
  7209  	//       "type": "string"
  7210  	//     }
  7211  	//   },
  7212  	//   "path": "v1p1beta1/{+name}",
  7213  	//   "request": {
  7214  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks"
  7215  	//   },
  7216  	//   "response": {
  7217  	//     "$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks"
  7218  	//   },
  7219  	//   "scopes": [
  7220  	//     "https://www.googleapis.com/auth/cloud-platform"
  7221  	//   ]
  7222  	// }
  7223  
  7224  }
  7225  

View as plain text