// Copyright 2026 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Code generated file. DO NOT EDIT.

// Package saasservicemgmt provides access to the App Lifecycle Manager API.
//
// For product documentation, see: https://cloud.google.com/saas-runtime/docs
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
//	import "google.golang.org/api/saasservicemgmt/v1beta1"
//	...
//	ctx := context.Background()
//	saasservicemgmtService, err := saasservicemgmt.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
//	saasservicemgmtService, err := saasservicemgmt.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
//	config := &oauth2.Config{...}
//	// ...
//	token, err := config.Exchange(ctx, ...)
//	saasservicemgmtService, err := saasservicemgmt.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package saasservicemgmt // import "google.golang.org/api/saasservicemgmt/v1beta1"

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"log/slog"
	"net/http"
	"net/url"
	"strconv"
	"strings"

	"github.com/googleapis/gax-go/v2/internallog"
	googleapi "google.golang.org/api/googleapi"
	internal "google.golang.org/api/internal"
	gensupport "google.golang.org/api/internal/gensupport"
	option "google.golang.org/api/option"
	internaloption "google.golang.org/api/option/internaloption"
	htransport "google.golang.org/api/transport/http"
)

// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
var _ = internallog.New

const apiId = "saasservicemgmt:v1beta1"
const apiName = "saasservicemgmt"
const apiVersion = "v1beta1"
const basePath = "https://saasservicemgmt.googleapis.com/"
const basePathTemplate = "https://saasservicemgmt.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://saasservicemgmt.mtls.googleapis.com/"

// OAuth2 scopes used by this API.
const (
	// See, edit, configure, and delete your Google Cloud data and see the email
	// address for your Google Account.
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
	scopesOption := internaloption.WithDefaultScopes(
		"https://www.googleapis.com/auth/cloud-platform",
	)
	// NOTE: prepend, so we don't override user-specified scopes.
	opts = append([]option.ClientOption{scopesOption}, opts...)
	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
	opts = append(opts, internaloption.EnableNewAuthLibrary())
	client, endpoint, err := htransport.NewClient(ctx, opts...)
	if err != nil {
		return nil, err
	}
	s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
	s.Projects = NewProjectsService(s)
	if endpoint != "" {
		s.BasePath = endpoint
	}
	return s, nil
}

// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
	if client == nil {
		return nil, errors.New("client is nil")
	}
	return NewService(context.TODO(), option.WithHTTPClient(client))
}

type Service struct {
	client    *http.Client
	logger    *slog.Logger
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Projects *ProjectsService
}

func (s *Service) userAgent() string {
	if s.UserAgent == "" {
		return googleapi.UserAgent
	}
	return googleapi.UserAgent + " " + s.UserAgent
}

func NewProjectsService(s *Service) *ProjectsService {
	rs := &ProjectsService{s: s}
	rs.Locations = NewProjectsLocationsService(s)
	return rs
}

type ProjectsService struct {
	s *Service

	Locations *ProjectsLocationsService
}

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
	rs := &ProjectsLocationsService{s: s}
	rs.FlagAttributes = NewProjectsLocationsFlagAttributesService(s)
	rs.FlagReleases = NewProjectsLocationsFlagReleasesService(s)
	rs.FlagRevisions = NewProjectsLocationsFlagRevisionsService(s)
	rs.Flags = NewProjectsLocationsFlagsService(s)
	rs.Releases = NewProjectsLocationsReleasesService(s)
	rs.RolloutKinds = NewProjectsLocationsRolloutKindsService(s)
	rs.Rollouts = NewProjectsLocationsRolloutsService(s)
	rs.Saas = NewProjectsLocationsSaasService(s)
	rs.Tenants = NewProjectsLocationsTenantsService(s)
	rs.UnitKinds = NewProjectsLocationsUnitKindsService(s)
	rs.UnitOperations = NewProjectsLocationsUnitOperationsService(s)
	rs.Units = NewProjectsLocationsUnitsService(s)
	return rs
}

type ProjectsLocationsService struct {
	s *Service

	FlagAttributes *ProjectsLocationsFlagAttributesService

	FlagReleases *ProjectsLocationsFlagReleasesService

	FlagRevisions *ProjectsLocationsFlagRevisionsService

	Flags *ProjectsLocationsFlagsService

	Releases *ProjectsLocationsReleasesService

	RolloutKinds *ProjectsLocationsRolloutKindsService

	Rollouts *ProjectsLocationsRolloutsService

	Saas *ProjectsLocationsSaasService

	Tenants *ProjectsLocationsTenantsService

	UnitKinds *ProjectsLocationsUnitKindsService

	UnitOperations *ProjectsLocationsUnitOperationsService

	Units *ProjectsLocationsUnitsService
}

func NewProjectsLocationsFlagAttributesService(s *Service) *ProjectsLocationsFlagAttributesService {
	rs := &ProjectsLocationsFlagAttributesService{s: s}
	return rs
}

type ProjectsLocationsFlagAttributesService struct {
	s *Service
}

func NewProjectsLocationsFlagReleasesService(s *Service) *ProjectsLocationsFlagReleasesService {
	rs := &ProjectsLocationsFlagReleasesService{s: s}
	return rs
}

type ProjectsLocationsFlagReleasesService struct {
	s *Service
}

func NewProjectsLocationsFlagRevisionsService(s *Service) *ProjectsLocationsFlagRevisionsService {
	rs := &ProjectsLocationsFlagRevisionsService{s: s}
	return rs
}

type ProjectsLocationsFlagRevisionsService struct {
	s *Service
}

func NewProjectsLocationsFlagsService(s *Service) *ProjectsLocationsFlagsService {
	rs := &ProjectsLocationsFlagsService{s: s}
	return rs
}

type ProjectsLocationsFlagsService struct {
	s *Service
}

func NewProjectsLocationsReleasesService(s *Service) *ProjectsLocationsReleasesService {
	rs := &ProjectsLocationsReleasesService{s: s}
	return rs
}

type ProjectsLocationsReleasesService struct {
	s *Service
}

func NewProjectsLocationsRolloutKindsService(s *Service) *ProjectsLocationsRolloutKindsService {
	rs := &ProjectsLocationsRolloutKindsService{s: s}
	return rs
}

type ProjectsLocationsRolloutKindsService struct {
	s *Service
}

func NewProjectsLocationsRolloutsService(s *Service) *ProjectsLocationsRolloutsService {
	rs := &ProjectsLocationsRolloutsService{s: s}
	return rs
}

type ProjectsLocationsRolloutsService struct {
	s *Service
}

func NewProjectsLocationsSaasService(s *Service) *ProjectsLocationsSaasService {
	rs := &ProjectsLocationsSaasService{s: s}
	return rs
}

type ProjectsLocationsSaasService struct {
	s *Service
}

func NewProjectsLocationsTenantsService(s *Service) *ProjectsLocationsTenantsService {
	rs := &ProjectsLocationsTenantsService{s: s}
	return rs
}

type ProjectsLocationsTenantsService struct {
	s *Service
}

func NewProjectsLocationsUnitKindsService(s *Service) *ProjectsLocationsUnitKindsService {
	rs := &ProjectsLocationsUnitKindsService{s: s}
	return rs
}

type ProjectsLocationsUnitKindsService struct {
	s *Service
}

func NewProjectsLocationsUnitOperationsService(s *Service) *ProjectsLocationsUnitOperationsService {
	rs := &ProjectsLocationsUnitOperationsService{s: s}
	return rs
}

type ProjectsLocationsUnitOperationsService struct {
	s *Service
}

func NewProjectsLocationsUnitsService(s *Service) *ProjectsLocationsUnitsService {
	rs := &ProjectsLocationsUnitsService{s: s}
	return rs
}

type ProjectsLocationsUnitsService struct {
	s *Service
}

// Aggregate: Represents the aggregation of a set of population of like records
// by a certain group. For example, a collection of unit counts can be
// aggregated and grouped by their state.
type Aggregate struct {
	// Count: Required. Number of records in the group.
	Count int64 `json:"count,omitempty"`
	// Group: Required. Group by which to aggregate.
	Group string `json:"group,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Count") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Aggregate) MarshalJSON() ([]byte, error) {
	type NoMethod Aggregate
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Allocation: Allocation defines a set of weighted flag variants, specifying
// how traffic is split based on the randomization unit.
type Allocation struct {
	// Description: Optional. Description of the allocation. Max length: 500 bytes.
	Description string `json:"description,omitempty"`
	// Id: Required. Allocation ID. Max length: 128 bytes.
	Id string `json:"id,omitempty"`
	// RandomizedOn: Required. Key of the context attribute that is used for
	// traffic splitting.
	RandomizedOn string `json:"randomizedOn,omitempty"`
	// Slots: Required. Slots defines the weighted distribution of variants.
	Slots []*AllocationSlot `json:"slots,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Description") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Allocation) MarshalJSON() ([]byte, error) {
	type NoMethod Allocation
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// AllocationSlot: AllocationSlot specifies a variant and the proportion of
// traffic allocated to it.
type AllocationSlot struct {
	// Variant: Required. Variant of the allocation slot.
	Variant string `json:"variant,omitempty"`
	// Weight: Required. Weight defines the proportion of traffic to allocate to
	// the variant, relative to other slots in the same allocation.
	Weight int64 `json:"weight,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Variant") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Variant") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s AllocationSlot) MarshalJSON() ([]byte, error) {
	type NoMethod AllocationSlot
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// AppParams: AppParams contains the parameters for creating an AppHub
// Application.
type AppParams struct {
	// Group: Grouping used to construct the name of the AppHub Application.
	// Multiple UnitKinds can specify the same group to use the same Application
	// across their respective units. Corresponds to the app_boundary_id in the ADC
	// composite ApplicationTemplate. Defaults to UnitKind.name
	Group string `json:"group,omitempty"`
	// Scope: Corresponds to the scope in the ADC composite ApplicationTemplate.
	// Defaults to TYPE_REGIONAL.
	Scope *Scope `json:"scope,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Group") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Group") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s AppParams) MarshalJSON() ([]byte, error) {
	type NoMethod AppParams
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Blueprint: Blueprints are OCI Images that contain all of the artifacts
// needed to provision a unit. Metadata such as, type of the engine used to
// actuate the blueprint (e.g. terraform, helm etc) and version will come from
// the image manifest. If the hostname is omitted, it will be assumed to be the
// regional path to Artifact Registry (eg. us-east1-docker.pkg.dev).
type Blueprint struct {
	// Engine: Output only. Type of the engine used to actuate the blueprint. e.g.
	// terraform, helm etc.
	Engine string `json:"engine,omitempty"`
	// Package: Optional. Immutable. URI to a blueprint used by the Unit (required
	// unless unitKind or release is set).
	Package string `json:"package,omitempty"`
	// Version: Output only. Version metadata if present on the blueprint.
	Version string `json:"version,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Engine") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Engine") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Blueprint) MarshalJSON() ([]byte, error) {
	type NoMethod Blueprint
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ComponentRef: ComponentRef represents a reference to a component resource.
// Next ID: 4
type ComponentRef struct {
	// Component: Name of the component in composite.Components
	Component string `json:"component,omitempty"`
	// CompositeRef: Reference to the Composite ApplicationTemplate.
	CompositeRef *CompositeRef `json:"compositeRef,omitempty"`
	// Revision: Revision of the component. If the component does not have a
	// revision, this field will be explicitly set to the revision of the composite
	// ApplicationTemplate.
	Revision string `json:"revision,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Component") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Component") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ComponentRef) MarshalJSON() ([]byte, error) {
	type NoMethod ComponentRef
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// CompositeRef: CompositeRef represents a reference to a composite resource.
// Next ID: 4
type CompositeRef struct {
	// ApplicationTemplate: Required. Reference to the ApplicationTemplate
	// resource.
	ApplicationTemplate string `json:"applicationTemplate,omitempty"`
	// Revision: Revision of the ApplicationTemplate to use. Changes to revision
	// will trigger manual resynchronization. If empty, ApplicationTemplate will be
	// ignored.
	Revision string `json:"revision,omitempty"`
	// SyncOperation: Output only. Reference to on-going AppTemplate import and
	// replication operation (i.e. the operation_id for the long-running
	// operation). This field is opaque for external usage.
	SyncOperation string `json:"syncOperation,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ApplicationTemplate") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ApplicationTemplate") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s CompositeRef) MarshalJSON() ([]byte, error) {
	type NoMethod CompositeRef
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Dependency: Dependency represent a single dependency with another unit kind
// by alias.
type Dependency struct {
	// Alias: Required. An alias for the dependency. Used for input variable
	// mapping.
	Alias string `json:"alias,omitempty"`
	// UnitKind: Required. Immutable. The unit kind of the dependency.
	UnitKind string `json:"unitKind,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Alias") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Alias") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Dependency) MarshalJSON() ([]byte, error) {
	type NoMethod Dependency
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Deprovision: Deprovision is the unit operation that deprovision the
// underlying resources represented by a Unit. Can only execute if the Unit is
// currently provisioned.
type Deprovision struct {
}

// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use it as
// the request or the response type of an API method. For instance: service Foo
// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
}

