// Describe rule
//
// You can read doc at https://help.aliyun.com/document_detail/35229.html?spm=5176.doc35226.6.674.DRJeKJ
428317
func (client *Client) DescribeRuleAttribute(args *DescribeRuleAttributeArgs) (*DescribeRuleAttributeResponse, error) {
	response := &DescribeRuleAttributeResponse{}
	err := client.Invoke("DescribeRuleAttribute", args, response)
	if err != nil {
		return nil, err
	}
	return response, nil
}
647452
func (v *Value) Description() string {
	parts := make([]string, 0, len(v.Items))
	for _, it := range v.Items {
		parts = append(parts, it.descriptionToken())
	}

	return strings.Join(parts, ", ")
}
644861
func Describe(desc string, t *testing.T, wrapper func(*Setup, It)) {
	s := &Setup{beforeEachFns: []func(){}, afterEachFns: []func(){}}
	wrapper(s, func(itDesc string, expectFn func(Expect)) {
		test := Test{
			Description: fmt.Sprintf("%s %s", desc, itDesc),
			T:           t,
			ExpectFn:    expectFn,
			Setup:       s,
		}
		test.Run()
	})

}
1247153
func (rt ruleType) RuleKind() string {
	switch rt {
	case RuleTypeGoBinary:
		return "go_binary"
	case RuleTypeGoLibrary:
		return "go_library"
	case RuleTypeGoTest:
		return "go_test"
	case RuleTypeGoXTest:
		return "go_test"
	case RuleTypeCGoGenrule:
		return "cgo_genrule"
	case RuleTypeFileGroup:
		return "filegroup"
	case RuleTypeOpenAPILibrary:
		return "openapi_library"
	}
	panic("unreachable")
}
148022
func (ps *prometheusState) Describe(ch chan<- *stdprometheus.Desc) {
	for _, desc := range ps.describers {
		desc(ch)
	}
}
1184014
func (c *Client) Describe(ch chan<- *prometheus.Desc) {
	ch <- orgsDesc
	ch <- bucketsDesc
	ch <- usersDesc
	ch <- tokensDesc
	ch <- dashboardsDesc
	ch <- scrapersDesc
	ch <- telegrafsDesc
	ch <- boltWritesDesc
	ch <- boltReadsDesc
}
907140
func (rule *Rule) String() string {
	result := ""

	if rule.Kind == QualifiedRule {
		for i, sel := range rule.Selectors {
			if i != 0 {
				result += ", "
			}
			result += sel
		}
	} else {
		// AtRule
		result += fmt.Sprintf("%s", rule.Name)

		if rule.Prelude != "" {
			if result != "" {
				result += " "
			}
			result += fmt.Sprintf("%s", rule.Prelude)
		}
	}

	if (len(rule.Declarations) == 0) && (len(rule.Rules) == 0) {
		result += ";"
	} else {
		result += " {\n"

		if rule.EmbedsRules() {
			for _, subRule := range rule.Rules {
				result += fmt.Sprintf("%s%s\n", rule.indent(), subRule.String())
			}
		} else {
			for _, decl := range rule.Declarations {
				result += fmt.Sprintf("%s%s\n", rule.indent(), decl.String())
			}
		}

		result += fmt.Sprintf("%s}", rule.indentEndBlock())
	}

	return result
}
309507
func (BufferedLogWriterMetrics) Describe(ch chan<- *prometheus.Desc) {
	ch <- jujuLogsenderCapacityDesc
	ch <- jujuLogsenderEnqueuedTotalDesc
	ch <- jujuLogsenderSentTotalDesc
	ch <- jujuLogsenderDroppedTotalDesc
}
378516
func Describe(val interface{}) string {
	switch val := val.(type) {
	case *usb.Descriptor:
		if v, ok := Vendors[val.Vendor]; ok {
			if d, ok := v.Product[val.Product]; ok {
				return fmt.Sprintf("%s (%s)", d, v)
			}
			return fmt.Sprintf("Unknown (%s)", v)
		}
		return fmt.Sprintf("Unknown %s:%s", val.Vendor, val.Product)
	}
	return fmt.Sprintf("Unknown (%T)", val)
}
1294199
func (ops *vsphereOps) Describe() (interface{}, error) {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	return ops.renewVM(ctx, ops.vm)
}
523171
func (t *TypeInfo) Doc() *ast.CommentGroup {
	if t.TypeSpec.Doc != nil {
		return t.TypeSpec.Doc
	}
	if t.GenDecl.Doc != nil {
		return t.GenDecl.Doc
	}
	return nil
}
960508
func (sh *Handler) DescribeLocked(ctx context.Context, dr *DescribeRequest) (dres *DescribeResponse, err error) {
	if verboseDescribe {
		t0 := time.Now()
		defer func() {
			td := time.Since(t0)
			var num int
			if dres != nil {
				num = len(dres.Meta)
			}
			log.Printf("Described %d blobs in %v", num, td)
		}()
	}
	sh.initDescribeRequest(dr)
	if dr.BlobRef.Valid() {
		dr.StartDescribe(ctx, dr.BlobRef, dr.depth())
	}
	for _, br := range dr.BlobRefs {
		dr.StartDescribe(ctx, br, dr.depth())
	}
	if err := dr.expandRules(ctx); err != nil {
		return nil, err
	}
	metaMap, err := dr.metaMap()
	if err != nil {
		return nil, err
	}
	return &DescribeResponse{metaMap}, nil
}
1361262
func (c *goCollector) Describe(ch chan<- *Desc) {
	ch <- c.goroutinesDesc
	ch <- c.threadsDesc
	ch <- c.gcDesc
	ch <- c.goInfoDesc
	for _, i := range c.metrics {
		ch <- i.desc
	}
}
684385
func (d *GroupDescriber) Describe(namespace, name string, settings describe.DescriberSettings) (string, error) {
	group, err := d.c.Groups().Get(name, metav1.GetOptions{})
	if err != nil {
		return "", err
	}

	return tabbedString(func(out *tabwriter.Writer) error {
		formatMeta(out, group.ObjectMeta)

		if len(group.Users) == 0 {
			formatString(out, "Users", "<none>")
		} else {
			for i, user := range group.Users {
				if i == 0 {
					formatString(out, "Users", user)
				} else {
					fmt.Fprintf(out, "           \t%s\n", user)
				}
			}
		}
		return nil
	})
}
498642
func (v ValidatorExtension) Rules() []ValidatorRule {
	if v.FieldValidator == nil {
		return nil
	}
	if v.rules != nil {
		return v.rules
	}
	vv := reflect.ValueOf(*v.FieldValidator)
	vt := vv.Type()
	for i := 0; i < vt.NumField(); i++ {
		tag, ok := vt.Field(i).Tag.Lookup("protobuf")
		if !ok {
			continue
		}
		for _, opt := range strings.Split(tag, ",") {
			if strings.HasPrefix(opt, "name=") {
				tag = strings.TrimPrefix(opt, "name=")
				break
			}
		}
		value := vv.Field(i)
		if value.IsNil() {
			continue
		}
		value = reflect.Indirect(value)
		v.rules = append(v.rules, ValidatorRule{Name: tag, Value: value.Interface()})
	}
	return v.rules
}
1164790
func (rule *Rule) Copy() *Rule {
	cpy := *rule
	cpy.Head = rule.Head.Copy()
	cpy.Body = rule.Body.Copy()
	if cpy.Else != nil {
		cpy.Else = rule.Else.Copy()
	}
	return &cpy
}
1248310
func (c *UsergroupsUpdateCall) Description(description string) *UsergroupsUpdateCall {
	c.description = description
	return c
}