lib/api/sfgate/sfgate_models/asset.go

244 lines
5.6 KiB
Go
Raw Normal View History

2022-09-05 00:01:32 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sfgate_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Asset asset
//
// swagger:model Asset
type Asset struct {
// Account
2023-04-15 14:27:18 +00:00
AccountID *string `json:"AccountID,omitempty"`
2022-09-05 00:01:32 +00:00
// address
Address *Address `json:"Address,omitempty"`
// Asset Level
2023-04-15 14:27:18 +00:00
AssetLevel *float64 `json:"AssetLevel,omitempty"`
2022-09-05 00:01:32 +00:00
// Asset Provided By
2023-04-15 14:27:18 +00:00
AssetProvidedByID *string `json:"AssetProvidedByID,omitempty"`
2022-09-05 00:01:32 +00:00
// Asset Serviced By
2023-04-15 14:27:18 +00:00
AssetServicedByID *string `json:"AssetServicedByID,omitempty"`
2022-09-05 00:01:32 +00:00
// Company Product
2023-04-15 14:27:18 +00:00
CompanyProductID *string `json:"CompanyProductID,omitempty"`
2022-09-05 00:01:32 +00:00
// Consequence Of Failure
2023-04-15 14:27:18 +00:00
ConsequenceOfFailure *string `json:"ConsequenceOfFailure,omitempty"`
2022-09-05 00:01:32 +00:00
// Contact
2023-04-15 14:27:18 +00:00
ContactID *string `json:"ContactID,omitempty"`
2022-09-05 00:01:32 +00:00
// Created By
2023-04-15 14:27:18 +00:00
CreatedByID *string `json:"CreatedByID,omitempty"`
2022-09-05 00:01:32 +00:00
// Created Date
2023-04-15 14:27:18 +00:00
CreatedDate *string `json:"CreatedDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Current Amount
2023-04-15 14:27:18 +00:00
CurrentAmount *float64 `json:"CurrentAmount,omitempty"`
2022-09-05 00:01:32 +00:00
// Current Lifecycle End Date
2023-04-15 14:27:18 +00:00
CurrentLifecycleEndDate *string `json:"CurrentLifecycleEndDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Current Monthly Recurring Revenue
2023-04-15 14:27:18 +00:00
CurrentMrr *float64 `json:"CurrentMrr,omitempty"`
2022-09-05 00:01:32 +00:00
// Current Quantity
2023-04-15 14:27:18 +00:00
CurrentQuantity *float64 `json:"CurrentQuantity,omitempty"`
2022-09-05 00:01:32 +00:00
// Description
2023-04-15 14:27:18 +00:00
Description *string `json:"Description,omitempty"`
2022-09-05 00:01:32 +00:00
// Digital Asset Status
2023-04-15 14:27:18 +00:00
DigitalAssetStatus *string `json:"DigitalAssetStatus,omitempty"`
2022-09-05 00:01:32 +00:00
// External Id
2023-04-15 14:27:18 +00:00
ExternalIdentifier *string `json:"ExternalIdentifier,omitempty"`
2022-09-05 00:01:32 +00:00
// Has Lifecycle Management
2023-04-15 14:27:18 +00:00
HasLifecycleManagement *bool `json:"HasLifecycleManagement,omitempty"`
2022-09-05 00:01:32 +00:00
2023-03-28 17:47:34 +00:00
// Record Id
2022-09-05 00:01:32 +00:00
ID string `json:"ID,omitempty"`
// Install Date
2023-04-15 14:27:18 +00:00
InstallDate *string `json:"InstallDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Competitor Asset
2023-04-15 14:27:18 +00:00
IsCompetitorProduct *bool `json:"IsCompetitorProduct,omitempty"`
2022-09-05 00:01:32 +00:00
// Internal Asset
2023-04-15 14:27:18 +00:00
IsInternal *bool `json:"IsInternal,omitempty"`
2022-09-05 00:01:32 +00:00
// Last Modified By
2023-04-15 14:27:18 +00:00
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
2022-09-05 00:01:32 +00:00
// Last Modified Date
2023-04-15 14:27:18 +00:00
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Location
2023-04-15 14:27:18 +00:00
LocationID *string `json:"LocationID,omitempty"`
2022-09-05 00:01:32 +00:00
// MIME Type
2023-04-15 14:27:18 +00:00
MIMEType *string `json:"MIMEType,omitempty"`
2022-09-05 00:01:32 +00:00
// Manufacture Date
2023-04-15 14:27:18 +00:00
ManufactureDate *string `json:"ManufactureDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Asset Name
2023-04-15 14:27:18 +00:00
Name *string `json:"Name,omitempty"`
2022-09-05 00:01:32 +00:00
// Parent Asset
2023-04-15 14:27:18 +00:00
ParentID *string `json:"ParentID,omitempty"`
2022-09-05 00:01:32 +00:00
// Price
2023-04-15 14:27:18 +00:00
Price *float64 `json:"Price,omitempty"`
2022-09-05 00:01:32 +00:00
// Product
2023-04-15 14:27:18 +00:00
Product2ID *string `json:"Product2ID,omitempty"`
2022-09-05 00:01:32 +00:00
// Product Code
2023-04-15 14:27:18 +00:00
ProductCode *string `json:"ProductCode,omitempty"`
2022-09-05 00:01:32 +00:00
// Product Description
2023-04-15 14:27:18 +00:00
ProductDescription *string `json:"ProductDescription,omitempty"`
2022-09-05 00:01:32 +00:00
// Product Family
2023-04-15 14:27:18 +00:00
ProductFamily *string `json:"ProductFamily,omitempty"`
2022-09-05 00:01:32 +00:00
// Purchase Date
2023-04-15 14:27:18 +00:00
PurchaseDate *string `json:"PurchaseDate,omitempty"`
2022-09-05 00:01:32 +00:00
// Quantity
2023-04-15 14:27:18 +00:00
Quantity *float64 `json:"Quantity,omitempty"`
2022-09-05 00:01:32 +00:00
// Root Asset
2023-04-15 14:27:18 +00:00
RootAssetID *string `json:"RootAssetID,omitempty"`
2022-09-05 00:01:32 +00:00
// Serial Number
2023-04-15 14:27:18 +00:00
SerialNumber *string `json:"SerialNumber,omitempty"`
2022-09-05 00:01:32 +00:00
// Status
2023-04-15 14:27:18 +00:00
Status *string `json:"Status,omitempty"`
2022-09-05 00:01:32 +00:00
// Status Reason
2023-04-15 14:27:18 +00:00
StatusReason *string `json:"StatusReason,omitempty"`
2022-09-05 00:01:32 +00:00
// Product SKU
2023-04-15 14:27:18 +00:00
StockKeepingUnit *string `json:"StockKeepingUnit,omitempty"`
2022-09-05 00:01:32 +00:00
// Tenant ID
2023-04-15 14:27:18 +00:00
TenantID *string `json:"TenantID,omitempty"`
2022-09-05 00:01:32 +00:00
// Total Lifecycle Amount
2023-04-15 14:27:18 +00:00
TotalLifecycleAmount *float64 `json:"TotalLifecycleAmount,omitempty"`
2022-09-05 00:01:32 +00:00
// Type
2023-04-15 14:27:18 +00:00
Type *string `json:"Type,omitempty"`
2022-09-05 00:01:32 +00:00
// URL
2023-04-15 14:27:18 +00:00
URL *string `json:"URL,omitempty"`
2022-09-05 00:01:32 +00:00
// Usage End Date
2023-04-15 14:27:18 +00:00
UsageEndDate *string `json:"UsageEndDate,omitempty"`
2022-09-05 00:01:32 +00:00
}
// Validate validates this asset
func (m *Asset) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAddress(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Asset) validateAddress(formats strfmt.Registry) error {
if swag.IsZero(m.Address) { // not required
return nil
}
if m.Address != nil {
if err := m.Address.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Address")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Address")
}
return err
}
}
return nil
}
// ContextValidate validate this asset based on the context it is used
func (m *Asset) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Asset) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
if m.Address != nil {
if err := m.Address.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Address")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Address")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *Asset) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Asset) UnmarshalBinary(b []byte) error {
var res Asset
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}