coordinate

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package coordinate provides access to the Google Maps Coordinate API.

See https://developers.google.com/coordinate/

Usage example:

import "google.golang.org/api/coordinate/v1"
...
coordinateService, err := coordinate.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your Google Maps Coordinate jobs
	CoordinateScope = "https://www.googleapis.com/auth/coordinate"

	// View your Google Coordinate jobs
	CoordinateReadonlyScope = "https://www.googleapis.com/auth/coordinate.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomField

type CustomField struct {
	// CustomFieldId: Custom field id.
	CustomFieldId int64 `json:"customFieldId,omitempty,string"`

	// Kind: Identifies this object as a custom field.
	Kind string `json:"kind,omitempty"`

	// Value: Custom field value.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CustomFieldId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CustomField: Custom field.

func (*CustomField) MarshalJSON

func (s *CustomField) MarshalJSON() ([]byte, error)

type CustomFieldDef

type CustomFieldDef struct {
	// Enabled: Whether the field is enabled.
	Enabled bool `json:"enabled,omitempty"`

	// Enumitems: List of enum items for this custom field. Populated only
	// if the field type is enum. Enum fields appear as 'lists' in the
	// Coordinate web and mobile UI.
	Enumitems []*EnumItemDef `json:"enumitems,omitempty"`

	// Id: Custom field id.
	Id int64 `json:"id,omitempty,string"`

	// Kind: Identifies this object as a custom field definition.
	Kind string `json:"kind,omitempty"`

	// Name: Custom field name.
	Name string `json:"name,omitempty"`

	// RequiredForCheckout: Whether the field is required for checkout.
	RequiredForCheckout bool `json:"requiredForCheckout,omitempty"`

	// Type: Custom field type.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Enabled") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CustomFieldDef: Custom field definition.

func (*CustomFieldDef) MarshalJSON

func (s *CustomFieldDef) MarshalJSON() ([]byte, error)

type CustomFieldDefListCall

type CustomFieldDefListCall struct {
	// contains filtered or unexported fields
}

func (*CustomFieldDefListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CustomFieldDefListCall) Do

Do executes the "coordinate.customFieldDef.list" call. Exactly one of *CustomFieldDefListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CustomFieldDefListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CustomFieldDefListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CustomFieldDefListCall) IfNoneMatch

func (c *CustomFieldDefListCall) IfNoneMatch(entityTag string) *CustomFieldDefListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CustomFieldDefListResponse

type CustomFieldDefListResponse struct {
	// Items: Collection of custom field definitions in a team.
	Items []*CustomFieldDef `json:"items,omitempty"`

	// Kind: Identifies this object as a collection of custom field
	// definitions in a team.
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CustomFieldDefListResponse: Collection of custom field definitions for a team.

func (*CustomFieldDefListResponse) MarshalJSON

func (s *CustomFieldDefListResponse) MarshalJSON() ([]byte, error)

type CustomFieldDefService

type CustomFieldDefService struct {
	// contains filtered or unexported fields
}

func NewCustomFieldDefService

func NewCustomFieldDefService(s *Service) *CustomFieldDefService

func (*CustomFieldDefService) List

List: Retrieves a list of custom field definitions for a team.

type CustomFields

type CustomFields struct {
	// CustomField: Collection of custom fields.
	CustomField []*CustomField `json:"customField,omitempty"`

	// Kind: Identifies this object as a collection of custom fields.
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CustomField") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CustomFields: Collection of custom fields.

func (*CustomFields) MarshalJSON

func (s *CustomFields) MarshalJSON() ([]byte, error)

type EnumItemDef

type EnumItemDef struct {
	// Active: Whether the enum item is active. Jobs may contain inactive
	// enum values; however, setting an enum to an inactive value when
	// creating or updating a job will result in a 500 error.
	Active bool `json:"active,omitempty"`

	// Kind: Identifies this object as an enum item definition.
	Kind string `json:"kind,omitempty"`

	// Value: Custom field value.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Active") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

EnumItemDef: Enum Item definition.

func (*EnumItemDef) MarshalJSON

func (s *EnumItemDef) MarshalJSON() ([]byte, error)

type Job

type Job struct {
	// Id: Job id.
	Id uint64 `json:"id,omitempty,string"`

	// JobChange: List of job changes since it was created. The first change
	// corresponds to the state of the job when it was created.
	JobChange []*JobChange `json:"jobChange,omitempty"`

	// Kind: Identifies this object as a job.
	Kind string `json:"kind,omitempty"`

	// State: Current job state.
	State *JobState `json:"state,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Job: A job.

func (*Job) MarshalJSON

func (s *Job) MarshalJSON() ([]byte, error)

type JobChange

type JobChange struct {
	// Kind: Identifies this object as a job change.
	Kind string `json:"kind,omitempty"`

	// State: Change applied to the job. Only the fields that were changed
	// are set.
	State *JobState `json:"state,omitempty"`

	// Timestamp: Time at which this change was applied.
	Timestamp uint64 `json:"timestamp,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

JobChange: Change to a job. For example assigning the job to a different worker.

func (*JobChange) MarshalJSON

func (s *JobChange) MarshalJSON() ([]byte, error)

type JobListResponse

type JobListResponse struct {
	// Items: Jobs in the collection.
	Items []*Job `json:"items,omitempty"`

	// Kind: Identifies this object as a list of jobs.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: A token to provide to get the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

JobListResponse: Response from a List Jobs request.

func (*JobListResponse) MarshalJSON

func (s *JobListResponse) MarshalJSON() ([]byte, error)

type JobState

type JobState struct {
	// Assignee: Email address of the assignee, or the string "DELETED_USER"
	// if the account is no longer available.
	Assignee string `json:"assignee,omitempty"`

	// CustomFields: Custom fields.
	CustomFields *CustomFields `json:"customFields,omitempty"`

	// CustomerName: Customer name.
	CustomerName string `json:"customerName,omitempty"`

	// CustomerPhoneNumber: Customer phone number.
	CustomerPhoneNumber string `json:"customerPhoneNumber,omitempty"`

	// Kind: Identifies this object as a job state.
	Kind string `json:"kind,omitempty"`

	// Location: Job location.
	Location *Location `json:"location,omitempty"`

	// Note: Note added to the job.
	Note []string `json:"note,omitempty"`

	// Progress: Job progress.
	Progress string `json:"progress,omitempty"`

	// Title: Job title.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Assignee") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

JobState: Current state of a job.

func (*JobState) MarshalJSON

func (s *JobState) MarshalJSON() ([]byte, error)

type JobsGetCall

type JobsGetCall struct {
	// contains filtered or unexported fields
}

func (*JobsGetCall) Context

func (c *JobsGetCall) Context(ctx context.Context) *JobsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*JobsGetCall) Do

func (c *JobsGetCall) Do() (*Job, error)

Do executes the "coordinate.jobs.get" call. Exactly one of *Job or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Job.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*JobsGetCall) Fields

func (c *JobsGetCall) Fields(s ...googleapi.Field) *JobsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*JobsGetCall) IfNoneMatch

func (c *JobsGetCall) IfNoneMatch(entityTag string) *JobsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type JobsInsertCall

type JobsInsertCall struct {
	// contains filtered or unexported fields
}

func (*JobsInsertCall) Assignee

func (c *JobsInsertCall) Assignee(assignee string) *JobsInsertCall

Assignee sets the optional parameter "assignee": Assignee email address, or empty string to unassign.

func (*JobsInsertCall) Context

func (c *JobsInsertCall) Context(ctx context.Context) *JobsInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*JobsInsertCall) CustomField

func (c *JobsInsertCall) CustomField(customField string) *JobsInsertCall

CustomField sets the optional parameter "customField": Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

func (*JobsInsertCall) CustomerName

func (c *JobsInsertCall) CustomerName(customerName string) *JobsInsertCall

CustomerName sets the optional parameter "customerName": Customer name

func (*JobsInsertCall) CustomerPhoneNumber

func (c *JobsInsertCall) CustomerPhoneNumber(customerPhoneNumber string) *JobsInsertCall

CustomerPhoneNumber sets the optional parameter "customerPhoneNumber": Customer phone number

func (*JobsInsertCall) Do

func (c *JobsInsertCall) Do() (*Job, error)

Do executes the "coordinate.jobs.insert" call. Exactly one of *Job or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Job.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*JobsInsertCall) Fields

func (c *JobsInsertCall) Fields(s ...googleapi.Field) *JobsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*JobsInsertCall) Note

func (c *JobsInsertCall) Note(note string) *JobsInsertCall

Note sets the optional parameter "note": Job note as newline (Unix) separated string

type JobsListCall

type JobsListCall struct {
	// contains filtered or unexported fields
}

func (*JobsListCall) Context

func (c *JobsListCall) Context(ctx context.Context) *JobsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*JobsListCall) Do

