schemas

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package schemas provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package schemas provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package schemas provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	Oauth2Scopes = "oauth2.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewCreateAssociationRequest

func NewCreateAssociationRequest(server string, objectType string, body CreateAssociationJSONRequestBody) (*http.Request, error)

NewCreateAssociationRequest calls the generic CreateAssociation builder with application/json body

func NewCreateAssociationRequestWithBody

func NewCreateAssociationRequestWithBody(server string, objectType string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAssociationRequestWithBody generates requests for CreateAssociation with any type of body

func NewCreateCustomObjectSchemaRequest

func NewCreateCustomObjectSchemaRequest(server string, body CreateCustomObjectSchemaJSONRequestBody) (*http.Request, error)

NewCreateCustomObjectSchemaRequest calls the generic CreateCustomObjectSchema builder with application/json body

func NewCreateCustomObjectSchemaRequestWithBody

func NewCreateCustomObjectSchemaRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateCustomObjectSchemaRequestWithBody generates requests for CreateCustomObjectSchema with any type of body

func NewDeleteAssociationRequest

func NewDeleteAssociationRequest(server string, objectType string, associationIdentifier string) (*http.Request, error)

NewDeleteAssociationRequest generates requests for DeleteAssociation

func NewDeleteSchemaRequest

func NewDeleteSchemaRequest(server string, objectType string, params *DeleteSchemaParams) (*http.Request, error)

NewDeleteSchemaRequest generates requests for DeleteSchema

func NewGetExistingObjectSchemaRequest

func NewGetExistingObjectSchemaRequest(server string, objectType string) (*http.Request, error)

NewGetExistingObjectSchemaRequest generates requests for GetExistingObjectSchema

func NewGetObjectSchemasRequest

func NewGetObjectSchemasRequest(server string, params *GetObjectSchemasParams) (*http.Request, error)

NewGetObjectSchemasRequest generates requests for GetObjectSchemas

func NewUpdateSchemaRequest

func NewUpdateSchemaRequest(server string, objectType string, body UpdateSchemaJSONRequestBody) (*http.Request, error)

NewUpdateSchemaRequest calls the generic UpdateSchema builder with application/json body

func NewUpdateSchemaRequestWithBody

func NewUpdateSchemaRequestWithBody(server string, objectType string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateSchemaRequestWithBody generates requests for UpdateSchema with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateAssociation

func (c *Client) CreateAssociation(ctx context.Context, objectType string, body CreateAssociationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAssociationWithBody

func (c *Client) CreateAssociationWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomObjectSchema

func (c *Client) CreateCustomObjectSchema(ctx context.Context, body CreateCustomObjectSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomObjectSchemaWithBody

func (c *Client) CreateCustomObjectSchemaWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteAssociation

func (c *Client) DeleteAssociation(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteSchema

func (c *Client) DeleteSchema(ctx context.Context, objectType string, params *DeleteSchemaParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetExistingObjectSchema

func (c *Client) GetExistingObjectSchema(ctx context.Context, objectType string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetObjectSchemas

func (c *Client) GetObjectSchemas(ctx context.Context, params *GetObjectSchemasParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSchema

func (c *Client) UpdateSchema(ctx context.Context, objectType string, body UpdateSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSchemaWithBody

func (c *Client) UpdateSchemaWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetObjectSchemas request
	GetObjectSchemas(ctx context.Context, params *GetObjectSchemasParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateCustomObjectSchemaWithBody request with any body
	CreateCustomObjectSchemaWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateCustomObjectSchema(ctx context.Context, body CreateCustomObjectSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSchema request
	DeleteSchema(ctx context.Context, objectType string, params *DeleteSchemaParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetExistingObjectSchema request
	GetExistingObjectSchema(ctx context.Context, objectType string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSchemaWithBody request with any body
	UpdateSchemaWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateSchema(ctx context.Context, objectType string, body UpdateSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAssociationWithBody request with any body
	CreateAssociationWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAssociation(ctx context.Context, objectType string, body CreateAssociationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteAssociation request
	DeleteAssociation(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateAssociationWithBodyWithResponse

func (c *ClientWithResponses) CreateAssociationWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAssociationResponse, error)

CreateAssociationWithBodyWithResponse request with arbitrary body returning *CreateAssociationResponse

func (*ClientWithResponses) CreateAssociationWithResponse

func (c *ClientWithResponses) CreateAssociationWithResponse(ctx context.Context, objectType string, body CreateAssociationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAssociationResponse, error)

func (*ClientWithResponses) CreateCustomObjectSchemaWithBodyWithResponse

func (c *ClientWithResponses) CreateCustomObjectSchemaWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomObjectSchemaResponse, error)

CreateCustomObjectSchemaWithBodyWithResponse request with arbitrary body returning *CreateCustomObjectSchemaResponse

func (*ClientWithResponses) CreateCustomObjectSchemaWithResponse

func (c *ClientWithResponses) CreateCustomObjectSchemaWithResponse(ctx context.Context, body CreateCustomObjectSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomObjectSchemaResponse, error)

func (*ClientWithResponses) DeleteAssociationWithResponse

func (c *ClientWithResponses) DeleteAssociationWithResponse(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...RequestEditorFn) (*DeleteAssociationResponse, error)

DeleteAssociationWithResponse request returning *DeleteAssociationResponse

func (*ClientWithResponses) DeleteSchemaWithResponse

func (c *ClientWithResponses) DeleteSchemaWithResponse(ctx context.Context, objectType string, params *DeleteSchemaParams, reqEditors ...RequestEditorFn) (*DeleteSchemaResponse, error)

DeleteSchemaWithResponse request returning *DeleteSchemaResponse

func (*ClientWithResponses) GetExistingObjectSchemaWithResponse

func (c *ClientWithResponses) GetExistingObjectSchemaWithResponse(ctx context.Context, objectType string, reqEditors ...RequestEditorFn) (*GetExistingObjectSchemaResponse, error)

GetExistingObjectSchemaWithResponse request returning *GetExistingObjectSchemaResponse

func (*ClientWithResponses) GetObjectSchemasWithResponse

func (c *ClientWithResponses) GetObjectSchemasWithResponse(ctx context.Context, params *GetObjectSchemasParams, reqEditors ...RequestEditorFn) (*GetObjectSchemasResponse, error)

GetObjectSchemasWithResponse request returning *GetObjectSchemasResponse

func (*ClientWithResponses) UpdateSchemaWithBodyWithResponse

func (c *ClientWithResponses) UpdateSchemaWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSchemaResponse, error)

UpdateSchemaWithBodyWithResponse request with arbitrary body returning *UpdateSchemaResponse

func (*ClientWithResponses) UpdateSchemaWithResponse

func (c *ClientWithResponses) UpdateSchemaWithResponse(ctx context.Context, objectType string, body UpdateSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSchemaResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetObjectSchemasWithResponse request
	GetObjectSchemasWithResponse(ctx context.Context, params *GetObjectSchemasParams, reqEditors ...RequestEditorFn) (*GetObjectSchemasResponse, error)

	// CreateCustomObjectSchemaWithBodyWithResponse request with any body
	CreateCustomObjectSchemaWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomObjectSchemaResponse, error)

	CreateCustomObjectSchemaWithResponse(ctx context.Context, body CreateCustomObjectSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomObjectSchemaResponse, error)

	// DeleteSchemaWithResponse request
	DeleteSchemaWithResponse(ctx context.Context, objectType string, params *DeleteSchemaParams, reqEditors ...RequestEditorFn) (*DeleteSchemaResponse, error)

	// GetExistingObjectSchemaWithResponse request
	GetExistingObjectSchemaWithResponse(ctx context.Context, objectType string, reqEditors ...RequestEditorFn) (*GetExistingObjectSchemaResponse, error)

	// UpdateSchemaWithBodyWithResponse request with any body
	UpdateSchemaWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSchemaResponse, error)

	UpdateSchemaWithResponse(ctx context.Context, objectType string, body UpdateSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSchemaResponse, error)

	// CreateAssociationWithBodyWithResponse request with any body
	CreateAssociationWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAssociationResponse, error)

	CreateAssociationWithResponse(ctx context.Context, objectType string, body CreateAssociationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAssociationResponse, error)

	// DeleteAssociationWithResponse request
	DeleteAssociationWithResponse(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...RequestEditorFn) (*DeleteAssociationResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateAssociationJSONBody

type CreateAssociationJSONBody struct {
	FromObjectTypeId string  `json:"fromObjectTypeId"`
	Name             *string `json:"name,omitempty"`
	ToObjectTypeId   string  `json:"toObjectTypeId"`
}

CreateAssociationJSONBody defines parameters for CreateAssociation.

type CreateAssociationJSONRequestBody

type CreateAssociationJSONRequestBody CreateAssociationJSONBody

CreateAssociationJSONRequestBody defines body for CreateAssociation for application/json ContentType.

type CreateAssociationResponse

type CreateAssociationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseCreateAssociationResponse

func ParseCreateAssociationResponse(rsp *http.Response) (*CreateAssociationResponse, error)

ParseCreateAssociationResponse parses an HTTP response from a CreateAssociationWithResponse call

func (CreateAssociationResponse) Status

func (r CreateAssociationResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAssociationResponse) StatusCode

func (r CreateAssociationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateCustomObjectSchemaJSONRequestBody

type CreateCustomObjectSchemaJSONRequestBody = SchemaRequestBody

CreateCustomObjectSchemaJSONRequestBody defines body for CreateCustomObjectSchema for application/json ContentType.

type CreateCustomObjectSchemaResponse

type CreateCustomObjectSchemaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseCreateCustomObjectSchemaResponse

func ParseCreateCustomObjectSchemaResponse(rsp *http.Response) (*CreateCustomObjectSchemaResponse, error)

ParseCreateCustomObjectSchemaResponse parses an HTTP response from a CreateCustomObjectSchemaWithResponse call

func (CreateCustomObjectSchemaResponse) Status

Status returns HTTPResponse.Status

func (CreateCustomObjectSchemaResponse) StatusCode

func (r CreateCustomObjectSchemaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteAssociationResponse

type DeleteAssociationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteAssociationResponse

func ParseDeleteAssociationResponse(rsp *http.Response) (*DeleteAssociationResponse, error)

ParseDeleteAssociationResponse parses an HTTP response from a DeleteAssociationWithResponse call

func (DeleteAssociationResponse) Status

func (r DeleteAssociationResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteAssociationResponse) StatusCode

func (r DeleteAssociationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSchemaParams

type DeleteSchemaParams struct {
	// Archived Whether the object schema is archived.
	Archived *bool `form:"archived,omitempty" json:"archived,omitempty"`
}

DeleteSchemaParams defines parameters for DeleteSchema.

type DeleteSchemaResponse

type DeleteSchemaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteSchemaResponse

func ParseDeleteSchemaResponse(rsp *http.Response) (*DeleteSchemaResponse, error)

ParseDeleteSchemaResponse parses an HTTP response from a DeleteSchemaWithResponse call

func (DeleteSchemaResponse) Status

func (r DeleteSchemaResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSchemaResponse) StatusCode

func (r DeleteSchemaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type GetExistingObjectSchemaResponse

type GetExistingObjectSchemaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseGetExistingObjectSchemaResponse

func ParseGetExistingObjectSchemaResponse(rsp *http.Response) (*GetExistingObjectSchemaResponse, error)

ParseGetExistingObjectSchemaResponse parses an HTTP response from a GetExistingObjectSchemaWithResponse call

func (GetExistingObjectSchemaResponse) Status

Status returns HTTPResponse.Status

func (GetExistingObjectSchemaResponse) StatusCode

func (r GetExistingObjectSchemaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetObjectSchemasParams

type GetObjectSchemasParams struct {
	// Archived Whether to include archived schemas.
	Archived bool `form:"archived" json:"archived"`
}

GetObjectSchemasParams defines parameters for GetObjectSchemas.

type GetObjectSchemasResponse

type GetObjectSchemasResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Results *[]map[string]interface{} `json:"results,omitempty"`
	}
}

func ParseGetObjectSchemasResponse

func ParseGetObjectSchemasResponse(rsp *http.Response) (*GetObjectSchemasResponse, error)

ParseGetObjectSchemasResponse parses an HTTP response from a GetObjectSchemasWithResponse call

func (GetObjectSchemasResponse) Status

func (r GetObjectSchemasResponse) Status() string

Status returns HTTPResponse.Status

func (GetObjectSchemasResponse) StatusCode

func (r GetObjectSchemasResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SchemaLabels

type SchemaLabels struct {
	// Plural Plural label of the custom object.
	Plural *string `json:"plural,omitempty"`

	// Singular Singular label of the custom object.
	Singular *string `json:"singular,omitempty"`
}

SchemaLabels defines model for SchemaLabels.

type SchemaProperties

type SchemaProperties = []struct {
	// Description Description of the property.
	Description *string `json:"description,omitempty"`

	// DisplayOrder Display order of the property.
	DisplayOrder *int `json:"displayOrder,omitempty"`

	// FieldType Field type of the property.
	FieldType *string `json:"fieldType,omitempty"`

	// FormField Indicates if the property is a form field.
	FormField *bool `json:"formField,omitempty"`

	// GroupName Group name of the property.
	GroupName *string `json:"groupName,omitempty"`

	// HasUniqueValue Indicates if the property must have unique values.
	HasUniqueValue *bool `json:"hasUniqueValue,omitempty"`

	// Hidden Whether the property is hidden.
	Hidden *bool `json:"hidden,omitempty"`

	// IsPrimaryDisplayLabel Indicates if this property is the primary display label.
	IsPrimaryDisplayLabel *bool `json:"isPrimaryDisplayLabel,omitempty"`

	// Label Label of the property.
	Label *string `json:"label,omitempty"`

	// Name Name of the property.
	Name *string `json:"name,omitempty"`

	// NumberDisplayHint Display hint for number fields.
	NumberDisplayHint *string `json:"numberDisplayHint,omitempty"`

	// OptionSortStrategy Controls how the property options will be sorted in the HubSpot UI.
	OptionSortStrategy *string      `json:"optionSortStrategy,omitempty"`
	Options            *interface{} `json:"options,omitempty"`

	// ReferencedObjectType Referenced object type for the property.
	ReferencedObjectType *string `json:"referencedObjectType,omitempty"`

	// SearchableInGlobalSearch Indicates if the property is searchable in global search.
	SearchableInGlobalSearch *bool `json:"searchableInGlobalSearch,omitempty"`

	// ShowCurrencySymbol Whether to show a currency symbol.
	ShowCurrencySymbol *bool `json:"showCurrencySymbol,omitempty"`

	// TextDisplayHint Display hint for text fields.
	TextDisplayHint *string `json:"textDisplayHint,omitempty"`

	// Type Type of the property.
	Type *string `json:"type,omitempty"`
}

SchemaProperties defines model for SchemaProperties.

type SchemaPropertiesOptions

type SchemaPropertiesOptions = []struct {
	// Description Description of the option.
	Description *string `json:"description,omitempty"`

	// DisplayOrder Display order of the option.
	DisplayOrder *int `json:"displayOrder,omitempty"`

	// Hidden Whether the option is hidden.
	Hidden *bool `json:"hidden,omitempty"`

	// Label Label of the option.
	Label *string `json:"label,omitempty"`

	// Value Value of the option.
	Value *string `json:"value,omitempty"`
}

SchemaPropertiesOptions defines model for SchemaPropertiesOptions.

type SchemaRequestBody

type SchemaRequestBody struct {
	// AssociatedObjects Objects that can be associated with the custom object.
	AssociatedObjects []string `json:"associatedObjects"`

	// Description Description of the custom object.
	Description *string     `json:"description,omitempty"`
	Labels      interface{} `json:"labels"`

	// Name Name of the custom object.
	Name string `json:"name"`

	// PrimaryDisplayProperty Primary display property of the custom object.
	PrimaryDisplayProperty string           `json:"primaryDisplayProperty"`
	Properties             SchemaProperties `json:"properties"`

	// RequiredProperties Properties that are required for the custom object.
	RequiredProperties []string `json:"requiredProperties"`

	// SearchableProperties Properties that are searchable for the custom object.
	SearchableProperties *[]string `json:"searchableProperties,omitempty"`

	// SecondaryDisplayProperties Secondary display properties for the custom object.
	SecondaryDisplayProperties *[]string `json:"secondaryDisplayProperties,omitempty"`
}

SchemaRequestBody defines model for SchemaRequestBody.

type ServerInterface

type ServerInterface interface {
	// Get CRM Object Schemas
	// (GET /crm-object-schemas/v3/schemas)
	GetObjectSchemas(ctx echo.Context, params GetObjectSchemasParams) error
	// Create a custom object schema
	// (POST /crm-object-schemas/v3/schemas)
	CreateCustomObjectSchema(ctx echo.Context) error
	// Delete CRM Object Schema
	// (DELETE /crm-object-schemas/v3/schemas/{objectType})
	DeleteSchema(ctx echo.Context, objectType string, params DeleteSchemaParams) error
	// Get CRM Object Schema
	// (GET /crm-object-schemas/v3/schemas/{objectType})
	GetExistingObjectSchema(ctx echo.Context, objectType string) error
	// Update a CRM object schema
	// (PATCH /crm-object-schemas/v3/schemas/{objectType})
	UpdateSchema(ctx echo.Context, objectType string) error
	// Create association between object schemas
	// (POST /crm-object-schemas/v3/schemas/{objectType}/associations)
	CreateAssociation(ctx echo.Context, objectType string) error
	// Delete an association in HubSpot CRM schema
	// (DELETE /crm-object-schemas/v3/schemas/{objectType}/associations/{associationIdentifier})
	DeleteAssociation(ctx echo.Context, objectType string, associationIdentifier string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateAssociation

func (w *ServerInterfaceWrapper) CreateAssociation(ctx echo.Context) error

CreateAssociation converts echo context to params.

func (*ServerInterfaceWrapper) CreateCustomObjectSchema

func (w *ServerInterfaceWrapper) CreateCustomObjectSchema(ctx echo.Context) error

CreateCustomObjectSchema converts echo context to params.

func (*ServerInterfaceWrapper) DeleteAssociation

func (w *ServerInterfaceWrapper) DeleteAssociation(ctx echo.Context) error

DeleteAssociation converts echo context to params.

func (*ServerInterfaceWrapper) DeleteSchema

func (w *ServerInterfaceWrapper) DeleteSchema(ctx echo.Context) error

DeleteSchema converts echo context to params.

func (*ServerInterfaceWrapper) GetExistingObjectSchema

func (w *ServerInterfaceWrapper) GetExistingObjectSchema(ctx echo.Context) error

GetExistingObjectSchema converts echo context to params.

func (*ServerInterfaceWrapper) GetObjectSchemas

func (w *ServerInterfaceWrapper) GetObjectSchemas(ctx echo.Context) error

GetObjectSchemas converts echo context to params.

func (*ServerInterfaceWrapper) UpdateSchema

func (w *ServerInterfaceWrapper) UpdateSchema(ctx echo.Context) error

UpdateSchema converts echo context to params.

type UpdateSchemaJSONBody

type UpdateSchemaJSONBody struct {
	ClearDescription *bool   `json:"clearDescription,omitempty"`
	Description      *string `json:"description,omitempty"`
	Labels           *struct {
		// Plural Plural label of the custom object.
		Plural *string `json:"plural,omitempty"`

		// Singular Singular label of the custom object.
		Singular *string `json:"singular,omitempty"`
	} `json:"labels,omitempty"`
	PrimaryDisplayProperty     *string   `json:"primaryDisplayProperty,omitempty"`
	RequiredProperties         *[]string `json:"requiredProperties,omitempty"`
	Restorable                 *bool     `json:"restorable,omitempty"`
	SearchableProperties       *[]string `json:"searchableProperties,omitempty"`
	SecondaryDisplayProperties *[]string `json:"secondaryDisplayProperties,omitempty"`
}

UpdateSchemaJSONBody defines parameters for UpdateSchema.

type UpdateSchemaJSONRequestBody

type UpdateSchemaJSONRequestBody UpdateSchemaJSONBody

UpdateSchemaJSONRequestBody defines body for UpdateSchema for application/json ContentType.

type UpdateSchemaResponse

type UpdateSchemaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseUpdateSchemaResponse

func ParseUpdateSchemaResponse(rsp *http.Response) (*UpdateSchemaResponse, error)

ParseUpdateSchemaResponse parses an HTTP response from a UpdateSchemaWithResponse call

func (UpdateSchemaResponse) Status

func (r UpdateSchemaResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateSchemaResponse) StatusCode

func (r UpdateSchemaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL