Ejemplo n.º 1
0
// MarshalJSON marshal this to JSON
func (s Schema) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(s.SchemaProps)
	if err != nil {
		return nil, fmt.Errorf("schema props %v", err)
	}
	b2, err := json.Marshal(s.VendorExtensible)
	if err != nil {
		return nil, fmt.Errorf("vendor props %v", err)
	}
	b3, err := s.Ref.MarshalJSON()
	if err != nil {
		return nil, fmt.Errorf("ref prop %v", err)
	}
	b4, err := s.Schema.MarshalJSON()
	if err != nil {
		return nil, fmt.Errorf("schema prop %v", err)
	}
	b5, err := json.Marshal(s.SwaggerSchemaProps)
	if err != nil {
		return nil, fmt.Errorf("common validations %v", err)
	}
	var b6 []byte
	if s.ExtraProps != nil {
		jj, err := json.Marshal(s.ExtraProps)
		if err != nil {
			return nil, fmt.Errorf("extra props %v", err)
		}
		b6 = jj
	}
	return swag.ConcatJSON(b1, b2, b3, b4, b5, b6), nil
}
Ejemplo n.º 2
0
// MarshalJSON marshal this to JSON
func (i Info) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(i.InfoProps)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(i.VendorExtensible)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b1, b2), nil
}
Ejemplo n.º 3
0
// MarshalJSON converts this items object to JSON
func (r Response) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(r.ResponseProps)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(r.Refable)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b1, b2), nil
}
Ejemplo n.º 4
0
// MarshalJSON marshal this to JSON
func (s SecurityScheme) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(s.SecuritySchemeProps)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(s.VendorExtensible)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b1, b2), nil
}
Ejemplo n.º 5
0
// MarshalJSON converts this items object to JSON
func (r Responses) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(r.responsesProps)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(r.VendorExtensible)
	if err != nil {
		return nil, err
	}
	concated := swag.ConcatJSON(b1, b2)
	return concated, nil
}
Ejemplo n.º 6
0
// MarshalJSON converts this items object to JSON
func (o Operation) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(o.OperationProps)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(o.VendorExtensible)
	if err != nil {
		return nil, err
	}
	concated := swag.ConcatJSON(b1, b2)
	return concated, nil
}
Ejemplo n.º 7
0
// MarshalJSON marshal this to JSON
func (h Header) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(h.CommonValidations)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(h.SimpleSchema)
	if err != nil {
		return nil, err
	}
	b3, err := json.Marshal(h.HeaderProps)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b1, b2, b3), nil
}
Ejemplo n.º 8
0
// MarshalJSON converts this items object to JSON
func (i Items) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(i.CommonValidations)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(i.SimpleSchema)
	if err != nil {
		return nil, err
	}
	b3, err := json.Marshal(i.Refable)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b3, b1, b2), nil
}
Ejemplo n.º 9
0
// MarshalJSON converts this items object to JSON
func (p PathItem) MarshalJSON() ([]byte, error) {
	b3, err := json.Marshal(p.Refable)
	if err != nil {
		return nil, err
	}
	b4, err := json.Marshal(p.VendorExtensible)
	if err != nil {
		return nil, err
	}
	b5, err := json.Marshal(p.pathItemProps)
	if err != nil {
		return nil, err
	}
	concated := swag.ConcatJSON(b3, b4, b5)
	return concated, nil
}
Ejemplo n.º 10
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJTagFetchFollowingWithRelationshipIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJTagFetchFollowingWithRelationshipIDOKBodyAO0, err := swag.WriteJSON(o.JTag)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJTagFetchFollowingWithRelationshipIDOKBodyAO0)

	postRemoteAPIJTagFetchFollowingWithRelationshipIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJTagFetchFollowingWithRelationshipIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 11
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJCredentialFetchUsersIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJCredentialFetchUsersIDOKBodyAO0, err := swag.WriteJSON(o.JCredential)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJCredentialFetchUsersIDOKBodyAO0)

	postRemoteAPIJCredentialFetchUsersIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJCredentialFetchUsersIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 12
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJRewardCampaignRemoveIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJRewardCampaignRemoveIDOKBodyAO0, err := swag.WriteJSON(o.JRewardCampaign)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJRewardCampaignRemoveIDOKBodyAO0)

	postRemoteAPIJRewardCampaignRemoveIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJRewardCampaignRemoveIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 13
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJMachineSetProvisionerIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJMachineSetProvisionerIDOKBodyAO0, err := swag.WriteJSON(o.JMachine)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJMachineSetProvisionerIDOKBodyAO0)

	postRemoteAPIJMachineSetProvisionerIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJMachineSetProvisionerIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 14
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJStackTemplateForceStacksToReinitIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJStackTemplateForceStacksToReinitIDOKBodyAO0, err := swag.WriteJSON(o.JStackTemplate)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJStackTemplateForceStacksToReinitIDOKBodyAO0)

	postRemoteAPIJStackTemplateForceStacksToReinitIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJStackTemplateForceStacksToReinitIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 15
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJComputeStackModifyIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJComputeStackModifyIDOKBodyAO0, err := swag.WriteJSON(o.JComputeStack)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJComputeStackModifyIDOKBodyAO0)

	postRemoteAPIJComputeStackModifyIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJComputeStackModifyIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 16
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJGroupFetchBlockedAccountsWithEmailIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJGroupFetchBlockedAccountsWithEmailIDOKBodyAO0, err := swag.WriteJSON(o.JGroup)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJGroupFetchBlockedAccountsWithEmailIDOKBodyAO0)

	postRemoteAPIJGroupFetchBlockedAccountsWithEmailIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJGroupFetchBlockedAccountsWithEmailIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 17
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJGroupChangeMemberRolesIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJGroupChangeMemberRolesIDOKBodyAO0, err := swag.WriteJSON(o.JGroup)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJGroupChangeMemberRolesIDOKBodyAO0)

	postRemoteAPIJGroupChangeMemberRolesIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJGroupChangeMemberRolesIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 18
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJAccountFetchEmailFrequencyIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJAccountFetchEmailFrequencyIDOKBodyAO0, err := swag.WriteJSON(o.JAccount)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJAccountFetchEmailFrequencyIDOKBodyAO0)

	postRemoteAPIJAccountFetchEmailFrequencyIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJAccountFetchEmailFrequencyIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 19
