// Code generated by go-swagger; DO NOT EDIT. // (c) 2012-2023 by Vernon Keenan // 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" "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // Industry An industry that is being researched // // swagger:model industry type Industry struct { // The list of Products in this industry CompanyProducts []*IndustryCompanyProductsItems0 `json:"CompanyProducts"` // The list of Services in this industry CompanyServices []*IndustryCompanyServicesItems0 `json:"CompanyServices"` // Created By User ID CreatedByID *string `json:"CreatedByID,omitempty"` // Created Date CreatedDate *string `json:"CreatedDate,omitempty"` // Industry Description Description *string `json:"Description,omitempty"` // Record Id ID string `json:"ID,omitempty"` // Image Alt Text ImageAltText *string `json:"ImageAltText,omitempty"` // Image URL ImageURL *string `json:"ImageURL,omitempty"` // Last Modified By User ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` // Last Modified Date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` // The hierarchical level of this Industry Level *string `json:"Level,omitempty"` // Logo Logo *string `json:"Logo,omitempty"` // Industry Name Name *string `json:"Name,omitempty"` // The ID of the Parent Industry ParentIndustryID *string `json:"ParentIndustryID,omitempty"` // The full path of this industry, including Parent Path *string `json:"Path,omitempty"` // Is this industry a product category? ProductCategory *bool `json:"ProductCategory,omitempty"` // Is this industry a service category? ServiceCategory *bool `json:"ServiceCategory,omitempty"` // The CMS Slug for this Industry Slug *string `json:"Slug,omitempty"` // TagLine TagLine *string `json:"TagLine,omitempty"` } // Validate validates this industry func (m *Industry) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCompanyProducts(formats); err != nil { res = append(res, err) } if err := m.validateCompanyServices(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *Industry) validateCompanyProducts(formats strfmt.Registry) error { if swag.IsZero(m.CompanyProducts) { // not required return nil } for i := 0; i < len(m.CompanyProducts); i++ { if swag.IsZero(m.CompanyProducts[i]) { // not required continue } if m.CompanyProducts[i] != nil { if err := m.CompanyProducts[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i)) } return err } } } return nil } func (m *Industry) validateCompanyServices(formats strfmt.Registry) error { if swag.IsZero(m.CompanyServices) { // not required return nil } for i := 0; i < len(m.CompanyServices); i++ { if swag.IsZero(m.CompanyServices[i]) { // not required continue } if m.CompanyServices[i] != nil { if err := m.CompanyServices[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("CompanyServices" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("CompanyServices" + "." + strconv.Itoa(i)) } return err } } } return nil } // ContextValidate validate this industry based on the context it is used func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateCompanyProducts(ctx, formats); err != nil { res = append(res, err) } if err := m.contextValidateCompanyServices(ctx, formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *Industry) contextValidateCompanyProducts(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.CompanyProducts); i++ { if m.CompanyProducts[i] != nil { if err := m.CompanyProducts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i)) } return err } } } return nil } func (m *Industry) contextValidateCompanyServices(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.CompanyServices); i++ { if m.CompanyServices[i] != nil { if err := m.CompanyServices[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("CompanyServices" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("CompanyServices" + "." + strconv.Itoa(i)) } return err } } } return nil } // MarshalBinary interface implementation func (m *Industry) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *Industry) UnmarshalBinary(b []byte) error { var res Industry if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil } // IndustryCompanyProductsItems0 A software product or service vended by a Company // // swagger:model IndustryCompanyProductsItems0 type IndustryCompanyProductsItems0 struct { // ID of the Company that owns this Product AccountID string `json:"AccountID,omitempty"` // Salesforce AppExchange URL AppExchange *string `json:"AppExchange,omitempty"` // Created By User ID CreatedByID *string `json:"CreatedByID,omitempty"` // Created Date CreatedDate *string `json:"CreatedDate,omitempty"` // Description of product Description *string `json:"Description,omitempty"` // Full Description of product FullDescription *string `json:"FullDescription,omitempty"` // Record Id ID string `json:"ID,omitempty"` // Image Alt Text ImageAltText *string `json:"ImageAltText,omitempty"` // Image URL ImageURL *string `json:"ImageURL,omitempty"` // Industries Industries []*Industry `json:"Industries"` // Last Modified By User ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` // Last Modified Date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` // Logo Logo *string `json:"Logo,omitempty"` // Product Name Name *string `json:"Name,omitempty"` // Product Video ID ProductVideoID *string `json:"ProductVideoID,omitempty"` // Published Published *bool `json:"Published,omitempty"` // Salesforce Specific SalesforceSpecific *bool `json:"SalesforceSpecific,omitempty"` // Slug Slug *string `json:"Slug,omitempty"` // TagLine TagLine *string `json:"TagLine,omitempty"` // Website URL *string `json:"URL,omitempty"` } // Validate validates this industry company products items0 func (m *IndustryCompanyProductsItems0) Validate(formats strfmt.Registry) error { var res []error if err := m.validateIndustries(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *IndustryCompanyProductsItems0) validateIndustries(formats strfmt.Registry) error { if swag.IsZero(m.Industries) { // not required return nil } for i := 0; i < len(m.Industries); i++ { if swag.IsZero(m.Industries[i]) { // not required continue } if m.Industries[i] != nil { if err := m.Industries[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("Industries" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("Industries" + "." + strconv.Itoa(i)) } return err } } } return nil } // ContextValidate validate this industry company products items0 based on the context it is used func (m *IndustryCompanyProductsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateIndustries(ctx, formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *IndustryCompanyProductsItems0) contextValidateIndustries(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Industries); i++ { if m.Industries[i] != nil { if err := m.Industries[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("Industries" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { return ce.ValidateName("Industries" + "." + strconv.Itoa(i)) } return err } } } return nil } // MarshalBinary interface implementation func (m *IndustryCompanyProductsItems0) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *IndustryCompanyProductsItems0) UnmarshalBinary(b []byte) error { var res IndustryCompanyProductsItems0 if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil } // IndustryCompanyServicesItems0 A service performed by a Company // // swagger:model IndustryCompanyServicesItems0 type IndustryCompanyServicesItems0 struct { // ID of the Company that owns this Service AccountID string `json:"AccountID,omitempty"` // Salesforce AppExchange URL AppExchange *string `json:"AppExchange,omitempty"` // Created By User ID CreatedByID *string `json:"CreatedByID,omitempty"` // Created Date CreatedDate *string `json:"CreatedDate,omitempty"` // Description of service Description *string `json:"Description,omitempty"` // Full Description of service FullDescription *string `json:"FullDescription,omitempty"` // Record Id ID string `json:"ID,omitempty"` // Image Alt Text ImageAltText *string `json:"ImageAltText,omitempty"` // Image URL ImageURL *string `json:"ImageURL,omitempty"` // Last Modified By User ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` // Last Modified Date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` // Logo Logo *string `json:"Logo,omitempty"` // Service Name Name *string `json:"Name,omitempty"` // Published Published *bool `json:"Published,omitempty"` // Salesforce Specific SalesforceSpecific *bool `json:"SalesforceSpecific,omitempty"` // Service Video ID ServiceVideoID *string `json:"ServiceVideoID,omitempty"` // Slug Slug *string `json:"Slug,omitempty"` // Tag Line TagLine *string `json:"TagLine,omitempty"` // URL URL *string `json:"URL,omitempty"` } // Validate validates this industry company services items0 func (m *IndustryCompanyServicesItems0) Validate(formats strfmt.Registry) error { return nil } // ContextValidate validates this industry company services items0 based on context it is used func (m *IndustryCompanyServicesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (m *IndustryCompanyServicesItems0) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *IndustryCompanyServicesItems0) UnmarshalBinary(b []byte) error { var res IndustryCompanyServicesItems0 if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }