// initOperations returns all Operations found in the Documents
337080
func (c *Config) initOperations(specs []*loads.Document) {
	ops := Operations{}

	c.GroupMap = map[string]string{}
	VisitOperations(specs, func(op Operation) {
		ops[op.ID] = &op

		// Build a map of the group names to the group name appearing in operation ids
		// This is necessary because the group will appear without the domain
		// in the resource, but with the domain in the operationID, and we
		// will be unable to match the operationID to the resource because they
		// don't agree on the name of the group.
		// TODO: Fix this by getting the group-version-kind in the resource
		if *MungeGroups {
			if v, ok := op.op.Extensions[typeKey]; ok {
				gvk := v.(map[string]interface{})
				group, ok := gvk["group"].(string)
				if !ok {
					log.Fatalf("group not type string %v", v)
				}
				groupId := ""
				for _, s := range strings.Split(group, ".") {
					groupId = groupId + strings.Title(s)
				}
				c.GroupMap[strings.Title(strings.Split(group, ".")[0])] = groupId
			}
		}
	})

	c.Operations = ops
	c.mapOperationsToDefinitions()
	c.initOperationsFromTags(specs)

	VisitOperations(specs, func(target Operation) {
		if op, ok := c.Operations[target.ID]; !ok || op.Definition == nil {
			op.VerifyBlackListed()
		}
	})
	c.initOperationParameters()

	// Clear the operations.  We still have to calculate the operations because that is how we determine
	// the API Group for each definition.
	if !*BuildOps {
		c.Operations = Operations{}
		c.OperationCategories = []OperationCategory{}
		for _, d := range c.Definitions.All {
			d.OperationCategories = []*OperationCategory{}
		}
	}
}
216845
func (r *ActionResponse) Init(context smolder.APIContext) {
	r.Parent = r
	r.Context = context

	r.Actions = []actionInfoResponse{}
}
900469
func (s *BatchReadInput) SetOperations(v []*BatchReadOperation) *BatchReadInput {
	s.Operations = v
	return s
}
514160
func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput {
	s.Operations = v
	return s
}
878521
func (c *RFCCommand) InitOpts() {
	c.flags = flag.NewFlagSet("rfc", flag.ContinueOnError)
	c.flags.Usage = func() { c.Ui.Output(c.Help()) }
	c.flags.BoolVar(&c.silentMode, "s", false, "Silent, only return different exit codes")
}
1147222
func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput {
	s.Operations = v
	return s
}
518638
func VisitOperations(specs []*loads.Document, fn func(operation Operation)) {
	for _, d := range specs {
		for path, item := range d.Spec().Paths.Paths {
			for method, operation := range getOperationsForItem(item) {
				if operation != nil && !IsBlacklistedOperation(operation) {
					fn(Operation{
						item:       item,
						op:         operation,
						Path:       path,
						HttpMethod: method,
						ID:         operation.ID,
					})
				}
			}
		}
	}
}
1187138
func (schema DatabaseSchema) validateOperations(operations ...Operation) bool {
	for _, op := range operations {
		table, ok := schema.Tables[op.Table]
		if ok {
			for column := range op.Row {
				if _, ok := table.Columns[column]; !ok {
					return false
				}
			}
			for _, row := range op.Rows {
				for column := range row {
					if _, ok := table.Columns[column]; !ok {
						return false
					}
				}
			}
			for _, column := range op.Columns {
				if _, ok := table.Columns[column]; !ok {
					return false
				}
			}
		} else {
			return false
		}
	}
	return true
}
758346
func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput {
	s.Operations = v
	return s
}
873315
func newInitOptions() *initOptions {
	// initialize the public kubeadm config API by applying defaults
	externalcfg := &kubeadmapiv1beta2.InitConfiguration{}
	kubeadmscheme.Scheme.Default(externalcfg)

	// Create the options object for the bootstrap token-related flags, and override the default value for .Description
	bto := options.NewBootstrapTokenOptions()
	bto.Description = "The default bootstrap token generated by 'kubeadm init'."

	return &initOptions{
		externalcfg:    externalcfg,
		bto:            bto,
		kubeconfigDir:  kubeadmconstants.KubernetesDir,
		kubeconfigPath: kubeadmconstants.GetAdminKubeConfigPath(),
		uploadCerts:    false,
	}
}
1197852
func initDictLUTs() {
	// Sweep from minDictLen to maxDictLen, inclusive.
	for i := minDictLen; i <= maxDictLen; i++ {
		dictSizes[i] = 1 << uint(dictBitSizes[i])
		dictOffsets[i] = dictOffsets[i-1] + (i-1)*dictSizes[i-1]
	}
}
252465
func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput {
	s.Operations = v
	return s
}
382583
func init() {
	for _, arg := range os.Args {
		flag := strings.TrimLeft(arg, "-")

		for _, enabler := range enablerFlags {
			if !Enabled && flag == enabler {
				log.Info("Enabling metrics collection")
				Enabled = true
			}
		}
		for _, enabler := range expensiveEnablerFlags {
			if !EnabledExpensive && flag == enabler {
				log.Info("Enabling expensive metrics collection")
				EnabledExpensive = true
			}
		}
	}
}
304589
func (s *ConfigService) CacheOperations(input *CacheOperationInput) (*Response, error) {
	u := "config/server/caches/"

	req, err := s.client.NewRequest("POST", u, input)
	if err != nil {
		return nil, err
	}

	return s.client.Do(req, nil)
}
347033
func (s *UpdateRelationalDatabaseOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseOutput {
	s.Operations = v
	return s
}
402864
func (h *multiHandler) Init() error {
	for _, handler := range h.handlers {
		if err := handler.Init(); err != nil {
			return err
		}
	}
	return nil
}
416119
func (c *commonFlags) Init(authOpts auth.Options) {
	c.defaultFlags.Init(&c.Flags)
	c.authFlags.Register(&c.Flags, authOpts)
	c.Flags.StringVar(&c.serverURL, "server", os.Getenv("SWARMING_SERVER"), "Server URL; required. Set $SWARMING_SERVER to set a default.")
	c.Flags.IntVar(&c.worker, "worker", 8, "Number of workers used to download isolated files.")
}