0
// MarshalJSON marshals this object to a JSON structure
func (o PostRemoteAPIJProxyFilterUpdateIDOKBody) MarshalJSON() ([]byte, error) {
	var _parts [][]byte

	postRemoteAPIJProxyFilterUpdateIDOKBodyAO0, err := swag.WriteJSON(o.JProxyFilter)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJProxyFilterUpdateIDOKBodyAO0)

	postRemoteAPIJProxyFilterUpdateIDOKBodyAO1, err := swag.WriteJSON(o.DefaultResponse)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, postRemoteAPIJProxyFilterUpdateIDOKBodyAO1)

	return swag.ConcatJSON(_parts...), nil
}
Ejemplo n.º 20
0
// MarshalJSON converts this items object to JSON
func (p Paths) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(p.VendorExtensible)
	if err != nil {
		return nil, err
	}

	pths := make(map[string]PathItem)
	for k, v := range p.Paths {
		if strings.HasPrefix(k, "/") {
			pths[k] = v
		}
	}
	b2, err := json.Marshal(pths)
	if err != nil {
		return nil, err
	}
	concated := swag.ConcatJSON(b1, b2)
	return concated, nil
}
Ejemplo n.º 21
0
// MarshalJSON converts this items object to JSON
func (p Parameter) MarshalJSON() ([]byte, error) {
	b1, err := json.Marshal(p.CommonValidations)
	if err != nil {
		return nil, err
	}
	b2, err := json.Marshal(p.SimpleSchema)
	if err != nil {
		return nil, err
	}
	b3, err := json.Marshal(p.Refable)
	if err != nil {
		return nil, err
	}
	b4, err := json.Marshal(p.VendorExtensible)
	if err != nil {
		return nil, err
	}
	b5, err := json.Marshal(p.ParamProps)
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b3, b1, b2, b4, b5), nil
}
Ejemplo n.º 22
0
// MarshalJSON marshals this object with a polymorphic type to a JSON structure
func (m ProductRatePlan) MarshalJSON() ([]byte, error) {
	var b1, b2 []byte
	var err error
	b1, err = json.Marshal(struct {
		AggregatingComponents []*AggregatingComponent `json:"aggregatingComponents,omitempty"`

		ChangedBy string `json:"changedBy,omitempty"`

		CreateZeroValuedInvoices bool `json:"createZeroValuedInvoices"`

		Created strfmt.DateTime `json:"created,omitempty"`

		CrmID string `json:"crmID,omitempty"`

		Currency *string `json:"currency"`

		Duration int32 `json:"duration,omitempty"`

		DurationPeriod *string `json:"durationPeriod"`

		FailedPaymentBehaviour *string `json:"failedPaymentBehaviour"`

		FixedTermDefinitions []*MutableBillingEntity `json:"fixedTermDefinitions,omitempty"`

		ID string `json:"id,omitempty"`

		InvoiceIssueType string `json:"invoiceIssueType,omitempty"`

		IssueDuration int32 `json:"issueDuration,omitempty"`

		IssuePeriod string `json:"issuePeriod,omitempty"`

		Metadata DynamicMetadata `json:"metadata,omitempty"`

		MigrationBehaviour *string `json:"migrationBehaviour"`

		Name *string `json:"name"`

		PaymentTerms int64 `json:"paymentTerms,omitempty"`

		ProRataMode *string `json:"proRataMode"`

		Product *Product `json:"product,omitempty"`

		ProductID *string `json:"productID"`

		ProductType string `json:"productType,omitempty"`

		PublicName string `json:"publicName,omitempty"`

		Status string `json:"status,omitempty"`

		TaxStatus *string `json:"taxStatus"`

		Taxation []*MutableBillingEntity `json:"taxation,omitempty"`

		Trial int32 `json:"trial,omitempty"`

		TrialPeriod string `json:"trialPeriod,omitempty"`

		Updated strfmt.DateTime `json:"updated,omitempty"`

		ValidFrom strfmt.DateTime `json:"validFrom,omitempty"`

		ValidTill strfmt.DateTime `json:"validTill,omitempty"`
	}{
		AggregatingComponents:    m.AggregatingComponents,
		ChangedBy:                m.ChangedBy,
		CreateZeroValuedInvoices: m.CreateZeroValuedInvoices,
		Created:                  m.Created,
		CrmID:                    m.CrmID,
		Currency:                 m.Currency,
		Duration:                 m.Duration,
		DurationPeriod:           m.DurationPeriod,
		FailedPaymentBehaviour:   m.FailedPaymentBehaviour,
		FixedTermDefinitions:     m.FixedTermDefinitions,
		ID:                       m.ID,
		InvoiceIssueType:         m.InvoiceIssueType,
		IssueDuration:            m.IssueDuration,
		IssuePeriod:              m.IssuePeriod,
		Metadata:                 m.Metadata,
		MigrationBehaviour:       m.MigrationBehaviour,
		Name:                     m.Name,
		PaymentTerms:             m.PaymentTerms,
		ProRataMode:              m.ProRataMode,
		Product:                  m.Product,
		ProductID:                m.ProductID,
		ProductType:              m.ProductType,
		PublicName:               m.PublicName,
		Status:                   m.Status,
		TaxStatus:                m.TaxStatus,
		Taxation:                 m.Taxation,
		Trial:                    m.Trial,
		TrialPeriod:              m.TrialPeriod,
		Updated:                  m.Updated,
		ValidFrom:                m.ValidFrom,
		ValidTill:                m.ValidTill,
	})
	if err != nil {
		return nil, err
	}
	b2, err = json.Marshal(struct {
		PricingComponents []PricingComponent `json:"pricingComponents"`
	}{
		PricingComponents: m.PricingComponents,
	})
	if err != nil {
		return nil, err
	}
	return swag.ConcatJSON(b1, b2), nil
}