// ErrorBudget: The configuration for error budget. If the number of failed
// units exceeds max(allowed_count, allowed_ratio * total_units), the rollout
// will be paused.
type ErrorBudget struct {
	// AllowedCount: Optional. The maximum number of failed units allowed in a
	// location without pausing the rollout.
	AllowedCount int64 `json:"allowedCount,omitempty"`
	// AllowedPercentage: Optional. The maximum percentage of units allowed to fail
	// (0, 100] within a location without pausing the rollout.
	AllowedPercentage int64 `json:"allowedPercentage,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowedCount") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowedCount") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ErrorBudget) MarshalJSON() ([]byte, error) {
	type NoMethod ErrorBudget
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// EvaluationRule: EvaluationRule defines a single rule for evaluating a
// feature flag. A rule consists of a condition that, if met, assigns a
// specific variant or allocation to the user.
type EvaluationRule struct {
	// AllocationId: Optional. The ID of an allocation to target.
	AllocationId string `json:"allocationId,omitempty"`
	// Condition: Required. A Common Expression Language (CEL) expression that
	// evaluates to a boolean. The expression is evaluated against the provided
	// context. If it returns true, the rule's target is applied.
	Condition string `json:"condition,omitempty"`
	// Id: Required. Evaluation rule ID. Max length: 128 bytes.
	Id string `json:"id,omitempty"`
	// Target: Optional. Deprecated: Use `rule_target` instead. The target variant
	// or allocation to apply if the condition is met. This should match the name
	// of a defined variant or allocation's ID.
	Target string `json:"target,omitempty"`
	// VariantId: Optional. The name of a variant to target.
	VariantId string `json:"variantId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllocationId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllocationId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s EvaluationRule) MarshalJSON() ([]byte, error) {
	type NoMethod EvaluationRule
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// EvaluationSpec: EvaluationSpec holds rules for evaluating the value of a
// flag.
type EvaluationSpec struct {
	// Allocations: Optional. A list of allocations.
	Allocations []*Allocation `json:"allocations,omitempty"`
	// Attributes: Optional. Names of the context attributes that are used in the
	// evaluation rules and allocations.
	Attributes []string `json:"attributes,omitempty"`
	// DefaultAllocation: Optional. The ID of an allocation to use as the default.
	DefaultAllocation string `json:"defaultAllocation,omitempty"`
	// DefaultTarget: Optional. Deprecated: Use `base_target` instead. Default
	// variant or allocation of the flag.
	DefaultTarget string `json:"defaultTarget,omitempty"`
	// DefaultVariant: Optional. The name of a variant to use as the default.
	DefaultVariant string `json:"defaultVariant,omitempty"`
	// Rules: Optional. Evaluation rules define the logic for evaluating the flag
	// against a given context. The rules are evaluated sequentially in their
	// specified order.
	Rules []*EvaluationRule `json:"rules,omitempty"`
	// Variants: Optional. A list of variants.
	Variants []*Variant `json:"variants,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Allocations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Allocations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s EvaluationSpec) MarshalJSON() ([]byte, error) {
	type NoMethod EvaluationSpec
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Flag: Represents a single Flag.
type Flag struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Description: Optional. Description of the flag. Max length: 500 bytes.
	Description string `json:"description,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// EvaluationSpec: Optional. Specification of how the flag value should be
	// evaluated. If a bool flag is created without an evaluation_spec specified,
	// two default variants, "Enabled" (with bool_value = true) and "Disabled"
	// (with bool_value = false), are created by default, and "Disabled" is set as
	// the default_target.
	EvaluationSpec *EvaluationSpec `json:"evaluationSpec,omitempty"`
	// FlagSet: Optional. Flag set this flag belongs to.
	FlagSet string `json:"flagSet,omitempty"`
	// FlagValueType: Optional. Immutable. Flag value type.
	//
	// Possible values:
	//   "FLAG_VALUE_TYPE_UNSPECIFIED" - Unspecified flag value type.
	//   "FLAG_VALUE_TYPE_BOOLEAN" - Boolean flag value type.
	//   "FLAG_VALUE_TYPE_INTEGER" - Integer flag value type.
	//   "FLAG_VALUE_TYPE_STRING" - String flag value type.
	//   "FLAG_VALUE_TYPE_DOUBLE" - Double flag value type.
	FlagValueType string `json:"flagValueType,omitempty"`
	// Key: Required. Immutable. Flag key used in runtime evaluation APIs
	// (OpenFeature). Max length: 256 bytes.
	Key string `json:"key,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/flags/{flag_id}"
	Name string `json:"name,omitempty"`
	// State: Optional. Current state of the flag.
	//
	// Possible values:
	//   "FLAG_STATE_UNSPECIFIED" - Flag state is unspecified.
	//   "FLAG_STATE_IN_DEVELOPMENT" - Flag is in development state.
	//   "FLAG_STATE_ACTIVE" - Flag is in active state.
	//   "FLAG_STATE_SUNSETTING" - Flag is in deprecated state.
	//   "FLAG_STATE_CLEANUP" - Flag is in cleanup state.
	State string `json:"state,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitKind: Required. Immutable. UnitKind that can consume this flag.
	UnitKind string `json:"unitKind,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`
	// ValueType: Optional. Immutable. Deprecated: Use `flag_value_type` instead.
	// Flag value type.
	//
	// Possible values:
	//   "FLAG_VALUE_TYPE_UNSPECIFIED"
	//   "FLAG_VALUE_TYPE_BOOL" - Boolean flag value type.
	//   "FLAG_VALUE_TYPE_INT" - Integer flag value type.
	//   "FLAG_VALUE_TYPE_STRING" - String flag value type.
	//   "FLAG_VALUE_TYPE_DOUBLE" - Double flag type.
	ValueType string `json:"valueType,omitempty"`
	// Variants: Optional. A list of variants.
	Variants []*FlagVariant `json:"variants,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Flag) MarshalJSON() ([]byte, error) {
	type NoMethod Flag
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagAttribute: FlagAttribute defines a custom property in the evaluation
// context.
type FlagAttribute struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// AttributeValueType: Optional. Immutable. Type of the attribute.
	//
	// Possible values:
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_UNSPECIFIED" - Unspecified flag attribute value
	// type.
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_BOOLEAN" - Boolean flag attribute value type.
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_INTEGER" - Integer flag attribute value type.
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_STRING" - String flag attribute value type.
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_DOUBLE" - Double flag attribute value type.
	AttributeValueType string `json:"attributeValueType,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// Key: Required. Immutable. The identifier for the attribute, used as the key
	// in the evaluation context. The attribute key is referenced in the evaluation
	// rules and used in the OpenFeature evaluation API to specify the attribute
	// context.
	Key string `json:"key,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/flagAttributes/{flag_attribute_id}"
	Name string `json:"name,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`
	// ValueType: Optional. Immutable. Deprecated: Use `attribute_value_type`
	// instead. Type of the attribute.
	//
	// Possible values:
	//   "FLAG_ATTRIBUTE_VALUE_TYPE_UNSPECIFIED" - Unspecified flag attribute value
	// type.
	//   "BOOLEAN" - Boolean flag attribute value type.
	//   "INTEGER" - Integer flag attribute value type.
	//   "STRING" - String flag attribute value type.
	//   "DOUBLE" - Double flag attribute value type.
	ValueType string `json:"valueType,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagAttribute) MarshalJSON() ([]byte, error) {
	type NoMethod FlagAttribute
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagRelease: A collection of FlagRevisions.
type FlagRelease struct {
	// AllFlags: Optional. Immutable. DEPRECATED: Use all_flags_release instead.
	// Rollout all flags in the provided UnitKind. Only one of flag_revisions,
	// all_flags, or flag_sets can be set.
	AllFlags bool `json:"allFlags,omitempty"`
	// AllFlagsRelease: Optional. Immutable. Specifies the release includes all
	// flags.
	AllFlagsRelease bool `json:"allFlagsRelease,omitempty"`
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// EffectiveFlagRevisions: Output only. An OUTPUT_ONLY field that contains
	// FlagRevisions to be rolled out. This is the ultimate source of truth of what
	// a Rollout or a UnitOperation carries.
	EffectiveFlagRevisions []string `json:"effectiveFlagRevisions,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// FlagRevisions: Optional. Immutable. DEPRECATED: Use flag_revisions_release
	// instead. FlagRevisions to be rolled out. Only one of flag_revisions,
	// all_flags, or flag_sets can be set. It used to be the ultimate source to
	// truth and has been moved to effective_flag_revisions.
	FlagRevisions []string `json:"flagRevisions,omitempty"`
	// FlagRevisionsRelease: Optional. Immutable. Specifies the release consists of
	// a list of flag revisions.
	FlagRevisionsRelease *FlagRevisionList `json:"flagRevisionsRelease,omitempty"`
	// FlagSets: Optional. Immutable. DEPRECATED: Use flag_sets_release instead.
	// Flag sets to be rolled out. Only one of flag_revisions, all_flags, or
	// flag_sets can be set.
	FlagSets []string `json:"flagSets,omitempty"`
	// FlagSetsRelease: Optional. Immutable. Specifies the release consists of a
	// list of flag sets.
	FlagSetsRelease *FlagSetList `json:"flagSetsRelease,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/flagReleases/{flag_release_id}"
	Name string `json:"name,omitempty"`
	// ObsoleteFlags: Optional. Immutable. Deprecated: Use the 'state' field in the
	// 'Flag' resource to manage the cleanup of flag lifecycles including removal
	// from UnitKind and Units. Flags to be removed from given UnitKind and all
	// related Units. If Flag is provided here, its FlagRevisions will be removed
	// from UnitKind and Units.
	ObsoleteFlags []string `json:"obsoleteFlags,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitKind: Required. Immutable. The UnitKind this FlagRelease applies to.
	UnitKind string `json:"unitKind,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "AllFlags") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllFlags") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagRelease) MarshalJSON() ([]byte, error) {
	type NoMethod FlagRelease
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagRevision: A snapshot of the EvaluationSpec for the Flag.
type FlagRevision struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// EvaluationSpec: Output only. Immutable. Snapshot of the EvaluationSpec for
	// the flag. DEPRECATED: Use snapshot instead.
	EvaluationSpec *EvaluationSpec `json:"evaluationSpec,omitempty"`
	// Flag: Required. Immutable. Name of the Flag this is a revision of.
	Flag string `json:"flag,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/flagRevisions/{flag_revision_id}"
	Name string `json:"name,omitempty"`
	// Snapshot: Output only. Immutable. Snapshot of the Flag.
	Snapshot *Flag `json:"snapshot,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagRevision) MarshalJSON() ([]byte, error) {
	type NoMethod FlagRevision
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagRevisionList: Wrapper for a list of flag revisions.
type FlagRevisionList struct {
	// Revisions: Required. FlagRevisions to be rolled out.
	Revisions []string `json:"revisions,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Revisions") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Revisions") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagRevisionList) MarshalJSON() ([]byte, error) {
	type NoMethod FlagRevisionList
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagSetList: Wrapper for a list of flag sets.
type FlagSetList struct {
	// Sets: Required. Flag sets to be rolled out.
	Sets []string `json:"sets,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Sets") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Sets") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagSetList) MarshalJSON() ([]byte, error) {
	type NoMethod FlagSetList
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagUpdate: FlagUpdate is a UnitOperation that pushes new flag values to
// Units.
type FlagUpdate struct {
	// FlagRelease: Required. Flag release being applied by UnitOperation.
	FlagRelease string `json:"flagRelease,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FlagRelease") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FlagRelease") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagUpdate) MarshalJSON() ([]byte, error) {
	type NoMethod FlagUpdate
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// FlagVariant: Variant is an identifier for a value (name assigned to a
// value).
type FlagVariant struct {
	// BooleanValue: Optional. Boolean variant value.
	BooleanValue bool `json:"booleanValue,omitempty"`
	// Description: Optional. A human-readable description of what this variant
	// does or represents.
	Description string `json:"description,omitempty"`
	// DoubleValue: Optional. Double variant value.
	DoubleValue float64 `json:"doubleValue,omitempty"`
	// Id: Required. Variant ID. Max length: 128 bytes.
	Id string `json:"id,omitempty"`
	// IntegerValue: Optional. Integer variant value.
	IntegerValue int64 `json:"integerValue,omitempty,string"`
	// StringValue: Optional. String variant value.
	StringValue string `json:"stringValue,omitempty"`
	// TrackingId: Optional. trackingId is unique depending on name and value of
	// the variant within the scope of the service. It is typically generated by
	// the server and must not be changed. trackingId is used to uniquely identify
	// and track variants.
	TrackingId string `json:"trackingId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "BooleanValue") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "BooleanValue") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FlagVariant) MarshalJSON() ([]byte, error) {
	type NoMethod FlagVariant
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

func (s *FlagVariant) UnmarshalJSON(data []byte) error {
	type NoMethod FlagVariant
	var s1 struct {
		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
		*NoMethod
	}
	s1.NoMethod = (*NoMethod)(s)
	if err := json.Unmarshal(data, &s1); err != nil {
		return err
	}
	s.DoubleValue = float64(s1.DoubleValue)
	return nil
}

// FromMapping: Output variables whose values will be passed on to dependencies
type FromMapping struct {
	// Dependency: Required. Alias of the dependency that the outputVariable will
	// pass its value to
	Dependency string `json:"dependency,omitempty"`
	// OutputVariable: Required. Name of the outputVariable on the dependency
	OutputVariable string `json:"outputVariable,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Dependency") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Dependency") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s FromMapping) MarshalJSON() ([]byte, error) {
	type NoMethod FromMapping
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// GoogleCloudLocationLocation: A resource that represents a Google Cloud
// location.
type GoogleCloudLocationLocation struct {
	// DisplayName: The friendly name for this location, typically a nearby city
	// name. For example, "Tokyo".
	DisplayName string `json:"displayName,omitempty"`
	// Labels: Cross-service attributes for the location. For example
	// {"cloud.googleapis.com/region": "us-east1"}
	Labels map[string]string `json:"labels,omitempty"`
	// LocationId: The canonical id for this location. For example: "us-east1".
	LocationId string `json:"locationId,omitempty"`
	// Metadata: Service-specific metadata. For example the available capacity at
	// the given location.
	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
	// Name: Resource name for the location, which may vary between
	// implementations. For example:
	// "projects/example-project/locations/us-east1"
	Name string `json:"name,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DisplayName") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) {
	type NoMethod GoogleCloudLocationLocation
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListFlagAttributesResponse: The response structure for the
// ListFlagAttributes method.
type ListFlagAttributesResponse struct {
	// FlagAttributes: The resulting flag attributes.
	FlagAttributes []*FlagAttribute `json:"flagAttributes,omitempty"`
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListFlagAttributes call to list the next page. If empty, there
	// are no more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "FlagAttributes") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FlagAttributes") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListFlagAttributesResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListFlagAttributesResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListFlagReleasesResponse: The response structure for the ListFlagReleases
// method.
type ListFlagReleasesResponse struct {
	// FlagReleases: The resulting flag releases.
	FlagReleases []*FlagRelease `json:"flagReleases,omitempty"`
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListFlagReleases call to list the next page. If empty, there are
	// no more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "FlagReleases") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FlagReleases") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListFlagReleasesResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListFlagReleasesResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListFlagRevisionsResponse: The response structure for the ListFlagRevisions
// method.
type ListFlagRevisionsResponse struct {
	// FlagRevisions: The resulting flag revisions.
	FlagRevisions []*FlagRevision `json:"flagRevisions,omitempty"`
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListFlagRevisions call to list the next page. If empty, there are
	// no more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "FlagRevisions") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FlagRevisions") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListFlagRevisionsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListFlagRevisionsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListFlagsResponse: The response structure for the ListFlags method.
type ListFlagsResponse struct {
	// Flags: The resulting flags.
	Flags []*Flag `json:"flags,omitempty"`
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListFlags call to list the next page. If empty, there are no more
	// pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Flags") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Flags") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListFlagsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListFlagsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListLocationsResponse: The response message for Locations.ListLocations.
type ListLocationsResponse struct {
	// Locations: A list of locations that matches the specified filter in the
	// request.
	Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"`
	// NextPageToken: The standard List next-page token.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Locations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Locations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListLocationsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListReleasesResponse: The response structure for the ListReleases method.
type ListReleasesResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListReleases call to list the next page. If empty, there are no
	// more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Releases: The resulting releases.
	Releases []*Release `json:"releases,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListReleasesResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListReleasesResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListRolloutKindsResponse: The response structure for the ListRolloutKinds
// method.
type ListRolloutKindsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListRolloutKinds call to list the next page. If empty, there are
	// no more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// RolloutKinds: The resulting rollout kinds.
	RolloutKinds []*RolloutKind `json:"rolloutKinds,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListRolloutKindsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListRolloutKindsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListRolloutsResponse: The response structure for the ListRollouts method.
type ListRolloutsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListRollouts call to list the next page. If empty, there are no
	// more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Rollouts: The resulting rollouts.
	Rollouts []*Rollout `json:"rollouts,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListRolloutsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListRolloutsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListSaasResponse: The response structure for the ListSaas method.
type ListSaasResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListSaas call to list the next page. If empty, there are no more
	// pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Saas: The resulting saas.
	Saas []*Saas `json:"saas,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListSaasResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListSaasResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListTenantsResponse: The response structure for the ListTenants method.
type ListTenantsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListTenants call to list the next page. If empty, there are no
	// more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Tenants: The resulting tenants.
	Tenants []*Tenant `json:"tenants,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListTenantsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListTenantsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListUnitKindsResponse: The response structure for the ListUnitKinds method.
type ListUnitKindsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListUnitKinds call to list the next page. If empty, there are no
	// more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// UnitKinds: The resulting unit kinds.
	UnitKinds []*UnitKind `json:"unitKinds,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListUnitKindsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListUnitKindsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListUnitOperationsResponse: The response structure for the
// ListUnitOperations method.
type ListUnitOperationsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListUnitOperations call to list the next page. If empty, there
	// are no more pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// UnitOperations: The resulting unit operations.
	UnitOperations []*UnitOperation `json:"unitOperations,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListUnitOperationsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListUnitOperationsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ListUnitsResponse: The response structure for the ListUnits method.
type ListUnitsResponse struct {
	// NextPageToken: If present, the next page token can be provided to a
	// subsequent ListUnits call to list the next page. If empty, there are no more
	// pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Units: The resulting units.
	Units []*Unit `json:"units,omitempty"`
	// Unreachable: Locations that could not be reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ListUnitsResponse) MarshalJSON() ([]byte, error) {
	type NoMethod ListUnitsResponse
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Location: Location information that the service is available in.
type Location struct {
	// Name: Optional. Name of location.
	Name string `json:"name,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Name") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Location) MarshalJSON() ([]byte, error) {
	type NoMethod Location
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// MaintenanceSettings: Captures requested directives for performing future
// maintenance on the unit. This includes a request for the unit to skip
// maintenance for a period of time and remain pinned to its current release as
// well as controls for postponing maintenance scheduled in future.
type MaintenanceSettings struct {
	// PinnedUntilTime: Optional. If present, it fixes the release on the unit
	// until the given time; i.e. changes to the release field will be rejected.
	// Rollouts should and will also respect this by not requesting an upgrade in
	// the first place.
	PinnedUntilTime string `json:"pinnedUntilTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "PinnedUntilTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "PinnedUntilTime") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s MaintenanceSettings) MarshalJSON() ([]byte, error) {
	type NoMethod MaintenanceSettings
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Provision: Provision is the unit operation that provision the underlying
// resources represented by a Unit. Can only execute if the Unit is not
// currently provisioned.
type Provision struct {
	// InputVariables: Optional. Set of input variables. Maximum 100. (optional)
	InputVariables []*UnitVariable `json:"inputVariables,omitempty"`
	// Release: Optional. Reference to the Release object to use for the Unit.
	// (optional).
	Release string `json:"release,omitempty"`
	// ForceSendFields is a list of field names (e.g. "InputVariables") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "InputVariables") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Provision) MarshalJSON() ([]byte, error) {
	type NoMethod Provision
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Release: A new version to be propagated and deployed to units. This includes
// pointers to packaged blueprints for actuation (e.g Helm or Terraform
// configuration packages) via artifact registry.
type Release struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// ApplicationTemplateComponent: Output only. Reference to component and
	// revision in a composite ApplicationTemplate.
	ApplicationTemplateComponent *ComponentRef `json:"applicationTemplateComponent,omitempty"`
	// Blueprint: Optional. Blueprints are OCI Images that contain all of the
	// artifacts needed to provision a unit.
	Blueprint *Blueprint `json:"blueprint,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// InputVariableDefaults: Optional. Mapping of input variables to default
	// values. Maximum 100
	InputVariableDefaults []*UnitVariable `json:"inputVariableDefaults,omitempty"`
	// InputVariables: Optional. Output only. List of input variables declared on
	// the blueprint and can be present with their values on the unit spec
	InputVariables []*UnitVariable `json:"inputVariables,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/releases/{release}"
	Name string `json:"name,omitempty"`
	// OutputVariables: Optional. Output only. List of output variables declared on
	// the blueprint and can be present with their values on the unit status
	OutputVariables []*UnitVariable `json:"outputVariables,omitempty"`
	// ReleaseRequirements: Optional. Set of requirements to be fulfilled on the
	// Unit when using this Release.
	ReleaseRequirements *ReleaseRequirements `json:"releaseRequirements,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitKind: Required. Immutable. Reference to the UnitKind this Release
	// corresponds to (required and immutable once created).
	UnitKind string `json:"unitKind,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Release) MarshalJSON() ([]byte, error) {
	type NoMethod Release
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ReleaseRequirements: Set of requirements to be fulfilled on the Unit when
// using this Release.
type ReleaseRequirements struct {
	// UpgradeableFromReleases: Optional. A list of releases from which a unit can
	// be upgraded to this one (optional). If left empty no constraints will be
	// applied. When provided, unit upgrade requests to this release will check and
	// enforce this constraint.
	UpgradeableFromReleases []string `json:"upgradeableFromReleases,omitempty"`
	// ForceSendFields is a list of field names (e.g. "UpgradeableFromReleases") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "UpgradeableFromReleases") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ReleaseRequirements) MarshalJSON() ([]byte, error) {
	type NoMethod ReleaseRequirements
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Rollout: Represents a single rollout execution and its results
type Rollout struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// Control: Optional. Requested change to the execution of this rollout.
	// Default RolloutControl.action is ROLLOUT_ACTION_RUN meaning the rollout will
	// be executed to completion while progressing through all natural Rollout
	// States (such as RUNNING -> SUCCEEDED or RUNNING -> FAILED). Requests can
	// only be made when the Rollout is in a non-terminal state.
	Control *RolloutControl `json:"control,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// DeleteTime: Output only. The timestamp when the resource was marked for
	// deletion (deletion is an asynchronous operation).
	DeleteTime string `json:"deleteTime,omitempty"`
	// EffectiveUnitFilter: Optional. Output only. Output only snapshot of the
	// effective unit filter at Rollout start time. Contains a
	// CEL(https://github.com/google/cel-spec) expression consisting of a
	// conjunction of Rollout.unit_filter and RolloutKind.unit_filter. This field
	// captures the filter applied by the Rollout to determine the Unit population.
	// If the associated RolloutKind's unit_filter is modified after the rollout is
	// started, it will not be updated here.
	EffectiveUnitFilter string `json:"effectiveUnitFilter,omitempty"`
	// EndTime: Optional. Output only. The time when the rollout finished execution
	// (regardless of success, failure, or cancellation). Will be empty if the
	// rollout hasn't finished yet. Once set, the rollout is in terminal state and
	// all the results are final.
	EndTime string `json:"endTime,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// FlagRelease: Optional. Immutable. Name of the FlagRelease to be rolled out
	// to the target Units. Release and FlagRelease are mutually exclusive. Note:
	// `release` comment needs to be adjusted to mention that "Release and
	// FlagRelease are mutually exclusive" when visibility restriction will be
	// lifted.
	FlagRelease string `json:"flagRelease,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/rollout/{rollout_id}"
	Name string `json:"name,omitempty"`
	// ParentRollout: Optional. Output only. The direct parent rollout that this
	// rollout is stemming from. The resource name (full URI of the resource)
	// following the standard naming scheme:
	// "projects/{project}/locations/{location}/rollouts/{rollout_id}"
	ParentRollout string `json:"parentRollout,omitempty"`
	// Release: Optional. Immutable. Name of the Release that gets rolled out to
	// target Units. Required if no other type of release is specified.
	Release string `json:"release,omitempty"`
	// RolloutKind: Required. Immutable. Name of the RolloutKind this rollout is
	// stemming from and adhering to.
	RolloutKind string `json:"rolloutKind,omitempty"`
	// RolloutOrchestrationStrategy: Optional. The strategy used for executing this
	// Rollout. This strategy will override whatever strategy is specified in the
	// RolloutKind. If not specified on creation, the strategy from RolloutKind
	// will be used. There are two supported values strategies which are used to
	// control - "Google.Cloud.Simple.AllAtOnce" -
	// "Google.Cloud.Simple.OneLocationAtATime" A rollout with one of these simple
	// strategies will rollout across all locations defined in the targeted
	// UnitKind's Saas Locations.
	RolloutOrchestrationStrategy string `json:"rolloutOrchestrationStrategy,omitempty"`
	// RootRollout: Optional. Output only. The root rollout that this rollout is
	// stemming from. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/rollouts/{rollout_id}"
	RootRollout string `json:"rootRollout,omitempty"`
	// StartTime: Optional. Output only. The time when the rollout started
	// executing. Will be empty if the rollout hasn't started yet.
	StartTime string `json:"startTime,omitempty"`
	// State: Output only. Current state of the rollout.
	//
	// Possible values:
	//   "ROLLOUT_STATE_UNSPECIFIED" - Unspecified state.
	//   "ROLLOUT_STATE_RUNNING" - Rollout is in progress.
	//   "ROLLOUT_STATE_PAUSED" - Rollout has been paused.
	//   "ROLLOUT_STATE_SUCCEEDED" - Rollout completed successfully.
	//   "ROLLOUT_STATE_FAILED" - Rollout has failed.
	//   "ROLLOUT_STATE_CANCELLED" - Rollout has been canceled.
	//   "ROLLOUT_STATE_WAITING" - Rollout is waiting for some condition to be met
	// before starting.
	//   "ROLLOUT_STATE_CANCELLING" - Rollout is being canceled.
	//   "ROLLOUT_STATE_RESUMING" - Rollout is being resumed.
	//   "ROLLOUT_STATE_PAUSING" - Rollout is being paused.
	State string `json:"state,omitempty"`
	// StateMessage: Output only. Human readable message indicating details about
	// the last state transition.
	StateMessage string `json:"stateMessage,omitempty"`
	// StateTransitionTime: Optional. Output only. The time when the rollout
	// transitioned into its current state.
	StateTransitionTime string `json:"stateTransitionTime,omitempty"`
	// Stats: Optional. Output only. Details about the progress of the rollout.
	Stats *RolloutStats `json:"stats,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitFilter: Optional. CEL(https://github.com/google/cel-spec) formatted
	// filter string against Unit. The filter will be applied to determine the
	// eligible unit population. This filter can only reduce, but not expand the
	// scope of the rollout. If not provided, the unit_filter from the RolloutKind
	// will be used.
	UnitFilter string `json:"unitFilter,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Rollout) MarshalJSON() ([]byte, error) {
	type NoMethod Rollout
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// RolloutControl: RolloutControl provides a way to request a change to the
// execution of a Rollout by pausing or canceling it.
type RolloutControl struct {
	// Action: Required. Action to be performed on the Rollout. The default
	// behavior is to run the rollout until it naturally reaches a terminal state.
	//
	// Possible values:
	//   "ROLLOUT_ACTION_UNSPECIFIED" - Unspecified action, will be treated as RUN
	// by default.
	//   "ROLLOUT_ACTION_RUN" - Run the Rollout until it naturally reaches a
	// terminal state. A rollout requested to run will progress through all natural
	// Rollout States (such as RUNNING -> SUCCEEDED or RUNNING -> FAILED). If
	// retriable errors are encountered during the rollout, the rollout will paused
	// by default and can be resumed by re-requesting this RUN action.
	//   "ROLLOUT_ACTION_PAUSE" - Pause the Rollout until it is resumed (i.e. RUN
	// is requested).
	//   "ROLLOUT_ACTION_CANCEL" - Cancel the Rollout permanently.
	Action string `json:"action,omitempty"`
	// RunParams: Optional. Parameters for the RUN action. It is an error to
	// specify this if the RolloutAction is not set to RUN. By default, the rollout
	// will retry failed operations when resumed.
	RunParams *RunRolloutActionParams `json:"runParams,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Action") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s RolloutControl) MarshalJSON() ([]byte, error) {
	type NoMethod RolloutControl
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// RolloutKind: An object that describes various settings of Rollout execution.
// Includes built-in policies across GCP and GDC, and customizable policies.
type RolloutKind struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// ErrorBudget: Optional. The configuration for error budget. If the number of
	// failed units exceeds max(allowed_count, allowed_ratio * total_units), the
	// rollout will be paused. If not set, all units will be attempted to be
	// updated regardless of the number of failures encountered.
	ErrorBudget *ErrorBudget `json:"errorBudget,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}"
	Name string `json:"name,omitempty"`
	// RolloutOrchestrationStrategy: Optional. The strategy used for executing a
	// Rollout. This is a required field. There are two supported values strategies
	// which are used to control - "Google.Cloud.Simple.AllAtOnce" -
	// "Google.Cloud.Simple.OneLocationAtATime" A rollout with one of these simple
	// strategies will rollout across all locations defined in the associated
	// UnitKind's Saas Locations.
	RolloutOrchestrationStrategy string `json:"rolloutOrchestrationStrategy,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitFilter: Optional. CEL(https://github.com/google/cel-spec) formatted
	// filter string against Unit. The filter will be applied to determine the
	// eligible unit population. This filter can only reduce, but not expand the
	// scope of the rollout.
	UnitFilter string `json:"unitFilter,omitempty"`
	// UnitKind: Required. Immutable. UnitKind that this rollout kind corresponds
	// to. Rollouts stemming from this rollout kind will target the units of this
	// unit kind. In other words, this defines the population of target units to be
	// upgraded by rollouts.
	UnitKind string `json:"unitKind,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`
	// UpdateUnitKindStrategy: Optional. The config for updating the unit kind. By
	// default, the unit kind will be updated on the rollout start.
	//
	// Possible values:
	//   "UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED" - Strategy unspecified.
	//   "UPDATE_UNIT_KIND_STRATEGY_ON_START" - Update the unit kind strategy on
	// the rollout start.
	//   "UPDATE_UNIT_KIND_STRATEGY_NEVER" - Never update the unit kind.
	UpdateUnitKindStrategy string `json:"updateUnitKindStrategy,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s RolloutKind) MarshalJSON() ([]byte, error) {
	type NoMethod RolloutKind
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// RolloutStats: RolloutStats contains information about the progress of a
// rollout.
type RolloutStats struct {
	// EstimatedTotalUnitCount: Optional. Output only. Estimated number of units
	// based. The estimation is computed upon creation of the rollout.
	EstimatedTotalUnitCount int64 `json:"estimatedTotalUnitCount,omitempty,string"`
	// OperationsByState: Optional. Output only. Unordered list. A breakdown of the
	// progress of operations triggered by the rollout. Provides a count of
	// Operations by their state. This can be used to determine the number of units
	// which have been updated, or are scheduled to be updated. There will be at
	// most one entry per group. Possible values for operation groups are: -
	// "SCHEDULED" - "PENDING" - "RUNNING" - "SUCCEEDED" - "FAILED" - "CANCELLED"
	OperationsByState []*Aggregate `json:"operationsByState,omitempty"`
	// ForceSendFields is a list of field names (e.g. "EstimatedTotalUnitCount") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "EstimatedTotalUnitCount") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s RolloutStats) MarshalJSON() ([]byte, error) {
	type NoMethod RolloutStats
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// RunRolloutActionParams: Parameters for the RUN action controlling the
// behavior of the rollout when it is resumed from a PAUSED state.
type RunRolloutActionParams struct {
	// RetryFailedOperations: Required. If true, the rollout will retry failed
	// operations when resumed. This is applicable only the current state of the
	// Rollout is PAUSED and the requested action is RUN.
	RetryFailedOperations bool `json:"retryFailedOperations,omitempty"`
	// ForceSendFields is a list of field names (e.g. "RetryFailedOperations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "RetryFailedOperations") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s RunRolloutActionParams) MarshalJSON() ([]byte, error) {
	type NoMethod RunRolloutActionParams
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Saas: Saas is a representation of a SaaS service managed by the Producer.
type Saas struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// ApplicationTemplate: Reference to composite ApplicationTemplate. When
	// specified, the template components will be imported into their equivalent
	// UnitKind, Release and Blueprint resources. Deleted references will not
	// delete imported resources. Should only be specified on source regions, and
	// be unspecified on replica regions.
	ApplicationTemplate *CompositeRef `json:"applicationTemplate,omitempty"`
	// BlueprintRepo: Output only. Name of repository in Artifact Registry for
	// system-generated Blueprints, eg. Blueprints of imported
	// ApplicationTemplates.
	BlueprintRepo string `json:"blueprintRepo,omitempty"`
	// Conditions: Output only. A set of conditions which indicate the various
	// conditions this resource can have.
	Conditions []*SaasCondition `json:"conditions,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Error: Output only. If the state is FAILED, the corresponding error code and
	// message. Defaults to code=OK for all other states.
	Error *Status `json:"error,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Locations: Optional. List of locations that the service is available in.
	// Rollout refers to the list to generate a rollout plan.
	Locations []*Location `json:"locations,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/saas/{saas}"
	Name string `json:"name,omitempty"`
	// State: Output only. State of the Saas. It is always in ACTIVE state if the
	// application_template is empty.
	//
	// Possible values:
	//   "STATE_TYPE_UNSPECIFIED" - State type is unspecified.
	//   "STATE_ACTIVE" - The Saas is ready
	//   "STATE_RUNNING" - In the process of importing, synchronizing or
	// replicating ApplicationTemplates
	//   "STATE_FAILED" - Failure during process of importing, synchronizing or
	// replicating ApplicationTemplate processing
	//   "ACTIVE" - Deprecated: Use STATE_ACTIVE.
	//   "RUNNING" - Deprecated: Use STATE_RUNNING.
	//   "FAILED" - Deprecated: Use STATE_FAILED.
	State string `json:"state,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Saas) MarshalJSON() ([]byte, error) {
	type NoMethod Saas
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// SaasCondition: SaasCondition describes the status of a Saas.
type SaasCondition struct {
	// LastTransitionTime: Required. Last time the condition transited from one
	// status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// Message: Required. Human readable message indicating details about the last
	// transition.
	Message string `json:"message,omitempty"`
	// Reason: Required. Brief reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Status: Required. Status of the condition.
	//
	// Possible values:
	//   "STATUS_UNSPECIFIED" - Condition status is unspecified.
	//   "STATUS_UNKNOWN" - Condition is unknown.
	//   "STATUS_TRUE" - Condition is true.
	//   "STATUS_FALSE" - Condition is false.
	Status string `json:"status,omitempty"`
	// Type: Required. Type of the condition.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Condition type is unspecified.
	//   "TYPE_READY" - Condition type is ready.
	//   "TYPE_SYNCHRONIZED" - Condition type is synchronized.
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "LastTransitionTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "LastTransitionTime") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s SaasCondition) MarshalJSON() ([]byte, error) {
	type NoMethod SaasCondition
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Schedule: A time specification to schedule the maintenance.
type Schedule struct {
	// StartTime: Optional. Start of operation. If not set, will be set to the
	// start of the next window. (optional)
	StartTime string `json:"startTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "StartTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "StartTime") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Schedule) MarshalJSON() ([]byte, error) {
	type NoMethod Schedule
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Scope: Scope of an application.
type Scope struct {
	// Type: Required. Scope Type.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Unspecified type.
	//   "TYPE_REGIONAL" - Regional type.
	//   "TYPE_GLOBAL" - Global type.
	//   "REGIONAL" - Deprecated: Use TYPE_REGIONAL.
	//   "GLOBAL" - Deprecated: Use TYPE_GLOBAL.
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Type") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Scope) MarshalJSON() ([]byte, error) {
	type NoMethod Scope
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Status: The `Status` type defines a logical error model that is suitable for
// different programming environments, including REST APIs and RPC APIs. It is
// used by gRPC (https://github.com/grpc). Each `Status` message contains three
// pieces of data: error code, error message, and error details. You can find
// out more about this error model and how to work with it in the API Design
// Guide (https://cloud.google.com/apis/design/errors).
type Status struct {
	// Code: The status code, which should be an enum value of google.rpc.Code.
	Code int64 `json:"code,omitempty"`
	// Details: A list of messages that carry the error details. There is a common
	// set of message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`
	// Message: A developer-facing error message, which should be in English. Any
	// user-facing error message should be localized and sent in the
	// google.rpc.Status.details field, or localized by the client.
	Message string `json:"message,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Code") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Status) MarshalJSON() ([]byte, error) {
	type NoMethod Status
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Tenant: Tenant represents the service producer side of an instance of the
// service created based on a request from a consumer. In a typical scenario a
// Tenant has a one-to-one mapping with a resource given out to a service
// consumer. Example: tenant: name:
// "projects/svc1/locations/loc/tenants/inst-068afff8" consumer_resource:
// "projects/gshoe/locations/loc/shoes/black-shoe"
type Tenant struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// ConsumerResource: Optional. Immutable. A reference to the consumer resource
	// this SaaS Tenant is representing. The relationship with a consumer resource
	// can be used by App Lifecycle Manager for retrieving consumer-defined
	// settings and policies such as maintenance policies (using Unified
	// Maintenance Policy API).
	ConsumerResource string `json:"consumerResource,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/tenants/{tenant}"
	Name string `json:"name,omitempty"`
	// Saas: Required. Immutable. A reference to the Saas that defines the product
	// (managed service) that the producer wants to manage with App Lifecycle
	// Manager. Part of the App Lifecycle Manager common data model.
	Saas string `json:"saas,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Tenant) MarshalJSON() ([]byte, error) {
	type NoMethod Tenant
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// ToMapping: Input variables whose values will be passed on to dependencies
type ToMapping struct {
	// Dependency: Required. Alias of the dependency that the inputVariable will
	// pass its value to
	Dependency string `json:"dependency,omitempty"`
	// IgnoreForLookup: Optional. Tells App Lifecycle Manager if this mapping
	// should be used during lookup or not
	IgnoreForLookup bool `json:"ignoreForLookup,omitempty"`
	// InputVariable: Required. Name of the inputVariable on the dependency
	InputVariable string `json:"inputVariable,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Dependency") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Dependency") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s ToMapping) MarshalJSON() ([]byte, error) {
	type NoMethod ToMapping
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Unit: A unit of deployment that has its lifecycle via a CRUD API using an
// actuation engine under the hood (e.g. based on Terraform, Helm or a custom
// implementation provided by a service producer). A building block of a SaaS
// Tenant.
type Unit struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// Application: Optional. Reference to the AppHub Application this unit belongs
	// to. All resources deployed in this Unit will be associated with the
	// specified Application.
	Application string `json:"application,omitempty"`
	// Conditions: Optional. Output only. A set of conditions which indicate the
	// various conditions this resource can have.
	Conditions []*UnitCondition `json:"conditions,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// Dependencies: Optional. Output only. Set of dependencies for this unit.
	// Maximum 10.
	Dependencies []*UnitDependency `json:"dependencies,omitempty"`
	// Dependents: Optional. Output only. List of Units that depend on this unit.
	// Unit can only be deprovisioned if this list is empty. Maximum 1000.
	Dependents []*UnitDependency `json:"dependents,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// FlagConfigName: Output only. This field stores the unique identifier for the
	// flag configuration to be used by this Unit.
	FlagConfigName string `json:"flagConfigName,omitempty"`
	// FlagRevisions: Optional. Output only. Flag revisions used by this Unit.
	FlagRevisions []string `json:"flagRevisions,omitempty"`
	// InputVariables: Optional. Output only. Indicates the current input variables
	// deployed by the unit
	InputVariables []*UnitVariable `json:"inputVariables,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Maintenance: Optional. Captures requested directives for performing future
	// maintenance on the unit. This includes a request for the unit to skip
	// maintenance for a period of time and remain pinned to its current release as
	// well as controls for postponing maintenance scheduled in future.
	Maintenance *MaintenanceSettings `json:"maintenance,omitempty"`
	// ManagementMode: Optional. Immutable. Indicates whether the Unit life cycle
	// is controlled by the user or by the system. Immutable once created.
	//
	// Possible values:
	//   "MANAGEMENT_MODE_UNSPECIFIED"
	//   "MANAGEMENT_MODE_USER" - Unit's lifecycle is managed by the user.
	//   "MANAGEMENT_MODE_SYSTEM" - The system will decide when to deprovision and
	// delete the unit. User still can deprovision or delete the unit manually.
	ManagementMode string `json:"managementMode,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/units/{unit}"
	Name string `json:"name,omitempty"`
	// OngoingOperations: Optional. Output only. List of concurrent UnitOperations
	// that are operating on this Unit.
	OngoingOperations []string `json:"ongoingOperations,omitempty"`
	// OutputVariables: Optional. Output only. Set of key/value pairs corresponding
	// to output variables from execution of actuation templates. The variables are
	// declared in actuation configs (e.g in helm chart or terraform) and the
	// values are fetched and returned by the actuation engine upon completion of
	// execution.
	OutputVariables []*UnitVariable `json:"outputVariables,omitempty"`
	// PendingOperations: Optional. Output only. List of pending (wait to be
	// executed) UnitOperations for this unit.
	PendingOperations []string `json:"pendingOperations,omitempty"`
	// Release: Optional. Output only. The current Release object for this Unit.
	Release string `json:"release,omitempty"`
	// SatisfiesPzi: Output only. Reserved for future use.
	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
	// SatisfiesPzs: Output only. Indicates whether the resource location satisfies
	// Zone Separation constraints. This is false by default.
	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
	// ScheduledOperations: Optional. Output only. List of scheduled UnitOperations
	// for this unit.
	ScheduledOperations []string `json:"scheduledOperations,omitempty"`
	// State: Optional. Output only. Current lifecycle state of the resource (e.g.
	// if it's being created or ready to use).
	//
	// Possible values:
	//   "UNIT_STATE_UNSPECIFIED" - Unspecified state.
	//   "UNIT_STATE_NOT_PROVISIONED" - Unit is not provisioned.
	//   "UNIT_STATE_PROVISIONING" - Unit is being provisioned.
	//   "UNIT_STATE_UPDATING" - Unit is being updated. This is typically when a
	// unit is being upgraded to a new release or some of the input variables on
	// the Unit is being changed. Certain kinds of updates may cause the Unit to
	// become unusable while the update is in progress.
	//   "UNIT_STATE_DEPROVISIONING" - Unit is being deleted.
	//   "UNIT_STATE_READY" - Unit has been provisioned and is ready for use
	//   "UNIT_STATE_ERROR" - Unit has error, when it is not ready and some error
	// operation
	State string `json:"state,omitempty"`
	// SystemCleanupAt: Optional. Output only. If set, indicates the time when the
	// system will start removing the unit.
	SystemCleanupAt string `json:"systemCleanupAt,omitempty"`
	// SystemManagedState: Optional. Output only. Indicates the system managed
	// state of the unit.
	//
	// Possible values:
	//   "SYSTEM_MANAGED_STATE_UNSPECIFIED"
	//   "SYSTEM_MANAGED_STATE_ACTIVE" - Unit has dependents attached.
	//   "SYSTEM_MANAGED_STATE_INACTIVE" - Unit has no dependencies attached, but
	// attachment is allowed.
	//   "SYSTEM_MANAGED_STATE_DECOMMISSIONED" - Unit has no dependencies attached,
	// and attachment is not allowed.
	SystemManagedState string `json:"systemManagedState,omitempty"`
	// Tenant: Optional. Reference to the Saas Tenant resource this unit belongs
	// to. This for example informs the maintenance policies to use for scheduling
	// future updates on a unit. (optional and immutable once created)
	Tenant string `json:"tenant,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UnitKind: Optional. Reference to the UnitKind this Unit belongs to.
	// Immutable once set.
	UnitKind string `json:"unitKind,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Unit) MarshalJSON() ([]byte, error) {
	type NoMethod Unit
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitCondition: UnitCondition describes the status of an Unit. UnitCondition
// is individual components that contribute to an overall state.
type UnitCondition struct {
	// LastTransitionTime: Required. Last time the condition transited from one
	// status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// Message: Required. Human readable message indicating details about the last
	// transition.
	Message string `json:"message,omitempty"`
	// Reason: Required. Brief reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Status: Required. Status of the condition.
	//
	// Possible values:
	//   "STATUS_UNSPECIFIED" - Condition status is unspecified.
	//   "STATUS_UNKNOWN" - Condition is unknown.
	//   "STATUS_TRUE" - Condition is true.
	//   "STATUS_FALSE" - Condition is false.
	Status string `json:"status,omitempty"`
	// Type: Required. Type of the condition.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Condition type is unspecified.
	//   "TYPE_READY" - Condition type is ready.
	//   "TYPE_UPDATING" - Condition type is updating.
	//   "TYPE_PROVISIONED" - Condition type is provisioned.
	//   "TYPE_OPERATION_ERROR" - Condition type is operationError. True when the
	// last unit operation fails with a non-ignorable error.
	//   "TYPE_FLAGS_CONFIG_INITIALIZED" - Condition type is
	// flagsConfigInitialized. True when the flags configuration is synchronized
	// and ready to be served.
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "LastTransitionTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "LastTransitionTime") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitCondition) MarshalJSON() ([]byte, error) {
	type NoMethod UnitCondition
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitDependency: Set of dependencies for this unit. Maximum 10.
type UnitDependency struct {
	// Alias: Output only. Alias for the name of the dependency.
	Alias string `json:"alias,omitempty"`
	// Unit: Output only. A reference to the Unit object.
	Unit string `json:"unit,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Alias") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Alias") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitDependency) MarshalJSON() ([]byte, error) {
	type NoMethod UnitDependency
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitKind: Definition of a Unit. Units belonging to the same UnitKind are
// managed together; for example they follow the same release model
// (blueprints, versions etc.) and are typically rolled out together.
type UnitKind struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// AppParams: AppParams contains the parameters for creating an AppHub
	// Application.
	AppParams *AppParams `json:"appParams,omitempty"`
	// ApplicationTemplateComponent: Output only. Reference to component and
	// revision in a composite ApplicationTemplate.
	ApplicationTemplateComponent *ComponentRef `json:"applicationTemplateComponent,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// DefaultFlagRevisions: Optional. Default revisions of flags for this
	// UnitKind. Newly created units will use the flag default_flag_revisions
	// present at the time of creation.
	DefaultFlagRevisions []string `json:"defaultFlagRevisions,omitempty"`
	// DefaultRelease: Optional. A reference to the Release object to use as
	// default for creating new units of this UnitKind (optional). If not
	// specified, a new unit must explicitly reference which release to use for its
	// creation.
	DefaultRelease string `json:"defaultRelease,omitempty"`
	// Dependencies: Optional. Immutable. List of other unit kinds that this
	// release will depend on. Dependencies will be automatically provisioned if
	// not found. Maximum 10.
	Dependencies []*Dependency `json:"dependencies,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag string `json:"etag,omitempty"`
	// InputVariableMappings: Optional. List of inputVariables for this release
	// that will either be retrieved from a dependency’s outputVariables, or will
	// be passed on to a dependency’s inputVariables. Maximum 100.
	InputVariableMappings []*VariableMapping `json:"inputVariableMappings,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/unitKinds/{unitKind}"
	Name string `json:"name,omitempty"`
	// OutputVariableMappings: Optional. List of outputVariables for this unit kind
	// will be passed to this unit's outputVariables. Maximum 100.
	OutputVariableMappings []*VariableMapping `json:"outputVariableMappings,omitempty"`
	// Saas: Required. Immutable. A reference to the Saas that defines the product
	// (managed service) that the producer wants to manage with App Lifecycle
	// Manager. Part of the App Lifecycle Manager common data model. Immutable once
	// set.
	Saas string `json:"saas,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitKind) MarshalJSON() ([]byte, error) {
	type NoMethod UnitKind
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitOperation: UnitOperation encapsulates the intent of changing/interacting
// with the service component represented by the specific Unit. Multiple
// UnitOperations can be created (requested) and scheduled in the future,
// however only one will be allowed to execute at a time (that can change in
// the future for non-mutating operations). UnitOperations allow different
// actors interacting with the same unit to focus only on the change they have
// requested. This is a base object that contains the common fields in all unit
// operations. Next: 22
type UnitOperation struct {
	// Annotations: Optional. Annotations is an unstructured key-value map stored
	// with a resource that may be set by external tools to store and retrieve
	// arbitrary metadata. They are not queryable and should be preserved when
	// modifying objects. More info:
	// https://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
	// Cancel: Optional. When true, attempt to cancel the operation. Cancellation
	// may fail if the operation is already executing. (Optional)
	Cancel bool `json:"cancel,omitempty"`
	// Conditions: Optional. Output only. A set of conditions which indicate the
	// various conditions this resource can have.
	Conditions []*UnitOperationCondition `json:"conditions,omitempty"`
	// CreateTime: Output only. The timestamp when the resource was created.
	CreateTime string `json:"createTime,omitempty"`
	// DeleteTime: Output only. The timestamp when the resource was marked for
	// deletion (deletion is an asynchronous operation).
	DeleteTime  string       `json:"deleteTime,omitempty"`
	Deprovision *Deprovision `json:"deprovision,omitempty"`
	// EngineState: Optional. Output only. The engine state for on-going deployment
	// engine operation(s). This field is opaque for external usage.
	EngineState string `json:"engineState,omitempty"`
	// ErrorCategory: Optional. Output only. UnitOperationErrorCategory describe
	// the error category.
	//
	// Possible values:
	//   "UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED" - Unit operation error
	// category is unspecified
	//   "NOT_APPLICABLE" - Unit operation error category is not applicable, or it
	// is not an error
	//   "FATAL" - Unit operation error category is fatal
	//   "RETRIABLE" - Unit operation error category is retriable
	//   "IGNORABLE" - Unit operation error category is ignorable
	//   "STANDARD" - Unit operation error category is standard, counts towards
	// Rollout error budget
	ErrorCategory string `json:"errorCategory,omitempty"`
	// Etag: Output only. An opaque value that uniquely identifies a version or
	// generation of a resource. It can be used to confirm that the client and
	// server agree on the ordering of a resource being written.
	Etag       string      `json:"etag,omitempty"`
	FlagUpdate *FlagUpdate `json:"flagUpdate,omitempty"`
	// Labels: Optional. The labels on the resource, which can be used for
	// categorization. similar to Kubernetes resource labels.
	Labels map[string]string `json:"labels,omitempty"`
	// Name: Identifier. The resource name (full URI of the resource) following the
	// standard naming scheme:
	// "projects/{project}/locations/{location}/unitOperations/{unitOperation}"
	Name string `json:"name,omitempty"`
	// ParentUnitOperation: Optional. Reference to parent resource: UnitOperation.
	// If an operation needs to create other operations as part of its workflow,
	// each of the child operations should have this field set to the parent. This
	// can be used for tracing. (Optional)
	ParentUnitOperation string     `json:"parentUnitOperation,omitempty"`
	Provision           *Provision `json:"provision,omitempty"`
	// Rollout: Optional. Specifies which rollout created this Unit Operation. This
	// cannot be modified and is used for filtering purposes only. If a dependent
	// unit and unit operation are created as part of another unit operation, they
	// will use the same rolloutId.
	Rollout string `json:"rollout,omitempty"`
	// Schedule: Optional. When to schedule this operation.
	Schedule *Schedule `json:"schedule,omitempty"`
	// State: Optional. Output only. UnitOperationState describes the current state
	// of the unit operation.
	//
	// Possible values:
	//   "UNIT_OPERATION_STATE_UNKNOWN"
	//   "UNIT_OPERATION_STATE_PENDING" - Unit operation is accepted but not ready
	// to run.
	//   "UNIT_OPERATION_STATE_SCHEDULED" - Unit operation is accepted and
	// scheduled.
	//   "UNIT_OPERATION_STATE_RUNNING" - Unit operation is running.
	//   "UNIT_OPERATION_STATE_SUCCEEDED" - Unit operation has completed
	// successfully.
	//   "UNIT_OPERATION_STATE_FAILED" - Unit operation has failed.
	//   "UNIT_OPERATION_STATE_CANCELLED" - Unit operation was cancelled.
	State string `json:"state,omitempty"`
	// Uid: Output only. The unique identifier of the resource. UID is unique in
	// the time and space for this resource within the scope of the service. It is
	// typically generated by the server on successful creation of a resource and
	// must not be changed. UID is used to uniquely identify resources with
	// resource name reuses. This should be a UUID4.
	Uid string `json:"uid,omitempty"`
	// Unit: Required. Immutable. The Unit a given UnitOperation will act upon.
	Unit string `json:"unit,omitempty"`
	// UpdateTime: Output only. The timestamp when the resource was last updated.
	// Any change to the resource made by users must refresh this value. Changes to
	// a resource made by the service should refresh this value.
	UpdateTime string   `json:"updateTime,omitempty"`
	Upgrade    *Upgrade `json:"upgrade,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitOperation) MarshalJSON() ([]byte, error) {
	type NoMethod UnitOperation
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitOperationCondition: UnitOperationCondition describes the status of an
// Unit Operation. UnitOperationCondition is individual components that
// contribute to an overall state.
type UnitOperationCondition struct {
	// LastTransitionTime: Required. Last time the condition transited from one
	// status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// Message: Required. Human readable message indicating details about the last
	// transition.
	Message string `json:"message,omitempty"`
	// Reason: Required. Brief reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Status: Required. Status of the condition.
	//
	// Possible values:
	//   "STATUS_UNSPECIFIED" - Condition status is unspecified.
	//   "STATUS_UNKNOWN" - Condition is unknown.
	//   "STATUS_TRUE" - Condition is true.
	//   "STATUS_FALSE" - Condition is false.
	Status string `json:"status,omitempty"`
	// Type: Required. Type of the condition.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Condition type is unspecified.
	//   "TYPE_SCHEDULED" - Condition type is scheduled.
	//   "TYPE_RUNNING" - Condition type is running.
	//   "TYPE_SUCCEEDED" - Condition type is succeeded.
	//   "TYPE_CANCELLED" - Condition type is cancelled.
	//   "TYPE_APP_CREATED" - Indicates if AppHub app has been created.
	//   "TYPE_APP_COMPONENTS_REGISTERED" - Indicates if services and workloads
	// have been registered with AppHub.
	//   "TYPE_WORKLOAD_SUCCEEDED" - Indicates if the UnitOperation's core workload
	// execution completed successfully. The workload is the core execution
	// operation performed for a UnitOperation (e.g., provisioning, updating, or
	// deprovisioning resources) excluding post-operation checks.
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "LastTransitionTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "LastTransitionTime") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitOperationCondition) MarshalJSON() ([]byte, error) {
	type NoMethod UnitOperationCondition
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// UnitVariable: UnitVariable describes a parameter for a Unit.
type UnitVariable struct {
	// Type: Optional. Immutable. Name of a supported variable type. Supported
	// types are string, int, bool.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Variable type is unspecified.
	//   "STRING" - Variable type is string.
	//   "INT" - Variable type is int.
	//   "BOOL" - Variable type is bool.
	//   "STRUCT" - Variable type is struct.
	//   "LIST" - Variable type is list.
	Type string `json:"type,omitempty"`
	// Value: Optional. String encoded value for the variable.
	Value string `json:"value,omitempty"`
	// Variable: Required. Immutable. Name of the variable from actuation configs.
	Variable string `json:"variable,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Type") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s UnitVariable) MarshalJSON() ([]byte, error) {
	type NoMethod UnitVariable
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Upgrade: Upgrade is the unit operation that upgrades a provisioned unit,
// which may also include the underlying resources represented by a Unit. Can
// only execute if the Unit is currently provisioned.
type Upgrade struct {
	// InputVariables: Optional. Set of input variables. Maximum 100. (optional)
	InputVariables []*UnitVariable `json:"inputVariables,omitempty"`
	// Release: Optional. Reference to the Release object to use for the Unit.
	// (optional).
	Release string `json:"release,omitempty"`
	// ForceSendFields is a list of field names (e.g. "InputVariables") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "InputVariables") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Upgrade) MarshalJSON() ([]byte, error) {
	type NoMethod Upgrade
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// VariableMapping: Mapping of input variables to their respective output
// variable for depedenencies
type VariableMapping struct {
	// From: Optional. Output variables which will get their values from
	// dependencies
	From *FromMapping `json:"from,omitempty"`
	// To: Optional. Input variables whose values will be passed on to
	// dependencies.
	To *ToMapping `json:"to,omitempty"`
	// Variable: Required. name of the variable
	Variable string `json:"variable,omitempty"`
	// ForceSendFields is a list of field names (e.g. "From") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "From") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s VariableMapping) MarshalJSON() ([]byte, error) {
	type NoMethod VariableMapping
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

// Variant: Variant is an identifier for a value (name assigned to a value).
// DEPRECATED: Use Flag.Variants instead.
type Variant struct {
	// BoolValue: Optional. Boolean flag value.
	BoolValue bool `json:"boolValue,omitempty"`
	// DoubleValue: Optional. Double flag value.
	DoubleValue float64 `json:"doubleValue,omitempty"`
	// IntValue: Optional. Integer flag value.
	IntValue int64 `json:"intValue,omitempty,string"`
	// Name: Required. Name of the variant. Max length: 128 bytes.
	Name string `json:"name,omitempty"`
	// StringValue: Optional. String flag value.
	StringValue string `json:"stringValue,omitempty"`
	// ForceSendFields is a list of field names (e.g. "BoolValue") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "BoolValue") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (s Variant) MarshalJSON() ([]byte, error) {
	type NoMethod Variant
	return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}

func (s *Variant) UnmarshalJSON(data []byte) error {
	type NoMethod Variant
	var s1 struct {
		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
		*NoMethod
	}
	s1.NoMethod = (*NoMethod)(s)
	if err := json.Unmarshal(data, &s1); err != nil {
		return err
	}
	s.DoubleValue = float64(s1.DoubleValue)
	return nil
}

type ProjectsLocationsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Gets information about a location.
//
// - name: Resource name for the location.
func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &GoogleCloudLocationLocation{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsListCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Lists information about the supported locations for this service. This
// method lists locations based on the resource scope provided in the
// ListLocationsRequest.name field: * **Global locations**: If `name` is empty,
// the method lists the public locations available to all projects. *
// **Project-specific locations**: If `name` follows the format
// `projects/{project}`, the method lists locations visible to that specific
// project. This includes public, private, or other project-specific locations
// enabled for the project. For gRPC and client library implementations, the
// resource name is passed as the `name` field. For direct service calls, the
// resource name is incorporated into the request path based on the specific
// service implementation and version.
//
// - name: The resource that owns the locations collection, if applicable.
func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
// use this field unless explicitly documented otherwise. This is primarily for
// internal usage.
func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
	c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
	return c
}

// Filter sets the optional parameter "filter": A filter to narrow down results
// to a preferred subset. The filtering language accepts strings like
// "displayName=tokyo", and is documented in more detail in AIP-160
// (https://google.aip.dev/160).
func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of
// results to return. If not set, the service selects a default.
func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": A page token received
// from the `next_page_token` field in the response. Send that page token to
// receive the subsequent page.
func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListLocationsResponse.ServerResponse.Header or (if a response was returned
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListLocationsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsFlagAttributesCreateCall struct {
	s             *Service
	parent        string
	flagattribute *FlagAttribute
	urlParams_    gensupport.URLParams
	ctx_          context.Context
	header_       http.Header
}

// Create: Create a new flag attribute.
//
// - parent: The parent of the flag attribute.
func (r *ProjectsLocationsFlagAttributesService) Create(parent string, flagattribute *FlagAttribute) *ProjectsLocationsFlagAttributesCreateCall {
	c := &ProjectsLocationsFlagAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.flagattribute = flagattribute
	return c
}

// FlagAttributeId sets the optional parameter "flagAttributeId": Required. The
// ID value for the new flag attribute.
func (c *ProjectsLocationsFlagAttributesCreateCall) FlagAttributeId(flagAttributeId string) *ProjectsLocationsFlagAttributesCreateCall {
	c.urlParams_.Set("flagAttributeId", flagAttributeId)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagAttributesCreateCall) RequestId(requestId string) *ProjectsLocationsFlagAttributesCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagAttributesCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagAttributesCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsFlagAttributesCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagAttributesCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagAttributesCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagattribute)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagAttributes")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagAttributes.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagAttribute.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagAttributesCreateCall) Do(opts ...googleapi.CallOption) (*FlagAttribute, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagAttribute{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagAttributesDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single flag attribute.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagAttributesService) Delete(name string) *ProjectsLocationsFlagAttributesDeleteCall {
	c := &ProjectsLocationsFlagAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the flag attribute. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the flag attribute. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsFlagAttributesDeleteCall) Etag(etag string) *ProjectsLocationsFlagAttributesDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagAttributesDeleteCall) RequestId(requestId string) *ProjectsLocationsFlagAttributesDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagAttributesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagAttributesDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagAttributesDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFlagAttributesDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagAttributesDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagAttributesDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagAttributes.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagAttributesGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single flag attribute.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagAttributesService) Get(name string) *ProjectsLocationsFlagAttributesGetCall {
	c := &ProjectsLocationsFlagAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagAttributesGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagAttributesGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsFlagAttributesGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagAttributesGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagAttributesGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagAttributes.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagAttribute.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagAttributesGetCall) Do(opts ...googleapi.CallOption) (*FlagAttribute, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagAttribute{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagAttributesListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of flag attributes.
//
// - parent: The parent of the flag attribute.
func (r *ProjectsLocationsFlagAttributesService) List(parent string) *ProjectsLocationsFlagAttributesListCall {
	c := &ProjectsLocationsFlagAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsFlagAttributesListCall) Filter(filter string) *ProjectsLocationsFlagAttributesListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsFlagAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsFlagAttributesListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of flag
// attributes to send per page.
func (c *ProjectsLocationsFlagAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsFlagAttributesListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsFlagAttributesListCall) PageToken(pageToken string) *ProjectsLocationsFlagAttributesListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagAttributesListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagAttributesListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagAttributesListCall) Context(ctx context.Context) *ProjectsLocationsFlagAttributesListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagAttributesListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagAttributesListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagAttributes")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagAttributes.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListFlagAttributesResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagAttributesListCall) Do(opts ...googleapi.CallOption) (*ListFlagAttributesResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListFlagAttributesResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsFlagAttributesListCall) Pages(ctx context.Context, f func(*ListFlagAttributesResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsFlagAttributesPatchCall struct {
	s             *Service
	name          string
	flagattribute *FlagAttribute
	urlParams_    gensupport.URLParams
	ctx_          context.Context
	header_       http.Header
}

// Patch: Update a single flag attribute.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/flagAttributes/{flag_attribute_id}
//     ".
func (r *ProjectsLocationsFlagAttributesService) Patch(name string, flagattribute *FlagAttribute) *ProjectsLocationsFlagAttributesPatchCall {
	c := &ProjectsLocationsFlagAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.flagattribute = flagattribute
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagAttributesPatchCall) RequestId(requestId string) *ProjectsLocationsFlagAttributesPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the FlagAttribute resource by the
// update. The fields specified in the update_mask are relative to the
// resource, not the full request. A field will be overwritten if it is in the
// mask. If the user does not provide a mask then all fields in the
// FlagAttribute will be overwritten.
func (c *ProjectsLocationsFlagAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFlagAttributesPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagAttributesPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagAttributesPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsFlagAttributesPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagAttributesPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagAttributesPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagattribute)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagAttributes.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagAttribute.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagAttributesPatchCall) Do(opts ...googleapi.CallOption) (*FlagAttribute, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagAttribute{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagAttributes.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagReleasesCreateCall struct {
	s           *Service
	parent      string
	flagrelease *FlagRelease
	urlParams_  gensupport.URLParams
	ctx_        context.Context
	header_     http.Header
}

// Create: Create a new flag release.
//
// - parent: The parent of the flag release.
func (r *ProjectsLocationsFlagReleasesService) Create(parent string, flagrelease *FlagRelease) *ProjectsLocationsFlagReleasesCreateCall {
	c := &ProjectsLocationsFlagReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.flagrelease = flagrelease
	return c
}

// FlagReleaseId sets the optional parameter "flagReleaseId": Required. The ID
// value for the new flag release.
func (c *ProjectsLocationsFlagReleasesCreateCall) FlagReleaseId(flagReleaseId string) *ProjectsLocationsFlagReleasesCreateCall {
	c.urlParams_.Set("flagReleaseId", flagReleaseId)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagReleasesCreateCall) RequestId(requestId string) *ProjectsLocationsFlagReleasesCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagReleasesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagReleasesCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagReleasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagReleasesCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagReleasesCreateCall) Context(ctx context.Context) *ProjectsLocationsFlagReleasesCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagReleasesCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagrelease)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagReleases")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagReleases.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRelease.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagReleasesCreateCall) Do(opts ...googleapi.CallOption) (*FlagRelease, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRelease{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagReleasesDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single flag release.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagReleasesService) Delete(name string) *ProjectsLocationsFlagReleasesDeleteCall {
	c := &ProjectsLocationsFlagReleasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the flag release. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the flag release. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsFlagReleasesDeleteCall) Etag(etag string) *ProjectsLocationsFlagReleasesDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagReleasesDeleteCall) RequestId(requestId string) *ProjectsLocationsFlagReleasesDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagReleasesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagReleasesDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagReleasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagReleasesDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagReleasesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFlagReleasesDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagReleasesDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagReleasesDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagReleases.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagReleasesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagReleasesGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single flag release.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagReleasesService) Get(name string) *ProjectsLocationsFlagReleasesGetCall {
	c := &ProjectsLocationsFlagReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagReleasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagReleasesGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagReleasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagReleasesGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagReleasesGetCall) Context(ctx context.Context) *ProjectsLocationsFlagReleasesGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagReleasesGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagReleasesGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagReleases.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRelease.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagReleasesGetCall) Do(opts ...googleapi.CallOption) (*FlagRelease, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRelease{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagReleasesListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of flag releases.
//
// - parent: The parent of the flag release.
func (r *ProjectsLocationsFlagReleasesService) List(parent string) *ProjectsLocationsFlagReleasesListCall {
	c := &ProjectsLocationsFlagReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsFlagReleasesListCall) Filter(filter string) *ProjectsLocationsFlagReleasesListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsFlagReleasesListCall) OrderBy(orderBy string) *ProjectsLocationsFlagReleasesListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of flag
// releases to send per page.
func (c *ProjectsLocationsFlagReleasesListCall) PageSize(pageSize int64) *ProjectsLocationsFlagReleasesListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsFlagReleasesListCall) PageToken(pageToken string) *ProjectsLocationsFlagReleasesListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagReleasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagReleasesListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagReleasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagReleasesListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagReleasesListCall) Context(ctx context.Context) *ProjectsLocationsFlagReleasesListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagReleasesListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagReleasesListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagReleases")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagReleases.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListFlagReleasesResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagReleasesListCall) Do(opts ...googleapi.CallOption) (*ListFlagReleasesResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListFlagReleasesResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsFlagReleasesListCall) Pages(ctx context.Context, f func(*ListFlagReleasesResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsFlagReleasesPatchCall struct {
	s           *Service
	name        string
	flagrelease *FlagRelease
	urlParams_  gensupport.URLParams
	ctx_        context.Context
	header_     http.Header
}

// Patch: Update a single flag release.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/flagReleases/{flag_release_id}".
func (r *ProjectsLocationsFlagReleasesService) Patch(name string, flagrelease *FlagRelease) *ProjectsLocationsFlagReleasesPatchCall {
	c := &ProjectsLocationsFlagReleasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.flagrelease = flagrelease
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagReleasesPatchCall) RequestId(requestId string) *ProjectsLocationsFlagReleasesPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the FlagRelease resource by the
// update. The fields specified in the update_mask are relative to the
// resource, not the full request. A field will be overwritten if it is in the
// mask. If the user does not provide a mask then all fields in the FlagRelease
// will be overwritten.
func (c *ProjectsLocationsFlagReleasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFlagReleasesPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagReleasesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagReleasesPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagReleasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagReleasesPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagReleasesPatchCall) Context(ctx context.Context) *ProjectsLocationsFlagReleasesPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagReleasesPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagReleasesPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagrelease)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagReleases.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRelease.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagReleasesPatchCall) Do(opts ...googleapi.CallOption) (*FlagRelease, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRelease{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagReleases.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagRevisionsCreateCall struct {
	s            *Service
	parent       string
	flagrevision *FlagRevision
	urlParams_   gensupport.URLParams
	ctx_         context.Context
	header_      http.Header
}

// Create: Create a new flag revision.
//
// - parent: The parent of the flag revision.
func (r *ProjectsLocationsFlagRevisionsService) Create(parent string, flagrevision *FlagRevision) *ProjectsLocationsFlagRevisionsCreateCall {
	c := &ProjectsLocationsFlagRevisionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.flagrevision = flagrevision
	return c
}

// FlagRevisionId sets the optional parameter "flagRevisionId": Required. The
// ID value for the new flag revision.
func (c *ProjectsLocationsFlagRevisionsCreateCall) FlagRevisionId(flagRevisionId string) *ProjectsLocationsFlagRevisionsCreateCall {
	c.urlParams_.Set("flagRevisionId", flagRevisionId)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagRevisionsCreateCall) RequestId(requestId string) *ProjectsLocationsFlagRevisionsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagRevisionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagRevisionsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagRevisionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagRevisionsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagRevisionsCreateCall) Context(ctx context.Context) *ProjectsLocationsFlagRevisionsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagRevisionsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagRevisionsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagrevision)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagRevisions")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagRevisions.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRevision.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagRevisionsCreateCall) Do(opts ...googleapi.CallOption) (*FlagRevision, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRevision{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagRevisionsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single flag revision.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagRevisionsService) Delete(name string) *ProjectsLocationsFlagRevisionsDeleteCall {
	c := &ProjectsLocationsFlagRevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the flag revision. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the flag revision. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) Etag(etag string) *ProjectsLocationsFlagRevisionsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagRevisionsDeleteCall) RequestId(requestId string) *ProjectsLocationsFlagRevisionsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagRevisionsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagRevisionsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFlagRevisionsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagRevisionsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagRevisions.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagRevisionsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single flag revision.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagRevisionsService) Get(name string) *ProjectsLocationsFlagRevisionsGetCall {
	c := &ProjectsLocationsFlagRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagRevisionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagRevisionsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagRevisionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagRevisionsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagRevisionsGetCall) Context(ctx context.Context) *ProjectsLocationsFlagRevisionsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagRevisionsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagRevisionsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagRevisions.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRevision.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagRevisionsGetCall) Do(opts ...googleapi.CallOption) (*FlagRevision, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRevision{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagRevisionsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of flag revisions.
//
// - parent: The parent of the flag revision.
func (r *ProjectsLocationsFlagRevisionsService) List(parent string) *ProjectsLocationsFlagRevisionsListCall {
	c := &ProjectsLocationsFlagRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsFlagRevisionsListCall) Filter(filter string) *ProjectsLocationsFlagRevisionsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsFlagRevisionsListCall) OrderBy(orderBy string) *ProjectsLocationsFlagRevisionsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of flag
// revisions to send per page.
func (c *ProjectsLocationsFlagRevisionsListCall) PageSize(pageSize int64) *ProjectsLocationsFlagRevisionsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsFlagRevisionsListCall) PageToken(pageToken string) *ProjectsLocationsFlagRevisionsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagRevisionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagRevisionsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagRevisionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagRevisionsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagRevisionsListCall) Context(ctx context.Context) *ProjectsLocationsFlagRevisionsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagRevisionsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagRevisionsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flagRevisions")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagRevisions.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListFlagRevisionsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListFlagRevisionsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListFlagRevisionsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsFlagRevisionsListCall) Pages(ctx context.Context, f func(*ListFlagRevisionsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsFlagRevisionsPatchCall struct {
	s            *Service
	name         string
	flagrevision *FlagRevision
	urlParams_   gensupport.URLParams
	ctx_         context.Context
	header_      http.Header
}

// Patch: Update a single flag revision.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/flagRevisions/{flag_revision_id}".
func (r *ProjectsLocationsFlagRevisionsService) Patch(name string, flagrevision *FlagRevision) *ProjectsLocationsFlagRevisionsPatchCall {
	c := &ProjectsLocationsFlagRevisionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.flagrevision = flagrevision
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagRevisionsPatchCall) RequestId(requestId string) *ProjectsLocationsFlagRevisionsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the FlagRevision resource by the
// update. The fields specified in the update_mask are relative to the
// resource, not the full request. A field will be overwritten if it is in the
// mask. If the user does not provide a mask then all fields in the
// FlagRevision will be overwritten.
func (c *ProjectsLocationsFlagRevisionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFlagRevisionsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagRevisionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagRevisionsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagRevisionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagRevisionsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagRevisionsPatchCall) Context(ctx context.Context) *ProjectsLocationsFlagRevisionsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagRevisionsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagRevisionsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flagrevision)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flagRevisions.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *FlagRevision.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagRevisionsPatchCall) Do(opts ...googleapi.CallOption) (*FlagRevision, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &FlagRevision{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flagRevisions.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagsCreateCall struct {
	s          *Service
	parent     string
	flag       *Flag
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new flag.
//
// - parent: The parent of the flag.
func (r *ProjectsLocationsFlagsService) Create(parent string, flag *Flag) *ProjectsLocationsFlagsCreateCall {
	c := &ProjectsLocationsFlagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.flag = flag
	return c
}

// FlagId sets the optional parameter "flagId": Required. The ID value for the
// new flag.
func (c *ProjectsLocationsFlagsCreateCall) FlagId(flagId string) *ProjectsLocationsFlagsCreateCall {
	c.urlParams_.Set("flagId", flagId)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagsCreateCall) RequestId(requestId string) *ProjectsLocationsFlagsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagsCreateCall) Context(ctx context.Context) *ProjectsLocationsFlagsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flag)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flags")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flags.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Flag.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagsCreateCall) Do(opts ...googleapi.CallOption) (*Flag, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Flag{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single flag.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagsService) Delete(name string) *ProjectsLocationsFlagsDeleteCall {
	c := &ProjectsLocationsFlagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the flag. This is used with state-changing methods to
// prevent accidental overwrites when multiple user agents might be acting in
// parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the flag. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsFlagsDeleteCall) Etag(etag string) *ProjectsLocationsFlagsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagsDeleteCall) RequestId(requestId string) *ProjectsLocationsFlagsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFlagsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flags.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single flag.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsFlagsService) Get(name string) *ProjectsLocationsFlagsGetCall {
	c := &ProjectsLocationsFlagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagsGetCall) Context(ctx context.Context) *ProjectsLocationsFlagsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flags.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Flag.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagsGetCall) Do(opts ...googleapi.CallOption) (*Flag, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Flag{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsFlagsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of flags.
//
// - parent: The parent of the flag.
func (r *ProjectsLocationsFlagsService) List(parent string) *ProjectsLocationsFlagsListCall {
	c := &ProjectsLocationsFlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsFlagsListCall) Filter(filter string) *ProjectsLocationsFlagsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsFlagsListCall) OrderBy(orderBy string) *ProjectsLocationsFlagsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of flags
// to send per page.
func (c *ProjectsLocationsFlagsListCall) PageSize(pageSize int64) *ProjectsLocationsFlagsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsFlagsListCall) PageToken(pageToken string) *ProjectsLocationsFlagsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsFlagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFlagsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagsListCall) Context(ctx context.Context) *ProjectsLocationsFlagsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/flags")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flags.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListFlagsResponse.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsFlagsListCall) Do(opts ...googleapi.CallOption) (*ListFlagsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListFlagsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsFlagsListCall) Pages(ctx context.Context, f func(*ListFlagsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsFlagsPatchCall struct {
	s          *Service
	name       string
	flag       *Flag
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single flag.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/flags/{flag_id}".
func (r *ProjectsLocationsFlagsService) Patch(name string, flag *Flag) *ProjectsLocationsFlagsPatchCall {
	c := &ProjectsLocationsFlagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.flag = flag
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsFlagsPatchCall) RequestId(requestId string) *ProjectsLocationsFlagsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Flag resource by the update. The
// fields specified in the update_mask are relative to the resource, not the
// full request. A field will be overwritten if it is in the mask. If the user
// does not provide a mask then all fields in the Flag will be overwritten.
func (c *ProjectsLocationsFlagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFlagsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsFlagsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsFlagsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsFlagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlagsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsFlagsPatchCall) Context(ctx context.Context) *ProjectsLocationsFlagsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsFlagsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsFlagsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.flag)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.flags.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Flag.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsFlagsPatchCall) Do(opts ...googleapi.CallOption) (*Flag, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Flag{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.flags.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsReleasesCreateCall struct {
	s          *Service
	parent     string
	release    *Release
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new release.
//
// - parent: The parent of the release.
func (r *ProjectsLocationsReleasesService) Create(parent string, release *Release) *ProjectsLocationsReleasesCreateCall {
	c := &ProjectsLocationsReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.release = release
	return c
}

// ReleaseId sets the optional parameter "releaseId": Required. The ID value
// for the new release.
func (c *ProjectsLocationsReleasesCreateCall) ReleaseId(releaseId string) *ProjectsLocationsReleasesCreateCall {
	c.urlParams_.Set("releaseId", releaseId)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsReleasesCreateCall) RequestId(requestId string) *ProjectsLocationsReleasesCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsReleasesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsReleasesCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsReleasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReleasesCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsReleasesCreateCall) Context(ctx context.Context) *ProjectsLocationsReleasesCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsReleasesCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.release)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.releases.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Release.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsReleasesCreateCall) Do(opts ...googleapi.CallOption) (*Release, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Release{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsReleasesDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single release.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsReleasesService) Delete(name string) *ProjectsLocationsReleasesDeleteCall {
	c := &ProjectsLocationsReleasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the release. This is used with state-changing methods
// to prevent accidental overwrites when multiple user agents might be acting
// in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the release. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsReleasesDeleteCall) Etag(etag string) *ProjectsLocationsReleasesDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsReleasesDeleteCall) RequestId(requestId string) *ProjectsLocationsReleasesDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsReleasesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsReleasesDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsReleasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReleasesDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsReleasesDeleteCall) Context(ctx context.Context) *ProjectsLocationsReleasesDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsReleasesDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsReleasesDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.releases.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsReleasesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsReleasesGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single release.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsReleasesService) Get(name string) *ProjectsLocationsReleasesGetCall {
	c := &ProjectsLocationsReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsReleasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReleasesGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsReleasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReleasesGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsReleasesGetCall) Context(ctx context.Context) *ProjectsLocationsReleasesGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsReleasesGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsReleasesGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.releases.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Release.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsReleasesGetCall) Do(opts ...googleapi.CallOption) (*Release, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Release{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsReleasesListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of releases.
//
// - parent: The parent of the release.
func (r *ProjectsLocationsReleasesService) List(parent string) *ProjectsLocationsReleasesListCall {
	c := &ProjectsLocationsReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsReleasesListCall) Filter(filter string) *ProjectsLocationsReleasesListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsReleasesListCall) OrderBy(orderBy string) *ProjectsLocationsReleasesListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of
// releases to send per page.
func (c *ProjectsLocationsReleasesListCall) PageSize(pageSize int64) *ProjectsLocationsReleasesListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsReleasesListCall) PageToken(pageToken string) *ProjectsLocationsReleasesListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsReleasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReleasesListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsReleasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReleasesListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsReleasesListCall) Context(ctx context.Context) *ProjectsLocationsReleasesListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsReleasesListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsReleasesListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.releases.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListReleasesResponse.ServerResponse.Header or (if a response was returned
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsReleasesListCall) Do(opts ...googleapi.CallOption) (*ListReleasesResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListReleasesResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsReleasesListCall) Pages(ctx context.Context, f func(*ListReleasesResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsReleasesPatchCall struct {
	s          *Service
	name       string
	release    *Release
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single release.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/releases/{release}".
func (r *ProjectsLocationsReleasesService) Patch(name string, release *Release) *ProjectsLocationsReleasesPatchCall {
	c := &ProjectsLocationsReleasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.release = release
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsReleasesPatchCall) RequestId(requestId string) *ProjectsLocationsReleasesPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Release resource by the update.
// The fields specified in the update_mask are relative to the resource, not
// the full request. A field will be overwritten if it is in the mask. If the
// user does not provide a mask then all fields in the Release will be
// overwritten.
func (c *ProjectsLocationsReleasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReleasesPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsReleasesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsReleasesPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsReleasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReleasesPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsReleasesPatchCall) Context(ctx context.Context) *ProjectsLocationsReleasesPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsReleasesPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsReleasesPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.release)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.releases.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Release.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsReleasesPatchCall) Do(opts ...googleapi.CallOption) (*Release, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Release{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.releases.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutKindsCreateCall struct {
	s           *Service
	parent      string
	rolloutkind *RolloutKind
	urlParams_  gensupport.URLParams
	ctx_        context.Context
	header_     http.Header
}

// Create: Create a new rollout kind.
//
// - parent: The parent of the rollout kind.
func (r *ProjectsLocationsRolloutKindsService) Create(parent string, rolloutkind *RolloutKind) *ProjectsLocationsRolloutKindsCreateCall {
	c := &ProjectsLocationsRolloutKindsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.rolloutkind = rolloutkind
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutKindsCreateCall) RequestId(requestId string) *ProjectsLocationsRolloutKindsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// RolloutKindId sets the optional parameter "rolloutKindId": Required. The ID
// value for the new rollout kind.
func (c *ProjectsLocationsRolloutKindsCreateCall) RolloutKindId(rolloutKindId string) *ProjectsLocationsRolloutKindsCreateCall {
	c.urlParams_.Set("rolloutKindId", rolloutKindId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutKindsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutKindsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutKindsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutKindsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutKindsCreateCall) Context(ctx context.Context) *ProjectsLocationsRolloutKindsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutKindsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutKindsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutkind)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rolloutKinds")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rolloutKinds.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *RolloutKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutKindsCreateCall) Do(opts ...googleapi.CallOption) (*RolloutKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &RolloutKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutKindsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single rollout kind.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsRolloutKindsService) Delete(name string) *ProjectsLocationsRolloutKindsDeleteCall {
	c := &ProjectsLocationsRolloutKindsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the rollout kind. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the rollout kind. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsRolloutKindsDeleteCall) Etag(etag string) *ProjectsLocationsRolloutKindsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutKindsDeleteCall) RequestId(requestId string) *ProjectsLocationsRolloutKindsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutKindsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutKindsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutKindsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutKindsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutKindsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRolloutKindsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutKindsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutKindsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rolloutKinds.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutKindsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutKindsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single rollout kind.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsRolloutKindsService) Get(name string) *ProjectsLocationsRolloutKindsGetCall {
	c := &ProjectsLocationsRolloutKindsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutKindsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutKindsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsRolloutKindsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutKindsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutKindsGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutKindsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutKindsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutKindsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rolloutKinds.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *RolloutKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutKindsGetCall) Do(opts ...googleapi.CallOption) (*RolloutKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &RolloutKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutKindsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of rollout kinds.
//
// - parent: The parent of the rollout kind.
func (r *ProjectsLocationsRolloutKindsService) List(parent string) *ProjectsLocationsRolloutKindsListCall {
	c := &ProjectsLocationsRolloutKindsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsRolloutKindsListCall) Filter(filter string) *ProjectsLocationsRolloutKindsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsRolloutKindsListCall) OrderBy(orderBy string) *ProjectsLocationsRolloutKindsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of
// rollout kinds to send per page.
func (c *ProjectsLocationsRolloutKindsListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutKindsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsRolloutKindsListCall) PageToken(pageToken string) *ProjectsLocationsRolloutKindsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutKindsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutKindsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsRolloutKindsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutKindsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutKindsListCall) Context(ctx context.Context) *ProjectsLocationsRolloutKindsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutKindsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutKindsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rolloutKinds")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rolloutKinds.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListRolloutKindsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutKindsListCall) Do(opts ...googleapi.CallOption) (*ListRolloutKindsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListRolloutKindsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsRolloutKindsListCall) Pages(ctx context.Context, f func(*ListRolloutKindsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsRolloutKindsPatchCall struct {
	s           *Service
	name        string
	rolloutkind *RolloutKind
	urlParams_  gensupport.URLParams
	ctx_        context.Context
	header_     http.Header
}

// Patch: Update a single rollout kind.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}".
func (r *ProjectsLocationsRolloutKindsService) Patch(name string, rolloutkind *RolloutKind) *ProjectsLocationsRolloutKindsPatchCall {
	c := &ProjectsLocationsRolloutKindsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.rolloutkind = rolloutkind
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutKindsPatchCall) RequestId(requestId string) *ProjectsLocationsRolloutKindsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the RolloutKind resource by the
// update. The fields specified in the update_mask are relative to the
// resource, not the full request. A field will be overwritten if it is in the
// mask. If the user does not provide a mask then all fields in the RolloutKind
// will be overwritten.
func (c *ProjectsLocationsRolloutKindsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRolloutKindsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutKindsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutKindsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutKindsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutKindsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutKindsPatchCall) Context(ctx context.Context) *ProjectsLocationsRolloutKindsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutKindsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutKindsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutkind)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rolloutKinds.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *RolloutKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutKindsPatchCall) Do(opts ...googleapi.CallOption) (*RolloutKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &RolloutKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rolloutKinds.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutsCreateCall struct {
	s          *Service
	parent     string
	rollout    *Rollout
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new rollout.
//
// - parent: The parent of the rollout.
func (r *ProjectsLocationsRolloutsService) Create(parent string, rollout *Rollout) *ProjectsLocationsRolloutsCreateCall {
	c := &ProjectsLocationsRolloutsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.rollout = rollout
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutsCreateCall) RequestId(requestId string) *ProjectsLocationsRolloutsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// RolloutId sets the optional parameter "rolloutId": Required. The ID value
// for the new rollout.
func (c *ProjectsLocationsRolloutsCreateCall) RolloutId(rolloutId string) *ProjectsLocationsRolloutsCreateCall {
	c.urlParams_.Set("rolloutId", rolloutId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutsCreateCall) Context(ctx context.Context) *ProjectsLocationsRolloutsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollout)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rollouts")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rollouts.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Rollout.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutsCreateCall) Do(opts ...googleapi.CallOption) (*Rollout, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Rollout{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single rollout.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsRolloutsService) Delete(name string) *ProjectsLocationsRolloutsDeleteCall {
	c := &ProjectsLocationsRolloutsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the rollout. This is used with state-changing methods
// to prevent accidental overwrites when multiple user agents might be acting
// in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the rollout. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsRolloutsDeleteCall) Etag(etag string) *ProjectsLocationsRolloutsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutsDeleteCall) RequestId(requestId string) *ProjectsLocationsRolloutsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRolloutsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rollouts.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single rollout.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsRolloutsService) Get(name string) *ProjectsLocationsRolloutsGetCall {
	c := &ProjectsLocationsRolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsRolloutsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutsGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rollouts.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Rollout.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Rollout{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsRolloutsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of rollouts.
//
// - parent: The parent of the rollout.
func (r *ProjectsLocationsRolloutsService) List(parent string) *ProjectsLocationsRolloutsListCall {
	c := &ProjectsLocationsRolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsRolloutsListCall) Filter(filter string) *ProjectsLocationsRolloutsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsRolloutsListCall) OrderBy(orderBy string) *ProjectsLocationsRolloutsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of
// rollouts to send per page.
func (c *ProjectsLocationsRolloutsListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsRolloutsListCall) PageToken(pageToken string) *ProjectsLocationsRolloutsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsRolloutsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutsListCall) Context(ctx context.Context) *ProjectsLocationsRolloutsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rollouts")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rollouts.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListRolloutsResponse.ServerResponse.Header or (if a response was returned
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListRolloutsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListRolloutsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsRolloutsListCall) Pages(ctx context.Context, f func(*ListRolloutsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsRolloutsPatchCall struct {
	s          *Service
	name       string
	rollout    *Rollout
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single rollout.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/rollout/{rollout_id}".
func (r *ProjectsLocationsRolloutsService) Patch(name string, rollout *Rollout) *ProjectsLocationsRolloutsPatchCall {
	c := &ProjectsLocationsRolloutsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.rollout = rollout
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsRolloutsPatchCall) RequestId(requestId string) *ProjectsLocationsRolloutsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Rollout resource by the update.
// The fields specified in the update_mask are relative to the resource, not
// the full request. A field will be overwritten if it is in the mask. If the
// user does not provide a mask then all fields in the Rollout will be
// overwritten.
func (c *ProjectsLocationsRolloutsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRolloutsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsRolloutsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRolloutsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsRolloutsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsRolloutsPatchCall) Context(ctx context.Context) *ProjectsLocationsRolloutsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsRolloutsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsRolloutsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollout)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.rollouts.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Rollout.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsRolloutsPatchCall) Do(opts ...googleapi.CallOption) (*Rollout, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Rollout{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.rollouts.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsSaasCreateCall struct {
	s          *Service
	parent     string
	saas       *Saas
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new saas.
//
// - parent: The parent of the saas.
func (r *ProjectsLocationsSaasService) Create(parent string, saas *Saas) *ProjectsLocationsSaasCreateCall {
	c := &ProjectsLocationsSaasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.saas = saas
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsSaasCreateCall) RequestId(requestId string) *ProjectsLocationsSaasCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// SaasId sets the optional parameter "saasId": Required. The ID value for the
// new saas.
func (c *ProjectsLocationsSaasCreateCall) SaasId(saasId string) *ProjectsLocationsSaasCreateCall {
	c.urlParams_.Set("saasId", saasId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsSaasCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSaasCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsSaasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSaasCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsSaasCreateCall) Context(ctx context.Context) *ProjectsLocationsSaasCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsSaasCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsSaasCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.saas)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/saas")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.saas.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Saas.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsSaasCreateCall) Do(opts ...googleapi.CallOption) (*Saas, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Saas{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsSaasDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single saas.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsSaasService) Delete(name string) *ProjectsLocationsSaasDeleteCall {
	c := &ProjectsLocationsSaasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the saas. This is used with state-changing methods to
// prevent accidental overwrites when multiple user agents might be acting in
// parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the saas. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsSaasDeleteCall) Etag(etag string) *ProjectsLocationsSaasDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsSaasDeleteCall) RequestId(requestId string) *ProjectsLocationsSaasDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsSaasDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSaasDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsSaasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSaasDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsSaasDeleteCall) Context(ctx context.Context) *ProjectsLocationsSaasDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsSaasDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsSaasDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.saas.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsSaasDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsSaasGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single saas.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsSaasService) Get(name string) *ProjectsLocationsSaasGetCall {
	c := &ProjectsLocationsSaasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsSaasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSaasGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsSaasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSaasGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsSaasGetCall) Context(ctx context.Context) *ProjectsLocationsSaasGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsSaasGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsSaasGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.saas.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Saas.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsSaasGetCall) Do(opts ...googleapi.CallOption) (*Saas, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Saas{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsSaasListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of saas.
//
// - parent: The parent of the saas.
func (r *ProjectsLocationsSaasService) List(parent string) *ProjectsLocationsSaasListCall {
	c := &ProjectsLocationsSaasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsSaasListCall) Filter(filter string) *ProjectsLocationsSaasListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsSaasListCall) OrderBy(orderBy string) *ProjectsLocationsSaasListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of saas
// to send per page.
func (c *ProjectsLocationsSaasListCall) PageSize(pageSize int64) *ProjectsLocationsSaasListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsSaasListCall) PageToken(pageToken string) *ProjectsLocationsSaasListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsSaasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSaasListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsSaasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSaasListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsSaasListCall) Context(ctx context.Context) *ProjectsLocationsSaasListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsSaasListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsSaasListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/saas")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.saas.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListSaasResponse.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsSaasListCall) Do(opts ...googleapi.CallOption) (*ListSaasResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListSaasResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsSaasListCall) Pages(ctx context.Context, f func(*ListSaasResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsSaasPatchCall struct {
	s          *Service
	name       string
	saas       *Saas
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single saas.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/saas/{saas}".
func (r *ProjectsLocationsSaasService) Patch(name string, saas *Saas) *ProjectsLocationsSaasPatchCall {
	c := &ProjectsLocationsSaasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.saas = saas
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsSaasPatchCall) RequestId(requestId string) *ProjectsLocationsSaasPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Saas resource by the update. The
// fields specified in the update_mask are relative to the resource, not the
// full request. A field will be overwritten if it is in the mask. If the user
// does not provide a mask then all fields in the Saas will be overwritten.
func (c *ProjectsLocationsSaasPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSaasPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsSaasPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSaasPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsSaasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSaasPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsSaasPatchCall) Context(ctx context.Context) *ProjectsLocationsSaasPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsSaasPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsSaasPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.saas)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.saas.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Saas.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsSaasPatchCall) Do(opts ...googleapi.CallOption) (*Saas, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Saas{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.saas.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsTenantsCreateCall struct {
	s          *Service
	parent     string
	tenant     *Tenant
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new tenant.
//
// - parent: The parent of the tenant.
func (r *ProjectsLocationsTenantsService) Create(parent string, tenant *Tenant) *ProjectsLocationsTenantsCreateCall {
	c := &ProjectsLocationsTenantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.tenant = tenant
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsTenantsCreateCall) RequestId(requestId string) *ProjectsLocationsTenantsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// TenantId sets the optional parameter "tenantId": Required. The ID value for
// the new tenant.
func (c *ProjectsLocationsTenantsCreateCall) TenantId(tenantId string) *ProjectsLocationsTenantsCreateCall {
	c.urlParams_.Set("tenantId", tenantId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsTenantsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTenantsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsTenantsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTenantsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsTenantsCreateCall) Context(ctx context.Context) *ProjectsLocationsTenantsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsTenantsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsTenantsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tenant)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tenants")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.tenants.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Tenant.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsTenantsCreateCall) Do(opts ...googleapi.CallOption) (*Tenant, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Tenant{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsTenantsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single tenant.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsTenantsService) Delete(name string) *ProjectsLocationsTenantsDeleteCall {
	c := &ProjectsLocationsTenantsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the tenant. This is used with state-changing methods
// to prevent accidental overwrites when multiple user agents might be acting
// in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the tenant. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsTenantsDeleteCall) Etag(etag string) *ProjectsLocationsTenantsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsTenantsDeleteCall) RequestId(requestId string) *ProjectsLocationsTenantsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsTenantsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTenantsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsTenantsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTenantsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsTenantsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTenantsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsTenantsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsTenantsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.tenants.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsTenantsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsTenantsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single tenant.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsTenantsService) Get(name string) *ProjectsLocationsTenantsGetCall {
	c := &ProjectsLocationsTenantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsTenantsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTenantsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsTenantsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTenantsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsTenantsGetCall) Context(ctx context.Context) *ProjectsLocationsTenantsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsTenantsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsTenantsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.tenants.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Tenant.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsTenantsGetCall) Do(opts ...googleapi.CallOption) (*Tenant, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Tenant{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsTenantsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of tenants.
//
// - parent: The parent of the tenant.
func (r *ProjectsLocationsTenantsService) List(parent string) *ProjectsLocationsTenantsListCall {
	c := &ProjectsLocationsTenantsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsTenantsListCall) Filter(filter string) *ProjectsLocationsTenantsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsTenantsListCall) OrderBy(orderBy string) *ProjectsLocationsTenantsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of
// tenants to send per page.
func (c *ProjectsLocationsTenantsListCall) PageSize(pageSize int64) *ProjectsLocationsTenantsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsTenantsListCall) PageToken(pageToken string) *ProjectsLocationsTenantsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsTenantsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTenantsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsTenantsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTenantsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsTenantsListCall) Context(ctx context.Context) *ProjectsLocationsTenantsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsTenantsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsTenantsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tenants")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.tenants.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListTenantsResponse.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsTenantsListCall) Do(opts ...googleapi.CallOption) (*ListTenantsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListTenantsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsTenantsListCall) Pages(ctx context.Context, f func(*ListTenantsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsTenantsPatchCall struct {
	s          *Service
	name       string
	tenant     *Tenant
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single tenant.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/tenants/{tenant}".
func (r *ProjectsLocationsTenantsService) Patch(name string, tenant *Tenant) *ProjectsLocationsTenantsPatchCall {
	c := &ProjectsLocationsTenantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.tenant = tenant
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsTenantsPatchCall) RequestId(requestId string) *ProjectsLocationsTenantsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Tenant resource by the update.
// The fields specified in the update_mask are relative to the resource, not
// the full request. A field will be overwritten if it is in the mask. If the
// user does not provide a mask then all fields in the Tenant will be
// overwritten.
func (c *ProjectsLocationsTenantsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTenantsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsTenantsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTenantsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsTenantsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTenantsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsTenantsPatchCall) Context(ctx context.Context) *ProjectsLocationsTenantsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsTenantsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsTenantsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tenant)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.tenants.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Tenant.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsTenantsPatchCall) Do(opts ...googleapi.CallOption) (*Tenant, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Tenant{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.tenants.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitKindsCreateCall struct {
	s          *Service
	parent     string
	unitkind   *UnitKind
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new unit kind.
//
// - parent: The parent of the unit kind.
func (r *ProjectsLocationsUnitKindsService) Create(parent string, unitkind *UnitKind) *ProjectsLocationsUnitKindsCreateCall {
	c := &ProjectsLocationsUnitKindsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.unitkind = unitkind
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitKindsCreateCall) RequestId(requestId string) *ProjectsLocationsUnitKindsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UnitKindId sets the optional parameter "unitKindId": Required. The ID value
// for the new unit kind.
func (c *ProjectsLocationsUnitKindsCreateCall) UnitKindId(unitKindId string) *ProjectsLocationsUnitKindsCreateCall {
	c.urlParams_.Set("unitKindId", unitKindId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitKindsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitKindsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitKindsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitKindsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitKindsCreateCall) Context(ctx context.Context) *ProjectsLocationsUnitKindsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitKindsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitKindsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unitkind)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/unitKinds")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitKinds.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitKindsCreateCall) Do(opts ...googleapi.CallOption) (*UnitKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitKindsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single unit kind.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitKindsService) Delete(name string) *ProjectsLocationsUnitKindsDeleteCall {
	c := &ProjectsLocationsUnitKindsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the unit kind. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the unit kind. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsUnitKindsDeleteCall) Etag(etag string) *ProjectsLocationsUnitKindsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitKindsDeleteCall) RequestId(requestId string) *ProjectsLocationsUnitKindsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitKindsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitKindsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitKindsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitKindsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitKindsDeleteCall) Context(ctx context.Context) *ProjectsLocationsUnitKindsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitKindsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitKindsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitKinds.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitKindsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitKindsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single unit kind.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitKindsService) Get(name string) *ProjectsLocationsUnitKindsGetCall {
	c := &ProjectsLocationsUnitKindsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitKindsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitKindsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitKindsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitKindsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitKindsGetCall) Context(ctx context.Context) *ProjectsLocationsUnitKindsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitKindsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitKindsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitKinds.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitKindsGetCall) Do(opts ...googleapi.CallOption) (*UnitKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitKindsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of unit kinds.
//
// - parent: The parent of the unit kind.
func (r *ProjectsLocationsUnitKindsService) List(parent string) *ProjectsLocationsUnitKindsListCall {
	c := &ProjectsLocationsUnitKindsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsUnitKindsListCall) Filter(filter string) *ProjectsLocationsUnitKindsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsUnitKindsListCall) OrderBy(orderBy string) *ProjectsLocationsUnitKindsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of unit
// kinds to send per page.
func (c *ProjectsLocationsUnitKindsListCall) PageSize(pageSize int64) *ProjectsLocationsUnitKindsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsUnitKindsListCall) PageToken(pageToken string) *ProjectsLocationsUnitKindsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitKindsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitKindsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitKindsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitKindsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitKindsListCall) Context(ctx context.Context) *ProjectsLocationsUnitKindsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitKindsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitKindsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/unitKinds")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitKinds.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListUnitKindsResponse.ServerResponse.Header or (if a response was returned
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsUnitKindsListCall) Do(opts ...googleapi.CallOption) (*ListUnitKindsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListUnitKindsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsUnitKindsListCall) Pages(ctx context.Context, f func(*ListUnitKindsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsUnitKindsPatchCall struct {
	s          *Service
	name       string
	unitkind   *UnitKind
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single unit kind.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/unitKinds/{unitKind}".
func (r *ProjectsLocationsUnitKindsService) Patch(name string, unitkind *UnitKind) *ProjectsLocationsUnitKindsPatchCall {
	c := &ProjectsLocationsUnitKindsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.unitkind = unitkind
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitKindsPatchCall) RequestId(requestId string) *ProjectsLocationsUnitKindsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the UnitKind resource by the update.
// The fields specified in the update_mask are relative to the resource, not
// the full request. A field will be overwritten if it is in the mask. If the
// user does not provide a mask then all fields in the UnitKind will be
// overwritten.
func (c *ProjectsLocationsUnitKindsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsUnitKindsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitKindsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitKindsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitKindsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitKindsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitKindsPatchCall) Context(ctx context.Context) *ProjectsLocationsUnitKindsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitKindsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitKindsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unitkind)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitKinds.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitKind.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitKindsPatchCall) Do(opts ...googleapi.CallOption) (*UnitKind, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitKind{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitKinds.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitOperationsCreateCall struct {
	s             *Service
	parent        string
	unitoperation *UnitOperation
	urlParams_    gensupport.URLParams
	ctx_          context.Context
	header_       http.Header
}

// Create: Create a new unit operation.
//
// - parent: The parent of the unit operation.
func (r *ProjectsLocationsUnitOperationsService) Create(parent string, unitoperation *UnitOperation) *ProjectsLocationsUnitOperationsCreateCall {
	c := &ProjectsLocationsUnitOperationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.unitoperation = unitoperation
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitOperationsCreateCall) RequestId(requestId string) *ProjectsLocationsUnitOperationsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UnitOperationId sets the optional parameter "unitOperationId": Required. The
// ID value for the new unit operation.
func (c *ProjectsLocationsUnitOperationsCreateCall) UnitOperationId(unitOperationId string) *ProjectsLocationsUnitOperationsCreateCall {
	c.urlParams_.Set("unitOperationId", unitOperationId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitOperationsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitOperationsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitOperationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitOperationsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitOperationsCreateCall) Context(ctx context.Context) *ProjectsLocationsUnitOperationsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitOperationsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitOperationsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unitoperation)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/unitOperations")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitOperations.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitOperation.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitOperationsCreateCall) Do(opts ...googleapi.CallOption) (*UnitOperation, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitOperation{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitOperationsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single unit operation.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitOperationsService) Delete(name string) *ProjectsLocationsUnitOperationsDeleteCall {
	c := &ProjectsLocationsUnitOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the unit operation. This is used with state-changing
// methods to prevent accidental overwrites when multiple user agents might be
// acting in parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the unit operation. The Any
// wildcard (`*`) requires that the resource must already exists, and the Not
// Any wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsUnitOperationsDeleteCall) Etag(etag string) *ProjectsLocationsUnitOperationsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitOperationsDeleteCall) RequestId(requestId string) *ProjectsLocationsUnitOperationsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitOperationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitOperationsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitOperationsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsUnitOperationsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitOperationsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitOperations.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitOperationsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single unit operation.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitOperationsService) Get(name string) *ProjectsLocationsUnitOperationsGetCall {
	c := &ProjectsLocationsUnitOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitOperationsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitOperationsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsUnitOperationsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitOperationsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitOperationsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitOperations.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitOperation.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitOperationsGetCall) Do(opts ...googleapi.CallOption) (*UnitOperation, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitOperation{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitOperationsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of unit operations.
//
// - parent: The parent of the unit operation.
func (r *ProjectsLocationsUnitOperationsService) List(parent string) *ProjectsLocationsUnitOperationsListCall {
	c := &ProjectsLocationsUnitOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsUnitOperationsListCall) Filter(filter string) *ProjectsLocationsUnitOperationsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsUnitOperationsListCall) OrderBy(orderBy string) *ProjectsLocationsUnitOperationsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of unit
// operations to send per page.
func (c *ProjectsLocationsUnitOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsUnitOperationsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsUnitOperationsListCall) PageToken(pageToken string) *ProjectsLocationsUnitOperationsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitOperationsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitOperationsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitOperationsListCall) Context(ctx context.Context) *ProjectsLocationsUnitOperationsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitOperationsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitOperationsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/unitOperations")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitOperations.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListUnitOperationsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitOperationsListCall) Do(opts ...googleapi.CallOption) (*ListUnitOperationsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListUnitOperationsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsUnitOperationsListCall) Pages(ctx context.Context, f func(*ListUnitOperationsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsUnitOperationsPatchCall struct {
	s             *Service
	name          string
	unitoperation *UnitOperation
	urlParams_    gensupport.URLParams
	ctx_          context.Context
	header_       http.Header
}

// Patch: Update a single unit operation.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/unitOperations/{unitOperation}".
func (r *ProjectsLocationsUnitOperationsService) Patch(name string, unitoperation *UnitOperation) *ProjectsLocationsUnitOperationsPatchCall {
	c := &ProjectsLocationsUnitOperationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.unitoperation = unitoperation
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitOperationsPatchCall) RequestId(requestId string) *ProjectsLocationsUnitOperationsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the UnitOperation resource by the
// update. The fields specified in the update_mask are relative to the
// resource, not the full request. A field will be overwritten if it is in the
// mask. If the user does not provide a mask then all fields in the
// UnitOperation will be overwritten.
func (c *ProjectsLocationsUnitOperationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsUnitOperationsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitOperationsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitOperationsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitOperationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitOperationsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitOperationsPatchCall) Context(ctx context.Context) *ProjectsLocationsUnitOperationsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitOperationsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitOperationsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unitoperation)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.unitOperations.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *UnitOperation.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitOperationsPatchCall) Do(opts ...googleapi.CallOption) (*UnitOperation, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &UnitOperation{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.unitOperations.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitsCreateCall struct {
	s          *Service
	parent     string
	unit       *Unit
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Create: Create a new unit.
//
// - parent: The parent of the unit.
func (r *ProjectsLocationsUnitsService) Create(parent string, unit *Unit) *ProjectsLocationsUnitsCreateCall {
	c := &ProjectsLocationsUnitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	c.unit = unit
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitsCreateCall) RequestId(requestId string) *ProjectsLocationsUnitsCreateCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UnitId sets the optional parameter "unitId": Required. The ID value for the
// new unit.
func (c *ProjectsLocationsUnitsCreateCall) UnitId(unitId string) *ProjectsLocationsUnitsCreateCall {
	c.urlParams_.Set("unitId", unitId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitsCreateCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitsCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitsCreateCall) Context(ctx context.Context) *ProjectsLocationsUnitsCreateCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitsCreateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitsCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unit)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/units")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("POST", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.create", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.units.create" call.
// Any non-2xx status code is an error. Response headers are in either
// *Unit.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitsCreateCall) Do(opts ...googleapi.CallOption) (*Unit, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Unit{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.create", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitsDeleteCall struct {
	s          *Service
	name       string
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Delete: Delete a single unit.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitsService) Delete(name string) *ProjectsLocationsUnitsDeleteCall {
	c := &ProjectsLocationsUnitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Etag sets the optional parameter "etag": The etag known to the client for
// the expected state of the unit. This is used with state-changing methods to
// prevent accidental overwrites when multiple user agents might be acting in
// parallel on the same resource. An etag wildcard provide optimistic
// concurrency based on the expected existence of the unit. The Any wildcard
// (`*`) requires that the resource must already exists, and the Not Any
// wildcard (`!*`) requires that it must not.
func (c *ProjectsLocationsUnitsDeleteCall) Etag(etag string) *ProjectsLocationsUnitsDeleteCall {
	c.urlParams_.Set("etag", etag)
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitsDeleteCall) RequestId(requestId string) *ProjectsLocationsUnitsDeleteCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitsDeleteCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitsDeleteCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitsDeleteCall) Context(ctx context.Context) *ProjectsLocationsUnitsDeleteCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitsDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitsDeleteCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("DELETE", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.delete", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.units.delete" call.
// Any non-2xx status code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Empty{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.delete", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitsGetCall struct {
	s            *Service
	name         string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// Get: Retrieve a single unit.
//
// - name: The resource name of the resource within a service.
func (r *ProjectsLocationsUnitsService) Get(name string) *ProjectsLocationsUnitsGetCall {
	c := &ProjectsLocationsUnitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitsGetCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitsGetCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitsGetCall) Context(ctx context.Context) *ProjectsLocationsUnitsGetCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitsGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitsGetCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.get", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.units.get" call.
// Any non-2xx status code is an error. Response headers are in either
// *Unit.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitsGetCall) Do(opts ...googleapi.CallOption) (*Unit, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Unit{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.get", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

type ProjectsLocationsUnitsListCall struct {
	s            *Service
	parent       string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieve a collection of units.
//
// - parent: The parent of the unit.
func (r *ProjectsLocationsUnitsService) List(parent string) *ProjectsLocationsUnitsListCall {
	c := &ProjectsLocationsUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.parent = parent
	return c
}

// Filter sets the optional parameter "filter": Filter the list as specified in
// https://google.aip.dev/160.
func (c *ProjectsLocationsUnitsListCall) Filter(filter string) *ProjectsLocationsUnitsListCall {
	c.urlParams_.Set("filter", filter)
	return c
}

// OrderBy sets the optional parameter "orderBy": Order results as specified in
// https://google.aip.dev/132.
func (c *ProjectsLocationsUnitsListCall) OrderBy(orderBy string) *ProjectsLocationsUnitsListCall {
	c.urlParams_.Set("orderBy", orderBy)
	return c
}

// PageSize sets the optional parameter "pageSize": The maximum number of units
// to send per page.
func (c *ProjectsLocationsUnitsListCall) PageSize(pageSize int64) *ProjectsLocationsUnitsListCall {
	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
	return c
}

// PageToken sets the optional parameter "pageToken": The page token: If the
// next_page_token from a previous response is provided, this request will send
// the subsequent page.
func (c *ProjectsLocationsUnitsListCall) PageToken(pageToken string) *ProjectsLocationsUnitsListCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitsListCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// IfNoneMatch sets an optional parameter which makes the operation fail if the
// object's ETag matches the given value. This is useful for getting updates
// only after the object has changed since the last request.
func (c *ProjectsLocationsUnitsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUnitsListCall {
	c.ifNoneMatch_ = entityTag
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitsListCall) Context(ctx context.Context) *ProjectsLocationsUnitsListCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitsListCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitsListCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/units")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("GET", urls, nil)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"parent": c.parent,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.list", "request", internallog.HTTPRequest(req, nil))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.units.list" call.
// Any non-2xx status code is an error. Response headers are in either
// *ListUnitsResponse.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified was
// returned.
func (c *ProjectsLocationsUnitsListCall) Do(opts ...googleapi.CallOption) (*ListUnitsResponse, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &ListUnitsResponse{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.list", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}

// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsLocationsUnitsListCall) Pages(ctx context.Context, f func(*ListUnitsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken"))
	for {
		x, err := c.Do()
		if err != nil {
			return err
		}
		if err := f(x); err != nil {
			return err
		}
		if x.NextPageToken == "" {
			return nil
		}
		c.PageToken(x.NextPageToken)
	}
}

type ProjectsLocationsUnitsPatchCall struct {
	s          *Service
	name       string
	unit       *Unit
	urlParams_ gensupport.URLParams
	ctx_       context.Context
	header_    http.Header
}

// Patch: Update a single unit.
//
//   - name: Identifier. The resource name (full URI of the resource) following
//     the standard naming scheme:
//     "projects/{project}/locations/{location}/units/{unit}".
func (r *ProjectsLocationsUnitsService) Patch(name string, unit *Unit) *ProjectsLocationsUnitsPatchCall {
	c := &ProjectsLocationsUnitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.name = name
	c.unit = unit
	return c
}

// RequestId sets the optional parameter "requestId": An optional request ID to
// identify requests. Specify a unique request ID so that if you must retry
// your request, the server will know to ignore the request if it has already
// been completed. The server will guarantee that for at least 60 minutes since
// the first request. For example, consider a situation where you make an
// initial request and the request times out. If you make the request again
// with the same request ID, the server can check if original operation with
// the same request ID was received, and if so, will ignore the second request.
// This prevents clients from accidentally creating duplicate commitments. The
// request ID must be a valid UUID with the exception that zero UUID is not
// supported (00000000-0000-0000-0000-000000000000).
func (c *ProjectsLocationsUnitsPatchCall) RequestId(requestId string) *ProjectsLocationsUnitsPatchCall {
	c.urlParams_.Set("requestId", requestId)
	return c
}

// UpdateMask sets the optional parameter "updateMask": Field mask is used to
// specify the fields to be overwritten in the Unit resource by the update. The
// fields specified in the update_mask are relative to the resource, not the
// full request. A field will be overwritten if it is in the mask. If the user
// does not provide a mask then all fields in the Unit will be overwritten.
func (c *ProjectsLocationsUnitsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsUnitsPatchCall {
	c.urlParams_.Set("updateMask", updateMask)
	return c
}

// ValidateOnly sets the optional parameter "validateOnly": If "validate_only"
// is set to true, the service will try to validate that this request would
// succeed, but will not actually make changes.
func (c *ProjectsLocationsUnitsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsUnitsPatchCall {
	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
	return c
}

// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
// details.
func (c *ProjectsLocationsUnitsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnitsPatchCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c
}

// Context sets the context to be used in this call's Do method.
func (c *ProjectsLocationsUnitsPatchCall) Context(ctx context.Context) *ProjectsLocationsUnitsPatchCall {
	c.ctx_ = ctx
	return c
}

// Header returns a http.Header that can be modified by the caller to add
// headers to the request.
func (c *ProjectsLocationsUnitsPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}

func (c *ProjectsLocationsUnitsPatchCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
	body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.unit)
	if err != nil {
		return nil, err
	}
	c.urlParams_.Set("alt", alt)
	c.urlParams_.Set("prettyPrint", "false")
	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
	urls += "?" + c.urlParams_.Encode()
	req, err := http.NewRequest("PATCH", urls, body)
	if err != nil {
		return nil, err
	}
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"name": c.name,
	})
	c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
	return gensupport.SendRequest(c.ctx_, c.s.client, req)
}

// Do executes the "saasservicemgmt.projects.locations.units.patch" call.
// Any non-2xx status code is an error. Response headers are in either
// *Unit.ServerResponse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was returned.
func (c *ProjectsLocationsUnitsPatchCall) Do(opts ...googleapi.CallOption) (*Unit, error) {
	gensupport.SetOptions(c.urlParams_, opts...)
	res, err := c.doRequest("json")
	if res != nil && res.StatusCode == http.StatusNotModified {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, gensupport.WrapError(&googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		})
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, gensupport.WrapError(err)
	}
	ret := &Unit{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	b, err := gensupport.DecodeResponseBytes(target, res)
	if err != nil {
		return nil, err
	}
	c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "saasservicemgmt.projects.locations.units.patch", "response", internallog.HTTPResponse(res, b))
	return ret, nil
}
