Example #1
0
func (this *MapStruct) String() string {
	if this == nil {
		return "nil"
	}
	keysForNullableMap := make([]string, 0, len(this.NullableMap))
	for k, _ := range this.NullableMap {
		keysForNullableMap = append(keysForNullableMap, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForNullableMap)
	mapStringForNullableMap := "map[string]*BasicScalar{"
	for _, k := range keysForNullableMap {
		mapStringForNullableMap += fmt.Sprintf("%v: %v,", k, this.NullableMap[k])
	}
	mapStringForNullableMap += "}"
	keysForNonnullableMap := make([]string, 0, len(this.NonnullableMap))
	for k, _ := range this.NonnullableMap {
		keysForNonnullableMap = append(keysForNonnullableMap, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForNonnullableMap)
	mapStringForNonnullableMap := "map[string]BasicScalar{"
	for _, k := range keysForNonnullableMap {
		mapStringForNonnullableMap += fmt.Sprintf("%v: %v,", k, this.NonnullableMap[k])
	}
	mapStringForNonnullableMap += "}"
	s := strings.Join([]string{`&MapStruct{`,
		`NullableMap:` + mapStringForNullableMap + `,`,
		`NonnullableMap:` + mapStringForNonnullableMap + `,`,
		`}`,
	}, "")
	return s
}
Example #2
0
func (this *TNode) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 7)
	s = append(s, "&index.TNode{")
	if this.Node != nil {
		s = append(s, "Node: "+fmt.Sprintf("%#v", this.Node)+",\n")
	}
	keysForChildren := make([]string, 0, len(this.Children))
	for k, _ := range this.Children {
		keysForChildren = append(keysForChildren, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForChildren)
	mapStringForChildren := "map[string]*TNode{"
	for _, k := range keysForChildren {
		mapStringForChildren += fmt.Sprintf("%#v: %#v,", k, this.Children[k])
	}
	mapStringForChildren += "}"
	if this.Children != nil {
		s = append(s, "Children: "+mapStringForChildren+",\n")
	}
	s = append(s, "Mutex: "+fmt.Sprintf("%#v", this.Mutex)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (m *ProtoRoutes) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Routes) > 0 {
		keysForRoutes := make([]string, 0, len(m.Routes))
		for k, _ := range m.Routes {
			keysForRoutes = append(keysForRoutes, k)
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForRoutes)
		for _, k := range keysForRoutes {
			data[i] = 0xa
			i++
			v := m.Routes[k]
			mapSize := 1 + len(k) + sovDesiredLrp(uint64(len(k))) + 1 + len(v) + sovDesiredLrp(uint64(len(v)))
			i = encodeVarintDesiredLrp(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintDesiredLrp(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintDesiredLrp(data, i, uint64(len(v)))
			i += copy(data[i:], v)
		}
	}
	return i, nil
}
Example #4
0
func (this *SQSMessagePayload) String() string {
	if this == nil {
		return "nil"
	}
	keysForUserAttributes := make([]string, 0, len(this.UserAttributes))
	for k, _ := range this.UserAttributes {
		keysForUserAttributes = append(keysForUserAttributes, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForUserAttributes)
	mapStringForUserAttributes := "map[string]*UserAttribute{"
	for _, k := range keysForUserAttributes {
		mapStringForUserAttributes += fmt.Sprintf("%v: %v,", k, this.UserAttributes[k])
	}
	mapStringForUserAttributes += "}"
	s := strings.Join([]string{`&SQSMessagePayload{`,
		`Payload:` + fmt.Sprintf("%v", this.Payload) + `,`,
		`MD5OfMessageBody:` + fmt.Sprintf("%v", this.MD5OfMessageBody) + `,`,
		`MD5OfMessageAttributes:` + fmt.Sprintf("%v", this.MD5OfMessageAttributes) + `,`,
		`SenderId:` + fmt.Sprintf("%v", this.SenderId) + `,`,
		`SentTimestamp:` + fmt.Sprintf("%v", this.SentTimestamp) + `,`,
		`UserAttributes:` + mapStringForUserAttributes + `,`,
		`}`,
	}, "")
	return s
}
Example #5
0
func (this *SQSMessagePayload) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 10)
	s = append(s, "&sqsmsg.SQSMessagePayload{")
	s = append(s, "Payload: "+fmt.Sprintf("%#v", this.Payload)+",\n")
	s = append(s, "MD5OfMessageBody: "+fmt.Sprintf("%#v", this.MD5OfMessageBody)+",\n")
	s = append(s, "MD5OfMessageAttributes: "+fmt.Sprintf("%#v", this.MD5OfMessageAttributes)+",\n")
	s = append(s, "SenderId: "+fmt.Sprintf("%#v", this.SenderId)+",\n")
	s = append(s, "SentTimestamp: "+fmt.Sprintf("%#v", this.SentTimestamp)+",\n")
	keysForUserAttributes := make([]string, 0, len(this.UserAttributes))
	for k, _ := range this.UserAttributes {
		keysForUserAttributes = append(keysForUserAttributes, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForUserAttributes)
	mapStringForUserAttributes := "map[string]*UserAttribute{"
	for _, k := range keysForUserAttributes {
		mapStringForUserAttributes += fmt.Sprintf("%#v: %#v,", k, this.UserAttributes[k])
	}
	mapStringForUserAttributes += "}"
	if this.UserAttributes != nil {
		s = append(s, "UserAttributes: "+mapStringForUserAttributes+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
Example #6
0
func (this *PodDisruptionBudgetStatus) String() string {
	if this == nil {
		return "nil"
	}
	keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods))
	for k := range this.DisruptedPods {
		keysForDisruptedPods = append(keysForDisruptedPods, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
	mapStringForDisruptedPods := "map[string]k8s_io_kubernetes_pkg_api_unversioned.Time{"
	for _, k := range keysForDisruptedPods {
		mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k])
	}
	mapStringForDisruptedPods += "}"
	s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
		`ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
		`DisruptedPods:` + mapStringForDisruptedPods + `,`,
		`PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
		`CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
		`DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
		`ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
		`}`,
	}, "")
	return s
}
Example #7
0
func (m *TNode) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Node != nil {
		data[i] = 0xa
		i++
		i = encodeVarintProtocol(data, i, uint64(m.Node.Size()))
		n1, err := m.Node.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	if len(m.Children) > 0 {
		keysForChildren := make([]string, 0, len(m.Children))
		for k, _ := range m.Children {
			keysForChildren = append(keysForChildren, k)
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForChildren)
		for _, k := range keysForChildren {
			data[i] = 0x12
			i++
			v := m.Children[k]
			if v == nil {
				return 0, errors.New("proto: map has nil element")
			}
			msgSize := v.Size()
			mapSize := 1 + len(k) + sovProtocol(uint64(len(k))) + 1 + msgSize + sovProtocol(uint64(msgSize))
			i = encodeVarintProtocol(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintProtocol(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintProtocol(data, i, uint64(v.Size()))
			n2, err := v.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n2
		}
	}
	data[i] = 0x1a
	i++
	i = encodeVarintProtocol(data, i, uint64(m.Mutex.Size()))
	n3, err := m.Mutex.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n3
	return i, nil
}
Example #8
0
func (this *Topic) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 13)
	s = append(s, "&dbdata.Topic{")
	s = append(s, "Arn: "+fmt.Sprintf("%#v", this.Arn)+",\n")
	s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
	s = append(s, "DisplayName: "+fmt.Sprintf("%#v", this.DisplayName)+",\n")
	s = append(s, "Policy: "+fmt.Sprintf("%#v", this.Policy)+",\n")
	s = append(s, "DeliveryPolicy: "+fmt.Sprintf("%#v", this.DeliveryPolicy)+",\n")
	s = append(s, "EffectiveDeliveryPolicy: "+fmt.Sprintf("%#v", this.EffectiveDeliveryPolicy)+",\n")
	s = append(s, "DeletedSubscriptions: "+fmt.Sprintf("%#v", this.DeletedSubscriptions)+",\n")
	keysForSqsSubscriptions := make([]string, 0, len(this.SqsSubscriptions))
	for k, _ := range this.SqsSubscriptions {
		keysForSqsSubscriptions = append(keysForSqsSubscriptions, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForSqsSubscriptions)
	mapStringForSqsSubscriptions := "map[string]*Subscription{"
	for _, k := range keysForSqsSubscriptions {
		mapStringForSqsSubscriptions += fmt.Sprintf("%#v: %#v,", k, this.SqsSubscriptions[k])
	}
	mapStringForSqsSubscriptions += "}"
	if this.SqsSubscriptions != nil {
		s = append(s, "SqsSubscriptions: "+mapStringForSqsSubscriptions+",\n")
	}
	keysForOtherSubscriptions := make([]string, 0, len(this.OtherSubscriptions))
	for k, _ := range this.OtherSubscriptions {
		keysForOtherSubscriptions = append(keysForOtherSubscriptions, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForOtherSubscriptions)
	mapStringForOtherSubscriptions := "map[string]*Subscription{"
	for _, k := range keysForOtherSubscriptions {
		mapStringForOtherSubscriptions += fmt.Sprintf("%#v: %#v,", k, this.OtherSubscriptions[k])
	}
	mapStringForOtherSubscriptions += "}"
	if this.OtherSubscriptions != nil {
		s = append(s, "OtherSubscriptions: "+mapStringForOtherSubscriptions+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
Example #9
0
func (this *Topic) String() string {
	if this == nil {
		return "nil"
	}
	keysForSqsSubscriptions := make([]string, 0, len(this.SqsSubscriptions))
	for k, _ := range this.SqsSubscriptions {
		keysForSqsSubscriptions = append(keysForSqsSubscriptions, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForSqsSubscriptions)
	mapStringForSqsSubscriptions := "map[string]*Subscription{"
	for _, k := range keysForSqsSubscriptions {
		mapStringForSqsSubscriptions += fmt.Sprintf("%v: %v,", k, this.SqsSubscriptions[k])
	}
	mapStringForSqsSubscriptions += "}"
	keysForOtherSubscriptions := make([]string, 0, len(this.OtherSubscriptions))
	for k, _ := range this.OtherSubscriptions {
		keysForOtherSubscriptions = append(keysForOtherSubscriptions, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForOtherSubscriptions)
	mapStringForOtherSubscriptions := "map[string]*Subscription{"
	for _, k := range keysForOtherSubscriptions {
		mapStringForOtherSubscriptions += fmt.Sprintf("%v: %v,", k, this.OtherSubscriptions[k])
	}
	mapStringForOtherSubscriptions += "}"
	s := strings.Join([]string{`&Topic{`,
		`Arn:` + fmt.Sprintf("%v", this.Arn) + `,`,
		`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
		`DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`,
		`Policy:` + fmt.Sprintf("%v", this.Policy) + `,`,
		`DeliveryPolicy:` + fmt.Sprintf("%v", this.DeliveryPolicy) + `,`,
		`EffectiveDeliveryPolicy:` + fmt.Sprintf("%v", this.EffectiveDeliveryPolicy) + `,`,
		`DeletedSubscriptions:` + fmt.Sprintf("%v", this.DeletedSubscriptions) + `,`,
		`SqsSubscriptions:` + mapStringForSqsSubscriptions + `,`,
		`OtherSubscriptions:` + mapStringForOtherSubscriptions + `,`,
		`}`,
	}, "")
	return s
}
Example #10
0
func (m *SpanContextCarrier) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.TraceID != 0 {
		data[i] = 0x8
		i++
		i = encodeVarintSpanContextCarrier(data, i, uint64(m.TraceID))
	}
	if m.SpanID != 0 {
		data[i] = 0x10
		i++
		i = encodeVarintSpanContextCarrier(data, i, uint64(m.SpanID))
	}
	if m.Sampled {
		data[i] = 0x18
		i++
		if m.Sampled {
			data[i] = 1
		} else {
			data[i] = 0
		}
		i++
	}
	if len(m.Baggage) > 0 {
		keysForBaggage := make([]string, 0, len(m.Baggage))
		for k := range m.Baggage {
			keysForBaggage = append(keysForBaggage, string(k))
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForBaggage)
		for _, k := range keysForBaggage {
			data[i] = 0x22
			i++
			v := m.Baggage[string(k)]
			mapSize := 1 + len(k) + sovSpanContextCarrier(uint64(len(k))) + 1 + len(v) + sovSpanContextCarrier(uint64(len(v)))
			i = encodeVarintSpanContextCarrier(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintSpanContextCarrier(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintSpanContextCarrier(data, i, uint64(len(v)))
			i += copy(data[i:], v)
		}
	}
	return i, nil
}
func (this *ProtoRoutes) GoString() string {
	if this == nil {
		return "nil"
	}
	keysForRoutes := make([]string, 0, len(this.Routes))
	for k, _ := range this.Routes {
		keysForRoutes = append(keysForRoutes, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForRoutes)
	mapStringForRoutes := "map[string][]byte{"
	for _, k := range keysForRoutes {
		mapStringForRoutes += fmt.Sprintf("%#v: %#v,", k, this.Routes[k])
	}
	mapStringForRoutes += "}"
	s := strings.Join([]string{`&models.ProtoRoutes{` +
		`Routes:` + mapStringForRoutes + `}`}, ", ")
	return s
}
Example #12
0
func (this *SnapInfo) String() string {
	if this == nil {
		return "nil"
	}
	keysForBranches := make([]string, 0, len(this.Branches))
	for k, _ := range this.Branches {
		keysForBranches = append(keysForBranches, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForBranches)
	mapStringForBranches := "map[string]*Offset{"
	for _, k := range keysForBranches {
		mapStringForBranches += fmt.Sprintf("%v: %v,", k, this.Branches[k])
	}
	mapStringForBranches += "}"
	s := strings.Join([]string{`&SnapInfo{`,
		`Branches:` + mapStringForBranches + `,`,
		`}`,
	}, "")
	return s
}
Example #13
0
func (this *Network) String() string {
	if this == nil {
		return "nil"
	}
	keysForProperties := make([]string, 0, len(this.Properties))
	for k, _ := range this.Properties {
		keysForProperties = append(keysForProperties, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForProperties)
	mapStringForProperties := "map[string]string{"
	for _, k := range keysForProperties {
		mapStringForProperties += fmt.Sprintf("%v: %v,", k, this.Properties[k])
	}
	mapStringForProperties += "}"
	s := strings.Join([]string{`&Network{`,
		`Properties:` + mapStringForProperties + `,`,
		`}`,
	}, "")
	return s
}
Example #14
0
func (this *Struct) String() string {
	if this == nil {
		return "nil"
	}
	keysForFields := make([]string, 0, len(this.Fields))
	for k := range this.Fields {
		keysForFields = append(keysForFields, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForFields)
	mapStringForFields := "map[string]*Value{"
	for _, k := range keysForFields {
		mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k])
	}
	mapStringForFields += "}"
	s := strings.Join([]string{`&Struct{`,
		`Fields:` + mapStringForFields + `,`,
		`}`,
	}, "")
	return s
}
Example #15
0
func (this *LabelSelector) String() string {
	if this == nil {
		return "nil"
	}
	keysForMatchLabels := make([]string, 0, len(this.MatchLabels))
	for k := range this.MatchLabels {
		keysForMatchLabels = append(keysForMatchLabels, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels)
	mapStringForMatchLabels := "map[string]string{"
	for _, k := range keysForMatchLabels {
		mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k])
	}
	mapStringForMatchLabels += "}"
	s := strings.Join([]string{`&LabelSelector{`,
		`MatchLabels:` + mapStringForMatchLabels + `,`,
		`MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`,
		`}`,
	}, "")
	return s
}
Example #16
0
func (this *ClusterResourceQuotaSelector) String() string {
	if this == nil {
		return "nil"
	}
	keysForAnnotationSelector := make([]string, 0, len(this.AnnotationSelector))
	for k := range this.AnnotationSelector {
		keysForAnnotationSelector = append(keysForAnnotationSelector, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotationSelector)
	mapStringForAnnotationSelector := "map[string]string{"
	for _, k := range keysForAnnotationSelector {
		mapStringForAnnotationSelector += fmt.Sprintf("%v: %v,", k, this.AnnotationSelector[k])
	}
	mapStringForAnnotationSelector += "}"
	s := strings.Join([]string{`&ClusterResourceQuotaSelector{`,
		`LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`,
		`AnnotationSelector:` + mapStringForAnnotationSelector + `,`,
		`}`,
	}, "")
	return s
}
Example #17
0
func (this *StorageClass) String() string {
	if this == nil {
		return "nil"
	}
	keysForParameters := make([]string, 0, len(this.Parameters))
	for k := range this.Parameters {
		keysForParameters = append(keysForParameters, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
	mapStringForParameters := "map[string]string{"
	for _, k := range keysForParameters {
		mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
	}
	mapStringForParameters += "}"
	s := strings.Join([]string{`&StorageClass{`,
		`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
		`Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
		`Parameters:` + mapStringForParameters + `,`,
		`}`,
	}, "")
	return s
}
Example #18
0
func (this *Struct) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&types.Struct{")
	keysForFields := make([]string, 0, len(this.Fields))
	for k := range this.Fields {
		keysForFields = append(keysForFields, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForFields)
	mapStringForFields := "map[string]*Value{"
	for _, k := range keysForFields {
		mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k])
	}
	mapStringForFields += "}"
	if this.Fields != nil {
		s = append(s, "Fields: "+mapStringForFields+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
Example #19
0
func (this *ImageReviewSpec) String() string {
	if this == nil {
		return "nil"
	}
	keysForAnnotations := make([]string, 0, len(this.Annotations))
	for k := range this.Annotations {
		keysForAnnotations = append(keysForAnnotations, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
	mapStringForAnnotations := "map[string]string{"
	for _, k := range keysForAnnotations {
		mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
	}
	mapStringForAnnotations += "}"
	s := strings.Join([]string{`&ImageReviewSpec{`,
		`Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "ImageReviewContainerSpec", "ImageReviewContainerSpec", 1), `&`, ``, 1) + `,`,
		`Annotations:` + mapStringForAnnotations + `,`,
		`Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
		`}`,
	}, "")
	return s
}
Example #20
0
func (this *SnapInfo) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&index.SnapInfo{")
	keysForBranches := make([]string, 0, len(this.Branches))
	for k, _ := range this.Branches {
		keysForBranches = append(keysForBranches, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForBranches)
	mapStringForBranches := "map[string]*Offset{"
	for _, k := range keysForBranches {
		mapStringForBranches += fmt.Sprintf("%#v: %#v,", k, this.Branches[k])
	}
	mapStringForBranches += "}"
	if this.Branches != nil {
		s = append(s, "Branches: "+mapStringForBranches+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
Example #21
0
func (this *Network) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&models.Network{")
	keysForProperties := make([]string, 0, len(this.Properties))
	for k, _ := range this.Properties {
		keysForProperties = append(keysForProperties, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForProperties)
	mapStringForProperties := "map[string]string{"
	for _, k := range keysForProperties {
		mapStringForProperties += fmt.Sprintf("%#v: %#v,", k, this.Properties[k])
	}
	mapStringForProperties += "}"
	if this.Properties != nil {
		s = append(s, "Properties: "+mapStringForProperties+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
Example #22
0
func (this *TNode) String() string {
	if this == nil {
		return "nil"
	}
	keysForChildren := make([]string, 0, len(this.Children))
	for k, _ := range this.Children {
		keysForChildren = append(keysForChildren, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForChildren)
	mapStringForChildren := "map[string]*TNode{"
	for _, k := range keysForChildren {
		mapStringForChildren += fmt.Sprintf("%v: %v,", k, this.Children[k])
	}
	mapStringForChildren += "}"
	s := strings.Join([]string{`&TNode{`,
		`Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`,
		`Children:` + mapStringForChildren + `,`,
		`Mutex:` + fmt.Sprintf("%v", this.Mutex) + `,`,
		`}`,
	}, "")
	return s
}
Example #23
0
func (this *UserInfo) String() string {
	if this == nil {
		return "nil"
	}
	keysForExtra := make([]string, 0, len(this.Extra))
	for k := range this.Extra {
		keysForExtra = append(keysForExtra, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
	mapStringForExtra := "map[string]ExtraValue{"
	for _, k := range keysForExtra {
		mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
	}
	mapStringForExtra += "}"
	s := strings.Join([]string{`&UserInfo{`,
		`Username:` + fmt.Sprintf("%v", this.Username) + `,`,
		`UID:` + fmt.Sprintf("%v", this.UID) + `,`,
		`Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
		`Extra:` + mapStringForExtra + `,`,
		`}`,
	}, "")
	return s
}
Example #24
0
func (m *SnapInfo) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Branches) > 0 {
		keysForBranches := make([]string, 0, len(m.Branches))
		for k, _ := range m.Branches {
			keysForBranches = append(keysForBranches, k)
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForBranches)
		for _, k := range keysForBranches {
			data[i] = 0xa
			i++
			v := m.Branches[k]
			if v == nil {
				return 0, errors.New("proto: map has nil element")
			}
			msgSize := v.Size()
			mapSize := 1 + len(k) + sovProtocol(uint64(len(k))) + 1 + msgSize + sovProtocol(uint64(msgSize))
			i = encodeVarintProtocol(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintProtocol(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintProtocol(data, i, uint64(v.Size()))
			n4, err := v.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n4
		}
	}
	return i, nil
}
Example #25
0
func (m *StoreStatus) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	data[i] = 0xa
	i++
	i = encodeVarintStatus(data, i, uint64(m.Desc.Size()))
	n1, err := m.Desc.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n1
	if len(m.Metrics) > 0 {
		keysForMetrics := make([]string, 0, len(m.Metrics))
		for k := range m.Metrics {
			keysForMetrics = append(keysForMetrics, string(k))
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForMetrics)
		for _, k := range keysForMetrics {
			data[i] = 0x12
			i++
			v := m.Metrics[string(k)]
			mapSize := 1 + len(k) + sovStatus(uint64(len(k))) + 1 + 8
			i = encodeVarintStatus(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintStatus(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x11
			i++
			i = encodeFixed64Status(data, i, uint64(math.Float64bits(float64(v))))
		}
	}
	return i, nil
}
Example #26
0
func (this *Template) String() string {
	if this == nil {
		return "nil"
	}
	keysForObjectLabels := make([]string, 0, len(this.ObjectLabels))
	for k := range this.ObjectLabels {
		keysForObjectLabels = append(keysForObjectLabels, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForObjectLabels)
	mapStringForObjectLabels := "map[string]string{"
	for _, k := range keysForObjectLabels {
		mapStringForObjectLabels += fmt.Sprintf("%v: %v,", k, this.ObjectLabels[k])
	}
	mapStringForObjectLabels += "}"
	s := strings.Join([]string{`&Template{`,
		`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
		`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
		`Objects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Objects), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
		`Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "Parameter", "Parameter", 1), `&`, ``, 1) + `,`,
		`ObjectLabels:` + mapStringForObjectLabels + `,`,
		`}`,
	}, "")
	return s
}
Example #27
0
func (this *Identity) String() string {
	if this == nil {
		return "nil"
	}
	keysForExtra := make([]string, 0, len(this.Extra))
	for k := range this.Extra {
		keysForExtra = append(keysForExtra, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
	mapStringForExtra := "map[string]string{"
	for _, k := range keysForExtra {
		mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
	}
	mapStringForExtra += "}"
	s := strings.Join([]string{`&Identity{`,
		`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
		`ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`,
		`ProviderUserName:` + fmt.Sprintf("%v", this.ProviderUserName) + `,`,
		`User:` + strings.Replace(strings.Replace(this.User.String(), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
		`Extra:` + mapStringForExtra + `,`,
		`}`,
	}, "")
	return s
}
Example #28
0
func (m *Request) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.NodeID != 0 {
		data[i] = 0x8
		i++
		i = encodeVarintGossip(data, i, uint64(m.NodeID))
	}
	data[i] = 0x12
	i++
	i = encodeVarintGossip(data, i, uint64(m.Addr.Size()))
	n1, err := m.Addr.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n1
	data[i] = 0x1a
	i++
	i = encodeVarintGossip(data, i, uint64(m.LAddr.Size()))
	n2, err := m.LAddr.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n2
	if len(m.HighWaterStamps) > 0 {
		keysForHighWaterStamps := make([]int32, 0, len(m.HighWaterStamps))
		for k := range m.HighWaterStamps {
			keysForHighWaterStamps = append(keysForHighWaterStamps, k)
		}
		github_com_gogo_protobuf_sortkeys.Int32s(keysForHighWaterStamps)
		for _, k := range keysForHighWaterStamps {
			data[i] = 0x22
			i++
			v := m.HighWaterStamps[k]
			mapSize := 1 + sovGossip(uint64(k)) + 1 + sovGossip(uint64(v))
			i = encodeVarintGossip(data, i, uint64(mapSize))
			data[i] = 0x8
			i++
			i = encodeVarintGossip(data, i, uint64(k))
			data[i] = 0x10
			i++
			i = encodeVarintGossip(data, i, uint64(v))
		}
	}
	if len(m.Delta) > 0 {
		keysForDelta := make([]string, 0, len(m.Delta))
		for k := range m.Delta {
			keysForDelta = append(keysForDelta, k)
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForDelta)
		for _, k := range keysForDelta {
			data[i] = 0x2a
			i++
			v := m.Delta[k]
			if v == nil {
				return 0, errors.New("proto: map has nil element")
			}
			msgSize := v.Size()
			mapSize := 1 + len(k) + sovGossip(uint64(len(k))) + 1 + msgSize + sovGossip(uint64(msgSize))
			i = encodeVarintGossip(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintGossip(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintGossip(data, i, uint64(v.Size()))
			n3, err := v.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n3
		}
	}
	return i, nil
}
Example #29
0
func (m *Response) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.NodeID != 0 {
		data[i] = 0x8
		i++
		i = encodeVarintGossip(data, i, uint64(m.NodeID))
	}
	data[i] = 0x12
	i++
	i = encodeVarintGossip(data, i, uint64(m.Addr.Size()))
	n4, err := m.Addr.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n4
	if m.AlternateAddr != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintGossip(data, i, uint64(m.AlternateAddr.Size()))
		n5, err := m.AlternateAddr.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	if m.AlternateNodeID != 0 {
		data[i] = 0x20
		i++
		i = encodeVarintGossip(data, i, uint64(m.AlternateNodeID))
	}
	if len(m.Delta) > 0 {
		keysForDelta := make([]string, 0, len(m.Delta))
		for k := range m.Delta {
			keysForDelta = append(keysForDelta, string(k))
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForDelta)
		for _, k := range keysForDelta {
			data[i] = 0x2a
			i++
			v := m.Delta[string(k)]
			if v == nil {
				return 0, errors.New("proto: map has nil element")
			}
			msgSize := v.Size()
			mapSize := 1 + len(k) + sovGossip(uint64(len(k))) + 1 + msgSize + sovGossip(uint64(msgSize))
			i = encodeVarintGossip(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintGossip(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintGossip(data, i, uint64(v.Size()))
			n6, err := v.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n6
		}
	}
	if len(m.HighWaterStamps) > 0 {
		keysForHighWaterStamps := make([]int32, 0, len(m.HighWaterStamps))
		for k := range m.HighWaterStamps {
			keysForHighWaterStamps = append(keysForHighWaterStamps, int32(k))
		}
		github_com_gogo_protobuf_sortkeys.Int32s(keysForHighWaterStamps)
		for _, k := range keysForHighWaterStamps {
			data[i] = 0x32
			i++
			v := m.HighWaterStamps[github_com_cockroachdb_cockroach_roachpb.NodeID(k)]
			mapSize := 1 + sovGossip(uint64(k)) + 1 + sovGossip(uint64(v))
			i = encodeVarintGossip(data, i, uint64(mapSize))
			data[i] = 0x8
			i++
			i = encodeVarintGossip(data, i, uint64(k))
			data[i] = 0x10
			i++
			i = encodeVarintGossip(data, i, uint64(v))
		}
	}
	return i, nil
}
Example #30
0
func (m *Response) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.NodeID != 0 {
		data[i] = 0x8
		i++
		i = encodeVarintGossip(data, i, uint64(m.NodeID))
	}
	data[i] = 0x12
	i++
	i = encodeVarintGossip(data, i, uint64(m.Addr.Size()))
	n4, err := m.Addr.MarshalTo(data[i:])
	if err != nil {
		return 0, err
	}
	i += n4
	if m.Alternate != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintGossip(data, i, uint64(m.Alternate.Size()))
		n5, err := m.Alternate.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	if m.MaxSeq != 0 {
		data[i] = 0x20
		i++
		i = encodeVarintGossip(data, i, uint64(m.MaxSeq))
	}
	if len(m.Delta) > 0 {
		keysForDelta := make([]string, 0, len(m.Delta))
		for k := range m.Delta {
			keysForDelta = append(keysForDelta, k)
		}
		github_com_gogo_protobuf_sortkeys.Strings(keysForDelta)
		for _, k := range keysForDelta {
			data[i] = 0x2a
			i++
			v := m.Delta[k]
			if v == nil {
				return 0, errors.New("proto: map has nil element")
			}
			msgSize := v.Size()
			mapSize := 1 + len(k) + sovGossip(uint64(len(k))) + 1 + msgSize + sovGossip(uint64(msgSize))
			i = encodeVarintGossip(data, i, uint64(mapSize))
			data[i] = 0xa
			i++
			i = encodeVarintGossip(data, i, uint64(len(k)))
			i += copy(data[i:], k)
			data[i] = 0x12
			i++
			i = encodeVarintGossip(data, i, uint64(v.Size()))
			n6, err := v.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n6
		}
	}
	return i, nil
}