v1

package
v0.0.0-...-fa33765 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1 is a generated protocol buffer package.

It is generated from these files:

happyco/inspect/report/v1/report.proto

It has these top-level messages:

Report
Signatory
ListReportsRequest
ListReportsResponse
ReportsCreatedEventRequest
ReportsCreatedEvent
ReportsCreatedEventAck
ReportsCreatedEventAckResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterReportEventServiceServer

func RegisterReportEventServiceServer(s *grpc.Server, srv ReportEventServiceServer)

func RegisterReportServiceServer

func RegisterReportServiceServer(s *grpc.Server, srv ReportServiceServer)

Types

type ListReportsRequest

type ListReportsRequest struct {
	// * Account ID that the request applies to. For custom integrations
	// (i.e. not integration partners) it can be omitted.
	AccountId *happyco_type_v1.IntegrationID `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"`
	// * Folder IDs is an optional filter that lists reports only for
	// specific folders.
	FolderIds []*happyco_type_v1.IntegrationID `protobuf:"bytes,2,rep,name=folder_ids,json=folderIds" json:"folder_ids,omitempty"`
	// * Asset IDs is an optional filter that lists reports only for
	// specific assets.
	AssetIds []*happyco_type_v1.IntegrationID `protobuf:"bytes,3,rep,name=asset_ids,json=assetIds" json:"asset_ids,omitempty"`
	// * Inspections IDs is an optional filter that lists reports only for
	// specific inspections.
	InspectionIds []*happyco_type_v1.IntegrationID `protobuf:"bytes,4,rep,name=inspection_ids,json=inspectionIds" json:"inspection_ids,omitempty"`
	// * Report IDs is an optional filter that lists reports only for
	// specific reports.
	ReportIds []*happyco_type_v1.IntegrationID `protobuf:"bytes,5,rep,name=report_ids,json=reportIds" json:"report_ids,omitempty"`
	// * Archived when set to true returns archived reports only.
	Archived bool `protobuf:"varint,6,opt,name=archived" json:"archived,omitempty"`
	// * Paging message that contains information about the page being
	// requested. This message is usually copied from a previous list
	// request's response.
	Paging *happyco_type_v12.Paging `protobuf:"bytes,7,opt,name=paging" json:"paging,omitempty"`
}

* List report request is used for fetching reports. It can be filtered to specific reports, assets or folders. If the intent is to be notified when an report undergoes a status transition please use the ReportEventService.

func (*ListReportsRequest) Descriptor

func (*ListReportsRequest) Descriptor() ([]byte, []int)

func (*ListReportsRequest) GetAccountId

func (*ListReportsRequest) GetArchived

func (m *ListReportsRequest) GetArchived() bool

func (*ListReportsRequest) GetAssetIds

func (m *ListReportsRequest) GetAssetIds() []*happyco_type_v1.IntegrationID

func (*ListReportsRequest) GetFolderIds

func (m *ListReportsRequest) GetFolderIds() []*happyco_type_v1.IntegrationID

func (*ListReportsRequest) GetInspectionIds

func (m *ListReportsRequest) GetInspectionIds() []*happyco_type_v1.IntegrationID

func (*ListReportsRequest) GetPaging

func (m *ListReportsRequest) GetPaging() *happyco_type_v12.Paging

func (*ListReportsRequest) GetReportIds

func (m *ListReportsRequest) GetReportIds() []*happyco_type_v1.IntegrationID

func (*ListReportsRequest) ProtoMessage

func (*ListReportsRequest) ProtoMessage()

func (*ListReportsRequest) Reset

func (m *ListReportsRequest) Reset()

func (*ListReportsRequest) String

func (m *ListReportsRequest) String() string

type ListReportsResponse

type ListReportsResponse struct {
	// * Reports contains the results for this page.
	Reports []*Report `protobuf:"bytes,1,rep,name=reports" json:"reports,omitempty"`
	// * Previous page is an token that will be present for all pages after
	// the first.
	PreviousPage *happyco_type_v12.Paging `protobuf:"bytes,2,opt,name=previous_page,json=previousPage" json:"previous_page,omitempty"`
	// * Next page is an token that will be present for all pages except the
	// last.
	NextPage *happyco_type_v12.Paging `protobuf:"bytes,3,opt,name=next_page,json=nextPage" json:"next_page,omitempty"`
}

* List reports response is a page of fetched report results. It includes a previous and next page token that can be passed into subsequent list report requests.

func (*ListReportsResponse) Descriptor

func (*ListReportsResponse) Descriptor() ([]byte, []int)

func (*ListReportsResponse) GetNextPage

func (m *ListReportsResponse) GetNextPage() *happyco_type_v12.Paging

func (*ListReportsResponse) GetPreviousPage