func (c *JobsListCall) Do() (*JobListResponse, error)

Do executes the "coordinate.jobs.list" call. Exactly one of *JobListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *JobListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*JobsListCall) Fields

func (c *JobsListCall) Fields(s ...googleapi.Field) *JobsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*JobsListCall) IfNoneMatch

func (c *JobsListCall) IfNoneMatch(entityTag string) *JobsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*JobsListCall) MaxResults

func (c *JobsListCall) MaxResults(maxResults int64) *JobsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of results to return in one page.

func (*JobsListCall) MinModifiedTimestampMs

func (c *JobsListCall) MinModifiedTimestampMs(minModifiedTimestampMs uint64) *JobsListCall

MinModifiedTimestampMs sets the optional parameter "minModifiedTimestampMs": Minimum time a job was modified in milliseconds since epoch.

func (*JobsListCall) OmitJobChanges

func (c *JobsListCall) OmitJobChanges(omitJobChanges bool) *JobsListCall

OmitJobChanges sets the optional parameter "omitJobChanges": Whether to omit detail job history information.

func (*JobsListCall) PageToken

func (c *JobsListCall) PageToken(pageToken string) *JobsListCall

PageToken sets the optional parameter "pageToken": Continuation token

type JobsPatchCall

type JobsPatchCall struct {
	// contains filtered or unexported fields
}

func (*JobsPatchCall) Address

func (c *JobsPatchCall) Address(address string) *JobsPatchCall

Address sets the optional parameter "address": Job address as newline (Unix) separated string

func (*JobsPatchCall) Assignee

func (c *JobsPatchCall) Assignee(assignee string) *JobsPatchCall

Assignee sets the optional parameter "assignee": Assignee email address, or empty string to unassign.

func (*JobsPatchCall) Context

func (c *JobsPatchCall) Context(ctx context.Context) *JobsPatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*JobsPatchCall) CustomField

func (c *JobsPatchCall) CustomField(customField string) *JobsPatchCall

CustomField sets the optional parameter "customField": Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

func (*JobsPatchCall) CustomerName

func (c *JobsPatchCall) CustomerName(customerName string) *JobsPatchCall

CustomerName sets the optional parameter "customerName": Customer name

func (*JobsPatchCall) CustomerPhoneNumber

func (c *JobsPatchCall) CustomerPhoneNumber(customerPhoneNumber string) *JobsPatchCall

CustomerPhoneNumber sets the optional parameter "customerPhoneNumber": Customer phone number

func (*JobsPatchCall) Do

func (c *JobsPatchCall) Do() (*Job, error)

Do executes the "coordinate.jobs.patch" call. Exactly one of *Job or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Job.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*JobsPatchCall) Fields

func (c *JobsPatchCall) Fields(s ...googleapi.Field) *JobsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*JobsPatchCall) Lat

func (c *JobsPatchCall) Lat(lat float64) *JobsPatchCall

Lat sets the optional parameter "lat": The latitude coordinate of this job's location.

func (*JobsPatchCall) Lng

func (c *JobsPatchCall) Lng(lng float64) *JobsPatchCall

Lng sets the optional parameter "lng": The longitude coordinate of this job's location.

func (*JobsPatchCall) Note

func (c *JobsPatchCall) Note(note string) *JobsPatchCall

Note sets the optional parameter "note": Job note as newline (Unix) separated string

func (*JobsPatchCall) Progress

func (c *JobsPatchCall) Progress(progress string) *JobsPatchCall

Progress sets the optional parameter "progress": Job progress

Possible values:

"COMPLETED" - Completed
"IN_PROGRESS" - In progress
"NOT_ACCEPTED" - Not accepted
"NOT_STARTED" - Not started
"OBSOLETE" - Obsolete

func (*JobsPatchCall) Title

func (c *JobsPatchCall) Title(title string) *JobsPatchCall

Title sets the optional parameter "title": Job title

type JobsService

type JobsService struct {
	// contains filtered or unexported fields
}

func NewJobsService

func NewJobsService(s *Service) *JobsService

func (*JobsService) Get

func (r *JobsService) Get(teamId string, jobId uint64) *JobsGetCall

Get: Retrieves a job, including all the changes made to the job.

func (*JobsService) Insert

func (r *JobsService) Insert(teamId string, address string, lat float64, lng float64, title string, job *Job) *JobsInsertCall

Insert: Inserts a new job. Only the state field of the job should be set.

func (*JobsService) List

func (r *JobsService) List(teamId string) *JobsListCall

List: Retrieves jobs created or modified since the given timestamp.

func (*JobsService) Patch

func (r *JobsService) Patch(teamId string, jobId uint64, job *Job) *JobsPatchCall

Patch: Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics.

func (*JobsService) Update

func (r *JobsService) Update(teamId string, jobId uint64, job *Job) *JobsUpdateCall

Update: Updates a job. Fields that are set in the job state will be updated.

type JobsUpdateCall

type JobsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*JobsUpdateCall) Address

func (c *JobsUpdateCall) Address(address string) *JobsUpdateCall

Address sets the optional parameter "address": Job address as newline (Unix) separated string

func (*JobsUpdateCall) Assignee

func (c *JobsUpdateCall) Assignee(assignee string) *JobsUpdateCall

Assignee sets the optional parameter "assignee": Assignee email address, or empty string to unassign.

func (*JobsUpdateCall) Context

func (c *JobsUpdateCall) Context(ctx context.Context) *JobsUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*JobsUpdateCall) CustomField

func (c *JobsUpdateCall) CustomField(customField string) *JobsUpdateCall

CustomField sets the optional parameter "customField": Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

func (*JobsUpdateCall) CustomerName

func (c *JobsUpdateCall) CustomerName(customerName string) *JobsUpdateCall

CustomerName sets the optional parameter "customerName": Customer name

func (*JobsUpdateCall) CustomerPhoneNumber

func (c *JobsUpdateCall) CustomerPhoneNumber(customerPhoneNumber string) *JobsUpdateCall

CustomerPhoneNumber sets the optional parameter "customerPhoneNumber": Customer phone number

func (*JobsUpdateCall) Do

func (c *JobsUpdateCall) Do() (*Job, error)

Do executes the "coordinate.jobs.update" call. Exactly one of *Job or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Job.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*JobsUpdateCall) Fields

func (c *JobsUpdateCall) Fields(s ...googleapi.Field) *JobsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*JobsUpdateCall) Lat

func (c *JobsUpdateCall) Lat(lat float64) *JobsUpdateCall

Lat sets the optional parameter "lat": The latitude coordinate of this job's location.

func (*JobsUpdateCall) Lng

func (c *JobsUpdateCall) Lng(lng float64) *JobsUpdateCall

Lng sets the optional parameter "lng": The longitude coordinate of this job's location.

func (*JobsUpdateCall) Note

func (c *JobsUpdateCall) Note(note string) *JobsUpdateCall

Note sets the optional parameter "note": Job note as newline (Unix) separated string

func (*JobsUpdateCall) Progress

func (c *JobsUpdateCall) Progress(progress string) *JobsUpdateCall

Progress sets the optional parameter "progress": Job progress

Possible values:

"COMPLETED" - Completed
"IN_PROGRESS" - In progress
"NOT_ACCEPTED" - Not accepted
"NOT_STARTED" - Not started
"OBSOLETE" - Obsolete

func (*JobsUpdateCall) Title

func (c *JobsUpdateCall) Title(title string) *JobsUpdateCall

Title sets the optional parameter "title": Job title

type Location

type Location struct {
	// AddressLine: Address.
	AddressLine []string `json:"addressLine,omitempty"`

	// Kind: Identifies this object as a location.
	Kind string `json:"kind,omitempty"`

	// Lat: Latitude.
	Lat float64 `json:"lat,omitempty"`

	// Lng: Longitude.
	Lng float64 `json:"lng,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AddressLine") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Location: Location of a job.

func (*Location) MarshalJSON

func (s *Location) MarshalJSON() ([]byte, error)

type LocationListCall

type LocationListCall struct {
	// contains filtered or unexported fields
}

func (*LocationListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LocationListCall) Do

Do executes the "coordinate.location.list" call. Exactly one of *LocationListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LocationListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LocationListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LocationListCall) IfNoneMatch

func (c *LocationListCall) IfNoneMatch(entityTag string) *LocationListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*LocationListCall) MaxResults

func (c *LocationListCall) MaxResults(maxResults int64) *LocationListCall

MaxResults sets the optional parameter "maxResults": Maximum number of results to return in one page.

func (*LocationListCall) PageToken

func (c *LocationListCall) PageToken(pageToken string) *LocationListCall

PageToken sets the optional parameter "pageToken": Continuation token

type LocationListResponse

type LocationListResponse struct {
	// Items: Locations in the collection.
	Items []*LocationRecord `json:"items,omitempty"`

	// Kind: Identifies this object as a list of locations.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: A token to provide to get the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// TokenPagination: Pagination information for token pagination.
	TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

LocationListResponse: Response from a List Locations request.

func (*LocationListResponse) MarshalJSON

func (s *LocationListResponse) MarshalJSON() ([]byte, error)

type LocationRecord

type LocationRecord struct {
	// CollectionTime: The collection time in milliseconds since the epoch.
	CollectionTime int64 `json:"collectionTime,omitempty,string"`

	// ConfidenceRadius: The location accuracy in meters. This is the radius
	// of a 95% confidence interval around the location measurement.
	ConfidenceRadius float64 `json:"confidenceRadius,omitempty"`

	// Kind: Identifies this object as a location.
	Kind string `json:"kind,omitempty"`

	// Latitude: Latitude.
	Latitude float64 `json:"latitude,omitempty"`

	// Longitude: Longitude.
	Longitude float64 `json:"longitude,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CollectionTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

LocationRecord: Recorded location of a worker.

func (*LocationRecord) MarshalJSON

func (s *LocationRecord) MarshalJSON() ([]byte, error)

type LocationService

type LocationService struct {
	// contains filtered or unexported fields
}

func NewLocationService

func NewLocationService(s *Service) *LocationService

func (*LocationService) List

func (r *LocationService) List(teamId string, workerEmail string, startTimestampMs uint64) *LocationListCall

List: Retrieves a list of locations for a worker.

type Schedule

type Schedule struct {
	// AllDay: Whether the job is scheduled for the whole day. Time of day
	// in start/end times is ignored if this is true.
	AllDay bool `json:"allDay,omitempty"`

	// Duration: Job duration in milliseconds.
	Duration uint64 `json:"duration,omitempty,string"`

	// EndTime: Scheduled end time in milliseconds since epoch.
	EndTime uint64 `json:"endTime,omitempty,string"`

	// Kind: Identifies this object as a job schedule.
	Kind string `json:"kind,omitempty"`

	// StartTime: Scheduled start time in milliseconds since epoch.
	StartTime uint64 `json:"startTime,omitempty,string"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AllDay") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Schedule: Job schedule.

func (*Schedule) MarshalJSON

func (s *Schedule) MarshalJSON() ([]byte, error)

type ScheduleGetCall

type ScheduleGetCall struct {
	// contains filtered or unexported fields
}

func (*ScheduleGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ScheduleGetCall) Do

func (c *ScheduleGetCall) Do() (*Schedule, error)

Do executes the "coordinate.schedule.get" call. Exactly one of *Schedule or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Schedule.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ScheduleGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ScheduleGetCall) IfNoneMatch

func (c *ScheduleGetCall) IfNoneMatch(entityTag string) *ScheduleGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SchedulePatchCall

type SchedulePatchCall struct {
	// contains filtered or unexported fields
}

func (*SchedulePatchCall) AllDay

func (c *SchedulePatchCall) AllDay(allDay bool) *SchedulePatchCall

AllDay sets the optional parameter "allDay": Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true.

func (*SchedulePatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SchedulePatchCall) Do

func (c *SchedulePatchCall) Do() (*Schedule, error)

Do executes the "coordinate.schedule.patch" call. Exactly one of *Schedule or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Schedule.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SchedulePatchCall) Duration

func (c *SchedulePatchCall) Duration(duration uint64) *SchedulePatchCall

Duration sets the optional parameter "duration": Job duration in milliseconds.

func (*SchedulePatchCall) EndTime

func (c *SchedulePatchCall) EndTime(endTime uint64) *SchedulePatchCall

EndTime sets the optional parameter "endTime": Scheduled end time in milliseconds since epoch.

func (*SchedulePatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SchedulePatchCall) StartTime

func (c *SchedulePatchCall) StartTime(startTime uint64) *SchedulePatchCall

StartTime sets the optional parameter "startTime": Scheduled start time in milliseconds since epoch.

type ScheduleService

type ScheduleService struct {
	// contains filtered or unexported fields
}

func NewScheduleService

func NewScheduleService(s *Service) *ScheduleService

func (*ScheduleService) Get

func (r *ScheduleService) Get(teamId string, jobId uint64) *ScheduleGetCall

Get: Retrieves the schedule for a job.

func (*ScheduleService) Patch

func (r *ScheduleService) Patch(teamId string, jobId uint64, schedule *Schedule) *SchedulePatchCall

Patch: Replaces the schedule of a job with the provided schedule. This method supports patch semantics.

func (*ScheduleService) Update

func (r *ScheduleService) Update(teamId string, jobId uint64, schedule *Schedule) *ScheduleUpdateCall

Update: Replaces the schedule of a job with the provided schedule.

type ScheduleUpdateCall

type ScheduleUpdateCall struct {
	// contains filtered or unexported fields
}

func (*ScheduleUpdateCall) AllDay

func (c *ScheduleUpdateCall) AllDay(allDay bool) *ScheduleUpdateCall

AllDay sets the optional parameter "allDay": Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true.

func (*ScheduleUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ScheduleUpdateCall) Do

func (c *ScheduleUpdateCall) Do() (*Schedule, error)

Do executes the "coordinate.schedule.update" call. Exactly one of *Schedule or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Schedule.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ScheduleUpdateCall) Duration

func (c *ScheduleUpdateCall) Duration(duration uint64) *ScheduleUpdateCall

Duration sets the optional parameter "duration": Job duration in milliseconds.

func (*ScheduleUpdateCall) EndTime

func (c *ScheduleUpdateCall) EndTime(endTime uint64) *ScheduleUpdateCall

EndTime sets the optional parameter "endTime": Scheduled end time in milliseconds since epoch.

func (*ScheduleUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ScheduleUpdateCall) StartTime

func (c *ScheduleUpdateCall) StartTime(startTime uint64) *ScheduleUpdateCall

StartTime sets the optional parameter "startTime": Scheduled start time in milliseconds since epoch.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	CustomFieldDef *CustomFieldDefService

	Jobs *JobsService

	Location *LocationService

	Schedule *ScheduleService

	Team *TeamService

	Worker *WorkerService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Team

type Team struct {
	// Id: Team id, as found in a coordinate team url e.g.
	// https://coordinate.google.com/f/xyz where "xyz" is the team id.
	Id string `json:"id,omitempty"`

	// Kind: Identifies this object as a team.
	Kind string `json:"kind,omitempty"`

	// Name: Team name
	Name string `json:"name,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Team: A Coordinate team.

func (*Team) MarshalJSON

func (s *Team) MarshalJSON() ([]byte, error)

type TeamListCall

type TeamListCall struct {
	// contains filtered or unexported fields
}

func (*TeamListCall) Admin

func (c *TeamListCall) Admin(admin bool) *TeamListCall

Admin sets the optional parameter "admin": Whether to include teams for which the user has the Admin role.

func (*TeamListCall) Context

func (c *TeamListCall) Context(ctx context.Context) *TeamListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TeamListCall) Dispatcher

func (c *TeamListCall) Dispatcher(dispatcher bool) *TeamListCall

Dispatcher sets the optional parameter "dispatcher": Whether to include teams for which the user has the Dispatcher role.

func (*TeamListCall) Do

func (c *TeamListCall) Do() (*TeamListResponse, error)

Do executes the "coordinate.team.list" call. Exactly one of *TeamListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TeamListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TeamListCall) Fields

func (c *TeamListCall) Fields(s ...googleapi.Field) *TeamListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TeamListCall) IfNoneMatch

func (c *TeamListCall) IfNoneMatch(entityTag string) *TeamListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*TeamListCall) Worker

func (c *TeamListCall) Worker(worker bool) *TeamListCall

Worker sets the optional parameter "worker": Whether to include teams for which the user has the Worker role.

type TeamListResponse

type TeamListResponse struct {
	// Items: Teams in the collection.
	Items []*Team `json:"items,omitempty"`

	// Kind: Identifies this object as a list of teams.
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

TeamListResponse: Response from a List Teams request.

func (*TeamListResponse) MarshalJSON

func (s *TeamListResponse) MarshalJSON() ([]byte, error)

type TeamService

type TeamService struct {
	// contains filtered or unexported fields
}

func NewTeamService

func NewTeamService(s *Service) *TeamService

func (*TeamService) List

func (r *TeamService) List() *TeamListCall

List: Retrieves a list of teams for a user.

type TokenPagination

type TokenPagination struct {
	// Kind: Identifies this object as pagination information.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: A token to provide to get the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// PreviousPageToken: A token to provide to get the previous page of
	// results.
	PreviousPageToken string `json:"previousPageToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

TokenPagination: Pagination information.

func (*TokenPagination) MarshalJSON

func (s *TokenPagination) MarshalJSON() ([]byte, error)

type Worker

type Worker struct {
	// Id: Worker email address. If a worker has been deleted from your
	// team, the email address will appear as DELETED_USER.
	Id string `json:"id,omitempty"`

	// Kind: Identifies this object as a worker.
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Worker: A worker in a Coordinate team.

func (*Worker) MarshalJSON

func (s *Worker) MarshalJSON() ([]byte, error)

type WorkerListCall

type WorkerListCall struct {
	// contains filtered or unexported fields
}

func (*WorkerListCall) Context

func (c *WorkerListCall) Context(ctx context.Context) *WorkerListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*WorkerListCall) Do

Do executes the "coordinate.worker.list" call. Exactly one of *WorkerListResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *WorkerListResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*WorkerListCall) Fields

func (c *WorkerListCall) Fields(s ...googleapi.Field) *WorkerListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*WorkerListCall) IfNoneMatch

func (c *WorkerListCall) IfNoneMatch(entityTag string) *WorkerListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type WorkerListResponse

type WorkerListResponse struct {
	// Items: Workers in the collection.
	Items []*Worker `json:"items,omitempty"`

	// Kind: Identifies this object as a list of workers.
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

WorkerListResponse: Response from a List Workers request.

func (*WorkerListResponse) MarshalJSON

func (s *WorkerListResponse) MarshalJSON() ([]byte, error)

type WorkerService

type WorkerService struct {
	// contains filtered or unexported fields
}

func NewWorkerService

func NewWorkerService(s *Service) *WorkerService

func (*WorkerService) List

func (r *WorkerService) List(teamId string) *WorkerListCall

List: Retrieves a list of workers in a team.

Jump to

Keyboard shortcuts

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