lib/api/sfgate/sfgate_models/company_service.go

848 lines
20 KiB
Go
Raw Permalink Normal View History

2023-09-23 17:19:44 +00:00
// 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"
)
// CompanyService A service performed by a Company
//
2023-10-26 15:37:13 +00:00
// swagger:model companyService
2023-09-23 17:19:44 +00:00
type CompanyService struct {
2023-10-26 15:37:13 +00:00
// Account Email
AccountEmail *string `json:"AccountEmail,omitempty"`
2023-09-23 17:19:44 +00:00
// ID of the Company that owns this Service
AccountID string `json:"AccountID,omitempty"`
2023-10-26 15:37:13 +00:00
// Account Logo
AccountLogo *string `json:"AccountLogo,omitempty"`
// Account Name
AccountName *string `json:"AccountName,omitempty"`
// Account Number
AccountNumber *string `json:"AccountNumber,omitempty"`
// Account Publish
AccountPublish *bool `json:"AccountPublish,omitempty"`
// Account Slug
AccountSlug *string `json:"AccountSlug,omitempty"`
// Account Website
AccountWebsite *string `json:"AccountWebsite,omitempty"`
2023-09-23 17:19:44 +00:00
// Salesforce AppExchange URL
AppExchange *string `json:"AppExchange,omitempty"`
2023-10-26 15:37:13 +00:00
// The channels associated with the track (Multiselect Picklist).
Channels *string `json:"Channels,omitempty"`
2023-09-23 17:19:44 +00:00
// 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"`
// 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"`
// Service Name
Name *string `json:"Name,omitempty"`
2023-11-19 19:31:26 +00:00
// Owner ID
OwnerID *string `json:"OwnerID,omitempty"`
2023-09-23 17:19:44 +00:00
// 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"`
2023-11-19 20:06:27 +00:00
// user
User *CompanyServiceUser `json:"User,omitempty"`
2023-09-23 17:19:44 +00:00
}
// Validate validates this company service
func (m *CompanyService) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateIndustries(formats); err != nil {
res = append(res, err)
}
2023-11-19 20:06:27 +00:00
if err := m.validateUser(formats); err != nil {
res = append(res, err)
}
2023-09-23 17:19:44 +00:00
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CompanyService) 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
}
2023-11-19 20:06:27 +00:00
func (m *CompanyService) validateUser(formats strfmt.Registry) error {
if swag.IsZero(m.User) { // not required
return nil
}
if m.User != nil {
if err := m.User.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User")
}
return err
}
}
return nil
}
2023-09-23 17:19:44 +00:00
// ContextValidate validate this company service based on the context it is used
func (m *CompanyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateIndustries(ctx, formats); err != nil {
res = append(res, err)
}
2023-11-19 20:06:27 +00:00
if err := m.contextValidateUser(ctx, formats); err != nil {
res = append(res, err)
}
2023-09-23 17:19:44 +00:00
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CompanyService) 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
}
2023-11-19 20:06:27 +00:00
func (m *CompanyService) contextValidateUser(ctx context.Context, formats strfmt.Registry) error {
if m.User != nil {
if err := m.User.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User")
}
return err
}
}
return nil
}
2023-09-23 17:19:44 +00:00
// MarshalBinary interface implementation
func (m *CompanyService) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CompanyService) UnmarshalBinary(b []byte) error {
var res CompanyService
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
2023-11-19 20:06:27 +00:00
// CompanyServiceUser company service user
//
// swagger:model CompanyServiceUser
type CompanyServiceUser struct {
// API Gateway URL
APIGatewayURL *string `json:"APIGatewayURL,omitempty"`
// API Gateway User
APIGatewayUser *string `json:"APIGatewayUser,omitempty"`
// API Key
APIKey *string `json:"APIKey,omitempty"`
// About Me
AboutMe *string `json:"AboutMe,omitempty"`
// Account ID
AccountID *string `json:"AccountID,omitempty"`
// address
Address *CompanyServiceUserAddress `json:"Address,omitempty"`
// Alias
Alias *string `json:"Alias,omitempty"`
// Auth0 User Id
Auth0UserID *string `json:"Auth0UserID,omitempty"`
// Biography
Biography *string `json:"Biography,omitempty"`
// Nickname
CommunityNickname *string `json:"CommunityNickname,omitempty"`
// Company Name
CompanyName *string `json:"CompanyName,omitempty"`
// Contact
ContactID *string `json:"ContactID,omitempty"`
// Created User ID
CreatedByID *string `json:"CreatedByID,omitempty"`
// Date Created
CreatedDate *string `json:"CreatedDate,omitempty"`
// Delegated Approver
DelegatedApproverID *string `json:"DelegatedApproverID,omitempty"`
// Department
Department *string `json:"Department,omitempty"`
// Division
Division *string `json:"Division,omitempty"`
// Email address
Email *string `json:"Email,omitempty"`
// Employee Number
EmployeeNumber *string `json:"EmployeeNumber,omitempty"`
// Time day ends
EndOfDay *string `json:"EndOfDay,omitempty"`
// Environment
Environment *string `json:"Environment,omitempty"`
// Extension
Extension *string `json:"Extension,omitempty"`
// Account
ExternalAccount *string `json:"ExternalAccount,omitempty"`
// Fax
Fax *string `json:"Fax,omitempty"`
// The first name
FirstName *string `json:"FirstName,omitempty"`
// Allow Forecasting
ForecastEnabled *bool `json:"ForecastEnabled,omitempty"`
// Full Photo URL
FullPhotoURL *string `json:"FullPhotoURL,omitempty"`
// GitHub
GitHub *string `json:"GitHub,omitempty"`
// Record ID
ID string `json:"ID,omitempty"`
// Active
IsActive *bool `json:"IsActive,omitempty"`
// Is the user enabled for Communities?
IsPortalEnabled *bool `json:"IsPortalEnabled,omitempty"`
// is system controlled
IsSystemControlled *bool `json:"IsSystemControlled,omitempty"`
// IP address of last login
LastIP *string `json:"LastIP,omitempty"`
// Last login time
LastLogin *string `json:"LastLogin,omitempty"`
// Last Modified User ID
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
// Last Modified Date
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
// The Last Name
LastName *string `json:"LastName,omitempty"`
// LinkedIn
LinkedIn *string `json:"LinkedIn,omitempty"`
// Number of times user has logged in
LoginCount *int64 `json:"LoginCount,omitempty"`
// Manager
ManagerID *string `json:"ManagerID,omitempty"`
// Mobile
MobilePhone *string `json:"MobilePhone,omitempty"`
// Name
Name *string `json:"Name,omitempty"`
// Out of office message
OutOfOfficeMessage *string `json:"OutOfOfficeMessage,omitempty"`
// Password (encrypted)
Password *string `json:"Password,omitempty"`
// Phone
Phone *string `json:"Phone,omitempty"`
// Portal Role Level
PortalRole *string `json:"PortalRole,omitempty"`
// Profile
ProfileID *string `json:"ProfileID,omitempty"`
// Login Provider
Provider *string `json:"Provider,omitempty"`
// Info Emails
ReceivesAdminEmails *bool `json:"ReceivesAdminEmails,omitempty"`
// Email Sender Address
SenderEmail *string `json:"SenderEmail,omitempty"`
// Email Sender Name
SenderName *string `json:"SenderName,omitempty"`
// Slug
Slug *string `json:"Slug,omitempty"`
// Small Photo URL
SmallPhotoURL *string `json:"SmallPhotoURL,omitempty"`
// The time day starts
StartOfDay *string `json:"StartOfDay,omitempty"`
// Onboarding Status
Status *string `json:"Status,omitempty"`
// Tenant ID associated with this user
TenantID *string `json:"TenantID,omitempty"`
// tenant users
TenantUsers []*CompanyServiceUserTenantUsersItems0 `json:"TenantUsers"`
// Time Zone
TimeZone *string `json:"TimeZone,omitempty"`
// Title
Title *string `json:"Title,omitempty"`
// Twitter
Twitter *string `json:"Twitter,omitempty"`
// Role
UserRoleID *string `json:"UserRoleID,omitempty"`
// user roles
UserRoles []*CompanyServiceUserUserRolesItems0 `json:"UserRoles"`
// User Type
UserType *string `json:"UserType,omitempty"`
// Username
Username *string `json:"Username,omitempty"`
}
// Validate validates this company service user
func (m *CompanyServiceUser) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateTenantUsers(formats); err != nil {
res = append(res, err)
}
if err := m.validateUserRoles(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CompanyServiceUser) 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("User" + "." + "Address")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "Address")
}
return err
}
}
return nil
}
func (m *CompanyServiceUser) validateTenantUsers(formats strfmt.Registry) error {
if swag.IsZero(m.TenantUsers) { // not required
return nil
}
for i := 0; i < len(m.TenantUsers); i++ {
if swag.IsZero(m.TenantUsers[i]) { // not required
continue
}
if m.TenantUsers[i] != nil {
if err := m.TenantUsers[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User" + "." + "TenantUsers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "TenantUsers" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CompanyServiceUser) validateUserRoles(formats strfmt.Registry) error {
if swag.IsZero(m.UserRoles) { // not required
return nil
}
for i := 0; i < len(m.UserRoles); i++ {
if swag.IsZero(m.UserRoles[i]) { // not required
continue
}
if m.UserRoles[i] != nil {
if err := m.UserRoles[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User" + "." + "UserRoles" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "UserRoles" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this company service user based on the context it is used
func (m *CompanyServiceUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateTenantUsers(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateUserRoles(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CompanyServiceUser) 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("User" + "." + "Address")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "Address")
}
return err
}
}
return nil
}
func (m *CompanyServiceUser) contextValidateTenantUsers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.TenantUsers); i++ {
if m.TenantUsers[i] != nil {
if err := m.TenantUsers[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User" + "." + "TenantUsers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "TenantUsers" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CompanyServiceUser) contextValidateUserRoles(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.UserRoles); i++ {
if m.UserRoles[i] != nil {
if err := m.UserRoles[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("User" + "." + "UserRoles" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("User" + "." + "UserRoles" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CompanyServiceUser) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CompanyServiceUser) UnmarshalBinary(b []byte) error {
var res CompanyServiceUser
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CompanyServiceUserAddress company service user address
//
// swagger:model CompanyServiceUserAddress
type CompanyServiceUserAddress struct {
// City
City *string `json:"City,omitempty"`
// Country full name
Country *string `json:"Country,omitempty"`
// Country Code
CountryCode *string `json:"CountryCode,omitempty"`
// Postal Code
PostalCode *string `json:"PostalCode,omitempty"`
// State full name
State *string `json:"State,omitempty"`
// State Code
StateCode *string `json:"StateCode,omitempty"`
// Street number and name
Street *string `json:"Street,omitempty"`
}
// Validate validates this company service user address
func (m *CompanyServiceUserAddress) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this company service user address based on context it is used
func (m *CompanyServiceUserAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CompanyServiceUserAddress) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CompanyServiceUserAddress) UnmarshalBinary(b []byte) error {
var res CompanyServiceUserAddress
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CompanyServiceUserTenantUsersItems0 Relationship object that connects users to a tenant
//
// swagger:model CompanyServiceUserTenantUsersItems0
type CompanyServiceUserTenantUsersItems0 struct {
// The makeTenantUser access level for this User
AccessLevel *string `json:"AccessLevel,omitempty"`
// Account ID
AccountID *string `json:"AccountID,omitempty"`
// Auth0 User ID
Auth0UserID *string `json:"Auth0UserID,omitempty"`
// Account Name
CompanyName *string `json:"CompanyName,omitempty"`
// Contact ID
ContactID *string `json:"ContactID,omitempty"`
// Account
ExternalAccount *string `json:"ExternalAccount,omitempty"`
// Tenant active?
TenantActive *bool `json:"TenantActive,omitempty"`
// The Tenant ID
TenantID *string `json:"TenantID,omitempty"`
// Tenant Name
TenantName *string `json:"TenantName,omitempty"`
// Tenant Status
TenantStatus *string `json:"TenantStatus,omitempty"`
// Tenant type
TenantType *string `json:"TenantType,omitempty"`
// Tenant Version
TenantVersion *string `json:"TenantVersion,omitempty"`
// User Email Address
UserEmail *string `json:"UserEmail,omitempty"`
// User Full Name
UserFullName *string `json:"UserFullName,omitempty"`
// The User ID
UserID *string `json:"UserID,omitempty"`
// Username
Username *string `json:"Username,omitempty"`
}
// Validate validates this company service user tenant users items0
func (m *CompanyServiceUserTenantUsersItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this company service user tenant users items0 based on context it is used
func (m *CompanyServiceUserTenantUsersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CompanyServiceUserTenantUsersItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CompanyServiceUserTenantUsersItems0) UnmarshalBinary(b []byte) error {
var res CompanyServiceUserTenantUsersItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CompanyServiceUserUserRolesItems0 Relationship object that connects user to a role
//
// swagger:model CompanyServiceUserUserRolesItems0
type CompanyServiceUserUserRolesItems0 struct {
// Account Id
AccountID *string `json:"AccountID,omitempty"`
// Linked role ID
Auth0RoleID *string `json:"Auth0RoleID,omitempty"`
// Auth0 User ID
Auth0UserID *string `json:"Auth0UserID,omitempty"`
// Company Name
CompanyName *string `json:"CompanyName,omitempty"`
// Contact ID
ContactID *string `json:"ContactID,omitempty"`
// Account Number
ExternalAccount *string `json:"ExternalAccount,omitempty"`
// Role description
RoleDescription *string `json:"RoleDescription,omitempty"`
// The Role ID
RoleID *string `json:"RoleID,omitempty"`
// Role Name
RoleName *string `json:"RoleName,omitempty"`
// User Email Address
UserEmail *string `json:"UserEmail,omitempty"`
// User Full Name
UserFullName *string `json:"UserFullName,omitempty"`
// The User ID
UserID *string `json:"UserID,omitempty"`
// Username
Username *string `json:"Username,omitempty"`
}
// Validate validates this company service user user roles items0
func (m *CompanyServiceUserUserRolesItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this company service user user roles items0 based on context it is used
func (m *CompanyServiceUserUserRolesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CompanyServiceUserUserRolesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CompanyServiceUserUserRolesItems0) UnmarshalBinary(b []byte) error {
var res CompanyServiceUserUserRolesItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}