func (m *ListReportsResponse) GetPreviousPage() *happyco_type_v12.Paging

func (*ListReportsResponse) GetReports

func (m *ListReportsResponse) GetReports() []*Report

func (*ListReportsResponse) ProtoMessage

func (*ListReportsResponse) ProtoMessage()

func (*ListReportsResponse) Reset

func (m *ListReportsResponse) Reset()

func (*ListReportsResponse) String

func (m *ListReportsResponse) String() string

type Report

type Report struct {
	// * ID of report.
	Id *happyco_type_v1.IntegrationID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// * Public URL can be used to share the inspection. It contains a UUID
	// to provide security.
	PublicUrl string `protobuf:"bytes,2,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
	// * Name of the asset that was inspected. This is typically the address
	// of the unit or house that was inspected.
	Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
	// * Title of the report. This can be overriden by the user in the
	// report settings but typically comes from the template name used to
	// perform the inspection.
	Title string `protobuf:"bytes,4,opt,name=title" json:"title,omitempty"`
	// * The revision of the report. This will increment when a change
	// occurs. Reports are limited to changes being archive/unarchive
	// operations or new signatures being added.
	Revision int32 `protobuf:"varint,5,opt,name=revision" json:"revision,omitempty"`
	// * Account ID that the report belongs to. For custom integrations
	// (i.e. not integration partners) it may be omitted.
	AccountId *happyco_type_v1.IntegrationID `protobuf:"bytes,6,opt,name=account_id,json=accountId" json:"account_id,omitempty"`
	// * TODO: TBD if we should keep this -- inspection does not have it
	FolderId *happyco_type_v1.IntegrationID `protobuf:"bytes,7,opt,name=folder_id,json=folderId" json:"folder_id,omitempty"`
	// * Asset ID references the parent that inspection is attached to. This field must
	// reference a non archived asset in the same folder as the template
	// referenced below.
	AssetId *happyco_type_v1.IntegrationID `protobuf:"bytes,8,opt,name=asset_id,json=assetId" json:"asset_id,omitempty"`
	// * Inspection IDs references one or more inspection(s) used to
	// generate the report.
	InspectionIds []*happyco_type_v1.IntegrationID `protobuf:"bytes,9,rep,name=inspection_ids,json=inspectionIds" json:"inspection_ids,omitempty"`
	// * Generated at is the time (as reported by the mobile device) that the
	// report was generated at.
	GeneratedAt *happyco_type_v11.Date `protobuf:"bytes,10,opt,name=generated_at,json=generatedAt" json:"generated_at,omitempty"`
	// * Finalized is the time (as reported by the mobile device) that the
	// report was locked. Until the report is locked the display settings
	// can be changed. Signing a report locks it immediately.
	FinalizedAt *happyco_type_v11.Date `protobuf:"bytes,11,opt,name=finalized_at,json=finalizedAt" json:"finalized_at,omitempty"`
	// * TODO: Inspector ID references the user who created the report. TBD
	// whether to include this (where is it coming from)
	InspectorId *happyco_type_v1.IntegrationID `protobuf:"bytes,12,opt,name=inspector_id,json=inspectorId" json:"inspector_id,omitempty"`
	// * Inspector name taken from on the most recently complete inspection.
	InspectorName string `protobuf:"bytes,13,opt,name=inspector_name,json=inspectorName" json:"inspector_name,omitempty"`
	// * All of the report data (this structure is still subject to change
	// so at the moment this is just a json blob)
	Data string `protobuf:"bytes,14,opt,name=data" json:"data,omitempty"`
	// * A map of signatories added to the report. Each key in the map only
	// needs to be unique to this report.
	Signatories map[string]*Signatory `` /* 143-byte string literal not displayed */
}

* Reports are the end artifact of one or sometimes two inspections. They are generated from inspection(s) at a point in time but do not update if the underlying inspection updates. They are self contained once generated. They are intended to be similar to a printed pieice of paper in that they can't be edited but they can be signed at any time.

func (*Report) Descriptor

func (*Report) Descriptor() ([]byte, []int)

func (*Report) GetAccountId

func (m *Report) GetAccountId() *happyco_type_v1.IntegrationID

func (*Report) GetAssetId

func (m *Report) GetAssetId() *happyco_type_v1.IntegrationID

func (*Report) GetData

func (m *Report) GetData() string

func (*Report) GetFinalizedAt

func (m *Report) GetFinalizedAt() *happyco_type_v11.Date

func (*Report) GetFolderId

func (m *Report) GetFolderId() *happyco_type_v1.IntegrationID

func (*Report) GetGeneratedAt

func (m *Report) GetGeneratedAt() *happyco_type_v11.Date

func (*Report) GetId

func (m *Report) GetId() *happyco_type_v1.IntegrationID

func (*Report) GetInspectionIds

func (m *Report) GetInspectionIds() []*happyco_type_v1.IntegrationID

func (*Report) GetInspectorId

func (m *Report) GetInspectorId() *happyco_type_v1.IntegrationID

func (*Report) GetInspectorName

func (m *Report) GetInspectorName() string

func (*Report) GetName

func (m *Report) GetName() string

func (*Report) GetPublicUrl

func (m *Report) GetPublicUrl() string

func (*Report) GetRevision

func (m *Report) GetRevision() int32

func (*Report) GetSignatories

func (m *Report) GetSignatories() map[string]*Signatory

func (*Report) GetTitle

func (m *Report) GetTitle() string

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) Reset

func (m *Report) Reset()

func (*Report) String

func (m *Report) String() string

type ReportEventServiceClient

type ReportEventServiceClient interface {
	// * On reports created returns a stream that will be pushed events as
	// they occur
	OnReportsCreated(ctx context.Context, in *ReportsCreatedEventRequest, opts ...grpc.CallOption) (ReportEventService_OnReportsCreatedClient, error)
	// * On reports created ack should be called when events have
	// been processed. Unless this is called events will be sent again
	// after the timeout period.
	OnReportsCreatedAck(ctx context.Context, in *ReportsCreatedEventAck, opts ...grpc.CallOption) (*ReportsCreatedEventAckResponse, error)
}

func NewReportEventServiceClient

func NewReportEventServiceClient(cc *grpc.ClientConn) ReportEventServiceClient

type ReportEventServiceServer

type ReportEventServiceServer interface {
	// * On reports created returns a stream that will be pushed events as
	// they occur
	OnReportsCreated(*ReportsCreatedEventRequest, ReportEventService_OnReportsCreatedServer) error
	// * On reports created ack should be called when events have
	// been processed. Unless this is called events will be sent again
	// after the timeout period.
	OnReportsCreatedAck(context.Context, *ReportsCreatedEventAck) (*ReportsCreatedEventAckResponse, error)
}

type ReportEventService_OnReportsCreatedClient

type ReportEventService_OnReportsCreatedClient interface {
	Recv() (*ReportsCreatedEvent, error)
	grpc.ClientStream
}

type ReportEventService_OnReportsCreatedServer

type ReportEventService_OnReportsCreatedServer interface {
	Send(*ReportsCreatedEvent) error
	grpc.ServerStream
}

type ReportServiceClient

type ReportServiceClient interface {
	// * List reports gets a paginated and optionally filtered list of
	// reports from one or more folders.
	ListReports(ctx context.Context, in *ListReportsRequest, opts ...grpc.CallOption) (*ListReportsResponse, error)
}

func NewReportServiceClient

func NewReportServiceClient(cc *grpc.ClientConn) ReportServiceClient

type ReportServiceServer

type ReportServiceServer interface {
	// * List reports gets a paginated and optionally filtered list of
	// reports from one or more folders.
	ListReports(context.Context, *ListReportsRequest) (*ListReportsResponse, error)
}

type ReportsCreatedEvent

type ReportsCreatedEvent struct {
	Event   *happyco_type_v13.Event              `protobuf:"bytes,1,opt,name=event" json:"event,omitempty"`
	Reports []*ReportsCreatedEvent_ReportCreated `protobuf:"bytes,2,rep,name=reports" json:"reports,omitempty"`
}

* Reports created events are emitted from streams requested with OnReportCreated.

func (*ReportsCreatedEvent) Descriptor

func (*ReportsCreatedEvent) Descriptor() ([]byte, []int)

func (*ReportsCreatedEvent) GetEvent

func (*ReportsCreatedEvent) GetReports

func (*ReportsCreatedEvent) ProtoMessage

func (*ReportsCreatedEvent) ProtoMessage()

func (*ReportsCreatedEvent) Reset

func (m *ReportsCreatedEvent) Reset()

func (*ReportsCreatedEvent) String

func (m *ReportsCreatedEvent) String() string

type ReportsCreatedEventAck

type ReportsCreatedEventAck struct {
	Ack *happyco_type_v13.EventAck `protobuf:"bytes,1,opt,name=ack" json:"ack,omitempty"`
}

* Reports created event ack is used to acknowledge or request time extensions for one or more events.

func (*ReportsCreatedEventAck) Descriptor

func (*ReportsCreatedEventAck) Descriptor() ([]byte, []int)

func (*ReportsCreatedEventAck) GetAck

func (*ReportsCreatedEventAck) ProtoMessage

func (*ReportsCreatedEventAck) ProtoMessage()

func (*ReportsCreatedEventAck) Reset

func (m *ReportsCreatedEventAck) Reset()

func (*ReportsCreatedEventAck) String

func (m *ReportsCreatedEventAck) String() string

type ReportsCreatedEventAckResponse

type ReportsCreatedEventAckResponse struct {
}

* ReportsCreatedEventAckResponse contains no data but indicates successful acknowledgement.

func (*ReportsCreatedEventAckResponse) Descriptor

func (*ReportsCreatedEventAckResponse) Descriptor() ([]byte, []int)

func (*ReportsCreatedEventAckResponse) ProtoMessage

func (*ReportsCreatedEventAckResponse) ProtoMessage()

func (*ReportsCreatedEventAckResponse) Reset

func (m *ReportsCreatedEventAckResponse) Reset()

func (*ReportsCreatedEventAckResponse) String

type ReportsCreatedEventRequest

type ReportsCreatedEventRequest struct {
	// * Account ID that the request applies to. For custom integrations
	// (i.e. not integration partners) it can be omitted.
	AccountId *happyco_type_v1.IntegrationID `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"`
	// * Options the client can set to configure the returned event stream.
	// See EventHandlerOptions for more details.
	Options *happyco_type_v13.EventHandlerOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
}

func (*ReportsCreatedEventRequest) Descriptor

func (*ReportsCreatedEventRequest) Descriptor() ([]byte, []int)

func (*ReportsCreatedEventRequest) GetAccountId

func (*ReportsCreatedEventRequest) GetOptions

func (*ReportsCreatedEventRequest) ProtoMessage

func (*ReportsCreatedEventRequest) ProtoMessage()

func (*ReportsCreatedEventRequest) Reset

func (m *ReportsCreatedEventRequest) Reset()

func (*ReportsCreatedEventRequest) String

func (m *ReportsCreatedEventRequest) String() string

type ReportsCreatedEvent_ReportCreated

type ReportsCreatedEvent_ReportCreated struct {
	// * Report ID can be used to fetch the report with a filtered
	// list reports request
	ReportId *happyco_type_v1.IntegrationID `protobuf:"bytes,1,opt,name=report_id,json=reportId" json:"report_id,omitempty"`
	// * TODO: should we remove this? I feel like is only useful if we have an updated event stream too
	Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"`
}

func (*ReportsCreatedEvent_ReportCreated) Descriptor

func (*ReportsCreatedEvent_ReportCreated) Descriptor() ([]byte, []int)

func (*ReportsCreatedEvent_ReportCreated) GetReportId

func (*ReportsCreatedEvent_ReportCreated) GetVersion

func (m *ReportsCreatedEvent_ReportCreated) GetVersion() int32

func (*ReportsCreatedEvent_ReportCreated) ProtoMessage

func (*ReportsCreatedEvent_ReportCreated) ProtoMessage()

func (*ReportsCreatedEvent_ReportCreated) Reset

func (*ReportsCreatedEvent_ReportCreated) String

type Signatory

type Signatory struct {
	// * Name of the signatory. e.g. Mafalda Hopkirk.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// * TODO: should this be included? Its not included in the report.
	Role string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"`
	// * Generated is the time when the signatory box was generated and
	// attached to the report.
	GeneratedAt *happyco_type_v11.Date `protobuf:"bytes,3,opt,name=generated_at,json=generatedAt" json:"generated_at,omitempty"`
	// * Signed at is the time (as reported by the mobile device) that the
	// user physically signed the report.
	SignedAt *happyco_type_v11.Date `protobuf:"bytes,4,opt,name=signed_at,json=signedAt" json:"signed_at,omitempty"`
	// * User signed at is a user adjustable signed at time (similar to the
	// date field often found on paper reports).
	UserSignedAt *happyco_type_v11.Date `protobuf:"bytes,5,opt,name=user_signed_at,json=userSignedAt" json:"user_signed_at,omitempty"`
}

* Signatory represents a signature box on a report

func (*Signatory) Descriptor

func (*Signatory) Descriptor() ([]byte, []int)

func (*Signatory) GetGeneratedAt

func (m *Signatory) GetGeneratedAt() *happyco_type_v11.Date

func (*Signatory) GetName

func (m *Signatory) GetName() string

func (*Signatory) GetRole

func (m *Signatory) GetRole() string

func (*Signatory) GetSignedAt

func (m *Signatory) GetSignedAt() *happyco_type_v11.Date

func (*Signatory) GetUserSignedAt

func (m *Signatory) GetUserSignedAt() *happyco_type_v11.Date

func (*Signatory) ProtoMessage

func (*Signatory) ProtoMessage()

func (*Signatory) Reset

func (m *Signatory) Reset()

func (*Signatory) String

func (m *Signatory) String() string

Jump to

Keyboard shortcuts

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