script
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package script provides access to the Apps Script API.
For product documentation, see:https://developers.google.com/apps-script/api/
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/script/v1"...ctx := context.Background()scriptService, err := script.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:
scriptService, err := script.NewService(ctx, option.WithScopes(script.UserinfoEmailScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
scriptService, err := script.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)scriptService, err := script.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type Content
- type CreateProjectRequest
- type Deployment
- type DeploymentConfig
- type Empty
- type EntryPoint
- type ExecutionError
- type ExecutionRequest
- type ExecutionResponse
- type File
- type GoogleAppsScriptTypeAddOnEntryPoint
- type GoogleAppsScriptTypeExecutionApiConfig
- type GoogleAppsScriptTypeExecutionApiEntryPoint
- type GoogleAppsScriptTypeFunction
- type GoogleAppsScriptTypeFunctionSet
- type GoogleAppsScriptTypeProcess
- type GoogleAppsScriptTypeUser
- type GoogleAppsScriptTypeWebAppConfig
- type GoogleAppsScriptTypeWebAppEntryPoint
- type ListDeploymentsResponse
- type ListScriptProcessesResponse
- type ListUserProcessesResponse
- type ListVersionsResponse
- type Metrics
- type MetricsValue
- type Operation
- type ProcessesListCall
- func (c *ProcessesListCall) Context(ctx context.Context) *ProcessesListCall
- func (c *ProcessesListCall) Do(opts ...googleapi.CallOption) (*ListUserProcessesResponse, error)
- func (c *ProcessesListCall) Fields(s ...googleapi.Field) *ProcessesListCall
- func (c *ProcessesListCall) Header() http.Header
- func (c *ProcessesListCall) IfNoneMatch(entityTag string) *ProcessesListCall
- func (c *ProcessesListCall) PageSize(pageSize int64) *ProcessesListCall
- func (c *ProcessesListCall) PageToken(pageToken string) *ProcessesListCall
- func (c *ProcessesListCall) Pages(ctx context.Context, f func(*ListUserProcessesResponse) error) error
- func (c *ProcessesListCall) UserProcessFilterDeploymentId(userProcessFilterDeploymentId string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterEndTime(userProcessFilterEndTime string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterFunctionName(userProcessFilterFunctionName string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterProjectName(userProcessFilterProjectName string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterScriptId(userProcessFilterScriptId string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterStartTime(userProcessFilterStartTime string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterStatuses(userProcessFilterStatuses ...string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterTypes(userProcessFilterTypes ...string) *ProcessesListCall
- func (c *ProcessesListCall) UserProcessFilterUserAccessLevels(userProcessFilterUserAccessLevels ...string) *ProcessesListCall
- type ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) Context(ctx context.Context) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) Do(opts ...googleapi.CallOption) (*ListScriptProcessesResponse, error)
- func (c *ProcessesListScriptProcessesCall) Fields(s ...googleapi.Field) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) Header() http.Header
- func (c *ProcessesListScriptProcessesCall) IfNoneMatch(entityTag string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) PageSize(pageSize int64) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) PageToken(pageToken string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) Pages(ctx context.Context, f func(*ListScriptProcessesResponse) error) error
- func (c *ProcessesListScriptProcessesCall) ScriptId(scriptId string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterDeploymentId(scriptProcessFilterDeploymentId string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterEndTime(scriptProcessFilterEndTime string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterFunctionName(scriptProcessFilterFunctionName string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterStartTime(scriptProcessFilterStartTime string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterStatuses(scriptProcessFilterStatuses ...string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterTypes(scriptProcessFilterTypes ...string) *ProcessesListScriptProcessesCall
- func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterUserAccessLevels(scriptProcessFilterUserAccessLevels ...string) *ProcessesListScriptProcessesCall
- type ProcessesService
- type Project
- type ProjectsCreateCall
- type ProjectsDeploymentsCreateCall
- func (c *ProjectsDeploymentsCreateCall) Context(ctx context.Context) *ProjectsDeploymentsCreateCall
- func (c *ProjectsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Deployment, error)
- func (c *ProjectsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsCreateCall
- func (c *ProjectsDeploymentsCreateCall) Header() http.Header
- type ProjectsDeploymentsDeleteCall
- func (c *ProjectsDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsDeploymentsDeleteCall
- func (c *ProjectsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsDeleteCall
- func (c *ProjectsDeploymentsDeleteCall) Header() http.Header
- type ProjectsDeploymentsGetCall
- func (c *ProjectsDeploymentsGetCall) Context(ctx context.Context) *ProjectsDeploymentsGetCall
- func (c *ProjectsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error)
- func (c *ProjectsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsGetCall
- func (c *ProjectsDeploymentsGetCall) Header() http.Header
- func (c *ProjectsDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsDeploymentsGetCall
- type ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) Context(ctx context.Context) *ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentsResponse, error)
- func (c *ProjectsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) Header() http.Header
- func (c *ProjectsDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) PageSize(pageSize int64) *ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) PageToken(pageToken string) *ProjectsDeploymentsListCall
- func (c *ProjectsDeploymentsListCall) Pages(ctx context.Context, f func(*ListDeploymentsResponse) error) error
- type ProjectsDeploymentsService
- func (r *ProjectsDeploymentsService) Create(scriptId string, deploymentconfig *DeploymentConfig) *ProjectsDeploymentsCreateCall
- func (r *ProjectsDeploymentsService) Delete(scriptId string, deploymentId string) *ProjectsDeploymentsDeleteCall
- func (r *ProjectsDeploymentsService) Get(scriptId string, deploymentId string) *ProjectsDeploymentsGetCall
- func (r *ProjectsDeploymentsService) List(scriptId string) *ProjectsDeploymentsListCall
- func (r *ProjectsDeploymentsService) Update(scriptId string, deploymentId string, ...) *ProjectsDeploymentsUpdateCall
- type ProjectsDeploymentsUpdateCall
- func (c *ProjectsDeploymentsUpdateCall) Context(ctx context.Context) *ProjectsDeploymentsUpdateCall
- func (c *ProjectsDeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Deployment, error)
- func (c *ProjectsDeploymentsUpdateCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsUpdateCall
- func (c *ProjectsDeploymentsUpdateCall) Header() http.Header
- type ProjectsGetCall
- func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall
- func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error)
- func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall
- func (c *ProjectsGetCall) Header() http.Header
- func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall
- type ProjectsGetContentCall
- func (c *ProjectsGetContentCall) Context(ctx context.Context) *ProjectsGetContentCall
- func (c *ProjectsGetContentCall) Do(opts ...googleapi.CallOption) (*Content, error)
- func (c *ProjectsGetContentCall) Fields(s ...googleapi.Field) *ProjectsGetContentCall
- func (c *ProjectsGetContentCall) Header() http.Header
- func (c *ProjectsGetContentCall) IfNoneMatch(entityTag string) *ProjectsGetContentCall
- func (c *ProjectsGetContentCall) VersionNumber(versionNumber int64) *ProjectsGetContentCall
- type ProjectsGetMetricsCall
- func (c *ProjectsGetMetricsCall) Context(ctx context.Context) *ProjectsGetMetricsCall
- func (c *ProjectsGetMetricsCall) Do(opts ...googleapi.CallOption) (*Metrics, error)
- func (c *ProjectsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsGetMetricsCall
- func (c *ProjectsGetMetricsCall) Header() http.Header
- func (c *ProjectsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsGetMetricsCall
- func (c *ProjectsGetMetricsCall) MetricsFilterDeploymentId(metricsFilterDeploymentId string) *ProjectsGetMetricsCall
- func (c *ProjectsGetMetricsCall) MetricsGranularity(metricsGranularity string) *ProjectsGetMetricsCall
- type ProjectsService
- func (r *ProjectsService) Create(createprojectrequest *CreateProjectRequest) *ProjectsCreateCall
- func (r *ProjectsService) Get(scriptId string) *ProjectsGetCall
- func (r *ProjectsService) GetContent(scriptId string) *ProjectsGetContentCall
- func (r *ProjectsService) GetMetrics(scriptId string) *ProjectsGetMetricsCall
- func (r *ProjectsService) UpdateContent(scriptId string, content *Content) *ProjectsUpdateContentCall
- type ProjectsUpdateContentCall
- func (c *ProjectsUpdateContentCall) Context(ctx context.Context) *ProjectsUpdateContentCall
- func (c *ProjectsUpdateContentCall) Do(opts ...googleapi.CallOption) (*Content, error)
- func (c *ProjectsUpdateContentCall) Fields(s ...googleapi.Field) *ProjectsUpdateContentCall
- func (c *ProjectsUpdateContentCall) Header() http.Header
- type ProjectsVersionsCreateCall
- func (c *ProjectsVersionsCreateCall) Context(ctx context.Context) *ProjectsVersionsCreateCall
- func (c *ProjectsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Version, error)
- func (c *ProjectsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsVersionsCreateCall
- func (c *ProjectsVersionsCreateCall) Header() http.Header
- type ProjectsVersionsGetCall
- func (c *ProjectsVersionsGetCall) Context(ctx context.Context) *ProjectsVersionsGetCall
- func (c *ProjectsVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error)
- func (c *ProjectsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsVersionsGetCall
- func (c *ProjectsVersionsGetCall) Header() http.Header
- func (c *ProjectsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsVersionsGetCall
- type ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) Context(ctx context.Context) *ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error)
- func (c *ProjectsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) Header() http.Header
- func (c *ProjectsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) PageSize(pageSize int64) *ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) PageToken(pageToken string) *ProjectsVersionsListCall
- func (c *ProjectsVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error
- type ProjectsVersionsService
- type ScriptStackTraceElement
- type ScriptsRunCall
- type ScriptsService
- type Service
- type Status
- type UpdateDeploymentRequest
- type Version
Constants¶
const (// Read, compose, send, and permanently delete all your email from GmailMailGoogleComScope = "https://mail.google.com/"// See, edit, share, and permanently delete all the calendars you can access// using Google CalendarWwwGoogleComCalendarFeedsScope = "https://www.google.com/calendar/feeds"// See, edit, download, and permanently delete your contactsWwwGoogleComM8FeedsScope = "https://www.google.com/m8/feeds"// View and manage the provisioning of groups on your domainAdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin.directory.group"// View and manage the provisioning of users on your domainAdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.directory.user"// See, edit, create, and delete all your Google Docs documentsDocumentsScope = "https://www.googleapis.com/auth/documents"// See, edit, create, and delete all of your Google Drive filesDriveScope = "https://www.googleapis.com/auth/drive"// View and manage your forms in Google DriveFormsScope = "https://www.googleapis.com/auth/forms"// View and manage forms that this application has been installed inFormsCurrentonlyScope = "https://www.googleapis.com/auth/forms.currentonly"// View and manage your Google GroupsGroupsScope = "https://www.googleapis.com/auth/groups"// Create and update Google Apps Script deploymentsScriptDeploymentsScope = "https://www.googleapis.com/auth/script.deployments"// View Google Apps Script deploymentsScriptDeploymentsReadonlyScope = "https://www.googleapis.com/auth/script.deployments.readonly"// View Google Apps Script project's metricsScriptMetricsScope = "https://www.googleapis.com/auth/script.metrics"// View Google Apps Script processesScriptProcessesScope = "https://www.googleapis.com/auth/script.processes"// Create and update Google Apps Script projectsScriptProjectsScope = "https://www.googleapis.com/auth/script.projects"// View Google Apps Script projectsScriptProjectsReadonlyScope = "https://www.googleapis.com/auth/script.projects.readonly"// See, edit, create, and delete all your Google Sheets spreadsheetsSpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets"// See your primary Google Account email addressUserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeContent¶
type Content struct {// Files: The list of script project files. One of the files is a script// manifest; it must be named "appsscript", must have type of JSON, and include// the manifest configurations for the project.Files []*File `json:"files,omitempty"`// ScriptId: The script project's Drive ID.ScriptIdstring `json:"scriptId,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Files") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Files") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Content: The Content resource.
func (Content)MarshalJSON¶
typeCreateProjectRequest¶
type CreateProjectRequest struct {// ParentId: The Drive ID of a parent file that the created script project is// bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form,// or Google Slides file. If not set, a standalone script project is created.ParentIdstring `json:"parentId,omitempty"`// Title: The title for the project.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "ParentId") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ParentId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CreateProjectRequest: Request to create a script project.
func (CreateProjectRequest)MarshalJSON¶
func (sCreateProjectRequest) MarshalJSON() ([]byte,error)
typeDeployment¶
type Deployment struct {// DeploymentConfig: The deployment configuration.DeploymentConfig *DeploymentConfig `json:"deploymentConfig,omitempty"`// DeploymentId: The deployment ID for this deployment.DeploymentIdstring `json:"deploymentId,omitempty"`// EntryPoints: The deployment's entry points.EntryPoints []*EntryPoint `json:"entryPoints,omitempty"`// UpdateTime: Last modified date time stamp.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DeploymentConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeploymentConfig") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Deployment: Representation of a single script deployment.
func (Deployment)MarshalJSON¶
func (sDeployment) MarshalJSON() ([]byte,error)
typeDeploymentConfig¶
type DeploymentConfig struct {// Description: The description for this deployment.Descriptionstring `json:"description,omitempty"`// ManifestFileName: The manifest file name for this deployment.ManifestFileNamestring `json:"manifestFileName,omitempty"`// ScriptId: The script project's Drive ID.ScriptIdstring `json:"scriptId,omitempty"`// VersionNumber: The version number on which this deployment is based.VersionNumberint64 `json:"versionNumber,omitempty"`// ForceSendFields is a list of field names (e.g. "Description") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Description") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DeploymentConfig: Metadata the defines how a deployment is configured.
func (DeploymentConfig)MarshalJSON¶
func (sDeploymentConfig) MarshalJSON() ([]byte,error)
typeEmpty¶
type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
typeEntryPoint¶
type EntryPoint struct {// AddOn: Add-on properties.AddOn *GoogleAppsScriptTypeAddOnEntryPoint `json:"addOn,omitempty"`// EntryPointType: The type of the entry point.//// Possible values:// "ENTRY_POINT_TYPE_UNSPECIFIED" - An unspecified entry point.// "WEB_APP" - A web application entry point.// "EXECUTION_API" - An API executable entry point.// "ADD_ON" - An Add-On entry point.EntryPointTypestring `json:"entryPointType,omitempty"`// ExecutionApi: An entry point specification for Apps Script API execution// calls.ExecutionApi *GoogleAppsScriptTypeExecutionApiEntryPoint `json:"executionApi,omitempty"`// WebApp: An entry point specification for web apps.WebApp *GoogleAppsScriptTypeWebAppEntryPoint `json:"webApp,omitempty"`// ForceSendFields is a list of field names (e.g. "AddOn") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AddOn") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}EntryPoint: A configuration that defines how a deployment is accessedexternally.
func (EntryPoint)MarshalJSON¶
func (sEntryPoint) MarshalJSON() ([]byte,error)
typeExecutionError¶
type ExecutionError struct {// ErrorMessage: The error message thrown by Apps Script, usually localized// into the user's language.ErrorMessagestring `json:"errorMessage,omitempty"`// ErrorType: The error type, for example `TypeError` or `ReferenceError`. If// the error type is unavailable, this field is not included.ErrorTypestring `json:"errorType,omitempty"`// ScriptStackTraceElements: An array of objects that provide a stack trace// through the script to show where the execution failed, with the deepest call// first.ScriptStackTraceElements []*ScriptStackTraceElement `json:"scriptStackTraceElements,omitempty"`// ForceSendFields is a list of field names (e.g. "ErrorMessage") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ErrorMessage") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ExecutionError: An object that provides information about the nature of anerror resulting from an attempted execution of a script function using theApps Script API. If a run call succeeds but the script function (or AppsScript itself) throws an exception, the response body's error field containsa Status object. The `Status` object's `details` field contains an arraywith a single one of these `ExecutionError` objects.
func (ExecutionError)MarshalJSON¶
func (sExecutionError) MarshalJSON() ([]byte,error)
typeExecutionRequest¶
type ExecutionRequest struct {// DevMode: If `true` and the user is an owner of the script, the script runs// at the most recently saved version rather than the version deployed for use// with the Apps Script API. Optional; default is `false`.DevModebool `json:"devMode,omitempty"`// Function: The name of the function to execute in the given script. The name// does not include parentheses or parameters. It can reference a function in// an included library such as `Library.libFunction1`.Functionstring `json:"function,omitempty"`// Parameters: The parameters to be passed to the function being executed. The// object type for each parameter should match the expected type in Apps// Script. Parameters cannot be Apps Script-specific object types (such as a// `Document` or a `Calendar`); they can only be primitive types such as// `string`, `number`, `array`, `object`, or `boolean`. Optional.Parameters []interface{} `json:"parameters,omitempty"`// SessionState: *Deprecated*. For use with Android add-ons only. An ID that// represents the user's current session in the Android app for Google Docs or// Sheets, included as extra data in the Intent// (https://developer.android.com/guide/components/intents-filters.html) that// launches the add-on. When an Android add-on is run with a session state, it// gains the privileges of a bound// (https://developers.google.com/apps-script/guides/bound) script—that is,// it can access information like the user's current cursor position (in Docs)// or selected cell (in Sheets). To retrieve the state, call// `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`.// Optional.SessionStatestring `json:"sessionState,omitempty"`// ForceSendFields is a list of field names (e.g. "DevMode") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DevMode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ExecutionRequest: A request to run the function in a script. The script isidentified by the specified `script_id`. Executing a function on a scriptreturns results based on the implementation of the script.
func (ExecutionRequest)MarshalJSON¶
func (sExecutionRequest) MarshalJSON() ([]byte,error)
typeExecutionResponse¶
type ExecutionResponse struct {// Result: The return value of the script function. The type matches the object// type returned in Apps Script. Functions called using the Apps Script API// cannot return Apps Script-specific objects (such as a `Document` or a// `Calendar`); they can only return primitive types such as a `string`,// `number`, `array`, `object`, or `boolean`.Result interface{} `json:"result,omitempty"`// ForceSendFields is a list of field names (e.g. "Result") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Result") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ExecutionResponse: An object that provides the return value of a functionexecuted using the Apps Script API. If the script function returnssuccessfully, the response body's response field contains this`ExecutionResponse` object.
func (ExecutionResponse)MarshalJSON¶
func (sExecutionResponse) MarshalJSON() ([]byte,error)
typeFile¶
type File struct {// CreateTime: Creation date timestamp.CreateTimestring `json:"createTime,omitempty"`// FunctionSet: The defined set of functions in the script file, if any.FunctionSet *GoogleAppsScriptTypeFunctionSet `json:"functionSet,omitempty"`// LastModifyUser: The user who modified the file most recently. The details// visible in this object are controlled by the profile visibility settings of// the last modifying user.LastModifyUser *GoogleAppsScriptTypeUser `json:"lastModifyUser,omitempty"`// Name: The name of the file. The file extension is not part of the file name,// which can be identified from the type field.Namestring `json:"name,omitempty"`// Source: The file content.Sourcestring `json:"source,omitempty"`// Type: The type of the file.//// Possible values:// "ENUM_TYPE_UNSPECIFIED" - Undetermined file type; never actually used.// "SERVER_JS" - An Apps Script server-side code file.// "HTML" - A file containing client-side HTML.// "JSON" - A file in JSON format. This type is only used for the script// project's manifest. The manifest file content must match the structure of a// valid [ScriptManifest](/apps-script/concepts/manifests)Typestring `json:"type,omitempty"`// UpdateTime: Last modified date timestamp.UpdateTimestring `json:"updateTime,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}File: An individual file within a script project. A file is a third-partysource code created by one or more developers. It can be a server-side JScode, HTML, or a configuration file. Each script project can containmultiple files.
func (File)MarshalJSON¶
typeGoogleAppsScriptTypeAddOnEntryPoint¶
type GoogleAppsScriptTypeAddOnEntryPoint struct {// AddOnType: The add-on's required list of supported container types.//// Possible values:// "UNKNOWN_ADDON_TYPE" - Default value, unknown add-on type.// "GMAIL" - Add-on type for Gmail.// "DATA_STUDIO" - Add-on type for Data Studio.AddOnTypestring `json:"addOnType,omitempty"`// Description: The add-on's optional description.Descriptionstring `json:"description,omitempty"`// HelpUrl: The add-on's optional help URL.HelpUrlstring `json:"helpUrl,omitempty"`// PostInstallTipUrl: The add-on's required post install tip URL.PostInstallTipUrlstring `json:"postInstallTipUrl,omitempty"`// ReportIssueUrl: The add-on's optional report issue URL.ReportIssueUrlstring `json:"reportIssueUrl,omitempty"`// Title: The add-on's required title.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "AddOnType") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AddOnType") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeAddOnEntryPoint: An add-on entry point.
func (GoogleAppsScriptTypeAddOnEntryPoint)MarshalJSON¶
func (sGoogleAppsScriptTypeAddOnEntryPoint) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeExecutionApiConfig¶
type GoogleAppsScriptTypeExecutionApiConfig struct {// Access: Who has permission to run the API executable.//// Possible values:// "UNKNOWN_ACCESS" - Default value, should not be used.// "MYSELF" - Only the user who deployed the web app or executable can access// it. Note that this is not necessarily the owner of the script project.// "DOMAIN" - Only users in the same domain as the user who deployed the web// app or executable can access it.// "ANYONE" - Any logged in user can access the web app or executable.// "ANYONE_ANONYMOUS" - Any user, logged in or not, can access the web app or// executable.Accessstring `json:"access,omitempty"`// ForceSendFields is a list of field names (e.g. "Access") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Access") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeExecutionApiConfig: API executable entry pointconfiguration.
func (GoogleAppsScriptTypeExecutionApiConfig)MarshalJSON¶
func (sGoogleAppsScriptTypeExecutionApiConfig) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeExecutionApiEntryPoint¶
type GoogleAppsScriptTypeExecutionApiEntryPoint struct {// EntryPointConfig: The entry point's configuration.EntryPointConfig *GoogleAppsScriptTypeExecutionApiConfig `json:"entryPointConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "EntryPointConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EntryPointConfig") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeExecutionApiEntryPoint: An API executable entry point.
func (GoogleAppsScriptTypeExecutionApiEntryPoint)MarshalJSON¶
func (sGoogleAppsScriptTypeExecutionApiEntryPoint) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeFunction¶
type GoogleAppsScriptTypeFunction struct {// Name: The function name in the script project.Namestring `json:"name,omitempty"`// Parameters: The ordered list of parameter names of the function in the// script project.Parameters []string `json:"parameters,omitempty"`// ForceSendFields is a list of field names (e.g. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeFunction: Represents a function in a script project.
func (GoogleAppsScriptTypeFunction)MarshalJSON¶
func (sGoogleAppsScriptTypeFunction) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeFunctionSet¶
type GoogleAppsScriptTypeFunctionSet struct {// Values: A list of functions composing the set.Values []*GoogleAppsScriptTypeFunction `json:"values,omitempty"`// ForceSendFields is a list of field names (e.g. "Values") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Values") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeFunctionSet: A set of functions. No duplicates arepermitted.
func (GoogleAppsScriptTypeFunctionSet)MarshalJSON¶
func (sGoogleAppsScriptTypeFunctionSet) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeProcess¶
type GoogleAppsScriptTypeProcess struct {// Duration: Duration the execution spent executing.Durationstring `json:"duration,omitempty"`// FunctionName: Name of the function the started the execution.FunctionNamestring `json:"functionName,omitempty"`// ProcessStatus: The executions status.//// Possible values:// "PROCESS_STATUS_UNSPECIFIED" - Unspecified status.// "RUNNING" - The process is currently running.// "PAUSED" - The process has paused.// "COMPLETED" - The process has completed.// "CANCELED" - The process was cancelled.// "FAILED" - The process failed.// "TIMED_OUT" - The process timed out.// "UNKNOWN" - Process status unknown.// "DELAYED" - The process is delayed, waiting for quota.// "EXECUTION_DISABLED" - AppsScript executions are disabled by Admin.ProcessStatusstring `json:"processStatus,omitempty"`// ProcessType: The executions type.//// Possible values:// "PROCESS_TYPE_UNSPECIFIED" - Unspecified type.// "ADD_ON" - The process was started from an add-on entry point.// "EXECUTION_API" - The process was started using the Apps Script API.// "TIME_DRIVEN" - The process was started from a time-based trigger.// "TRIGGER" - The process was started from an event-based trigger.// "WEBAPP" - The process was started from a web app entry point.// "EDITOR" - The process was started using the Apps Script IDE.// "SIMPLE_TRIGGER" - The process was started from a G Suite simple trigger.// "MENU" - The process was started from a G Suite menu item.// "BATCH_TASK" - The process was started as a task in a batch job.ProcessTypestring `json:"processType,omitempty"`// ProjectName: Name of the script being executed.ProjectNamestring `json:"projectName,omitempty"`// RuntimeVersion: Which version of maestro to use to execute the script.//// Possible values:// "RUNTIME_VERSION_UNSPECIFIED" - Runtime version unset / unknown.// "DEPRECATED_ES5" - Legacy rhino version of the Apps script runtime// "V8" - Current default V8 version of the apps script runtime.RuntimeVersionstring `json:"runtimeVersion,omitempty"`// StartTime: Time the execution started.StartTimestring `json:"startTime,omitempty"`// UserAccessLevel: The executing users access level to the script.//// Possible values:// "USER_ACCESS_LEVEL_UNSPECIFIED" - User access level unspecified// "NONE" - The user has no access.// "READ" - The user has read-only access.// "WRITE" - The user has write access.// "OWNER" - The user is an owner.UserAccessLevelstring `json:"userAccessLevel,omitempty"`// ForceSendFields is a list of field names (e.g. "Duration") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Duration") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeProcess: Representation of a single script processexecution that was started from the script editor, a trigger, anapplication, or using the Apps Script API. This is distinct from the`Operation` resource, which only represents executions started via the AppsScript API.
func (GoogleAppsScriptTypeProcess)MarshalJSON¶
func (sGoogleAppsScriptTypeProcess) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeUser¶
type GoogleAppsScriptTypeUser struct {// Domain: The user's domain.Domainstring `json:"domain,omitempty"`// Email: The user's identifying email address.Emailstring `json:"email,omitempty"`// Name: The user's display name.Namestring `json:"name,omitempty"`// PhotoUrl: The user's photo.PhotoUrlstring `json:"photoUrl,omitempty"`// ForceSendFields is a list of field names (e.g. "Domain") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Domain") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeUser: A simple user profile resource.
func (GoogleAppsScriptTypeUser)MarshalJSON¶
func (sGoogleAppsScriptTypeUser) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeWebAppConfig¶
type GoogleAppsScriptTypeWebAppConfig struct {// Access: Who has permission to run the web app.//// Possible values:// "UNKNOWN_ACCESS" - Default value, should not be used.// "MYSELF" - Only the user who deployed the web app or executable can access// it. Note that this is not necessarily the owner of the script project.// "DOMAIN" - Only users in the same domain as the user who deployed the web// app or executable can access it.// "ANYONE" - Any logged in user can access the web app or executable.// "ANYONE_ANONYMOUS" - Any user, logged in or not, can access the web app or// executable.Accessstring `json:"access,omitempty"`// ExecuteAs: Who to execute the web app as.//// Possible values:// "UNKNOWN_EXECUTE_AS" - Default value, should not be used.// "USER_ACCESSING" - The script runs as the user accessing the web app.// "USER_DEPLOYING" - The script runs as the user who deployed the web app.// Note that this is not necessarily the owner of the script project.ExecuteAsstring `json:"executeAs,omitempty"`// ForceSendFields is a list of field names (e.g. "Access") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Access") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeWebAppConfig: Web app entry point configuration.
func (GoogleAppsScriptTypeWebAppConfig)MarshalJSON¶
func (sGoogleAppsScriptTypeWebAppConfig) MarshalJSON() ([]byte,error)
typeGoogleAppsScriptTypeWebAppEntryPoint¶
type GoogleAppsScriptTypeWebAppEntryPoint struct {// EntryPointConfig: The entry point's configuration.EntryPointConfig *GoogleAppsScriptTypeWebAppConfig `json:"entryPointConfig,omitempty"`// Url: The URL for the web application.Urlstring `json:"url,omitempty"`// ForceSendFields is a list of field names (e.g. "EntryPointConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EntryPointConfig") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GoogleAppsScriptTypeWebAppEntryPoint: A web application entry point.
func (GoogleAppsScriptTypeWebAppEntryPoint)MarshalJSON¶
func (sGoogleAppsScriptTypeWebAppEntryPoint) MarshalJSON() ([]byte,error)
typeListDeploymentsResponse¶
type ListDeploymentsResponse struct {// Deployments: The list of deployments.Deployments []*Deployment `json:"deployments,omitempty"`// NextPageToken: The token that can be used in the next call to get the next// page of results.NextPageTokenstring `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. "Deployments") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Deployments") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListDeploymentsResponse: Response with the list of deployments for thespecified Apps Script project.
func (ListDeploymentsResponse)MarshalJSON¶
func (sListDeploymentsResponse) MarshalJSON() ([]byte,error)
typeListScriptProcessesResponse¶
type ListScriptProcessesResponse struct {// NextPageToken: Token for the next page of results. If empty, there are no// more pages remaining.NextPageTokenstring `json:"nextPageToken,omitempty"`// Processes: List of processes matching request parameters.Processes []*GoogleAppsScriptTypeProcess `json:"processes,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListScriptProcessesResponse: Response with the list of Process resources.
func (ListScriptProcessesResponse)MarshalJSON¶
func (sListScriptProcessesResponse) MarshalJSON() ([]byte,error)
typeListUserProcessesResponse¶
type ListUserProcessesResponse struct {// NextPageToken: Token for the next page of results. If empty, there are no// more pages remaining.NextPageTokenstring `json:"nextPageToken,omitempty"`// Processes: List of processes matching request parameters.Processes []*GoogleAppsScriptTypeProcess `json:"processes,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListUserProcessesResponse: Response with the list of Process resources.
func (ListUserProcessesResponse)MarshalJSON¶
func (sListUserProcessesResponse) MarshalJSON() ([]byte,error)
typeListVersionsResponse¶
type ListVersionsResponse struct {// NextPageToken: The token use to fetch the next page of records. if not exist// in the response, that means no more versions to list.NextPageTokenstring `json:"nextPageToken,omitempty"`// Versions: The list of versions.Versions []*Version `json:"versions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListVersionsResponse: Response with the list of the versions for thespecified script project.
func (ListVersionsResponse)MarshalJSON¶
func (sListVersionsResponse) MarshalJSON() ([]byte,error)
typeMetrics¶
type Metrics struct {// ActiveUsers: Number of active users.ActiveUsers []*MetricsValue `json:"activeUsers,omitempty"`// FailedExecutions: Number of failed executions.FailedExecutions []*MetricsValue `json:"failedExecutions,omitempty"`// TotalExecutions: Number of total executions.TotalExecutions []*MetricsValue `json:"totalExecutions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ActiveUsers") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ActiveUsers") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Metrics: Resource containing usage stats for a given script, based on thesupplied filter and mask present in the request.
func (Metrics)MarshalJSON¶
typeMetricsValue¶
type MetricsValue struct {// EndTime: Required field indicating the end time of the interval.EndTimestring `json:"endTime,omitempty"`// StartTime: Required field indicating the start time of the interval.StartTimestring `json:"startTime,omitempty"`// Value: Indicates the number of executions counted.Valueuint64 `json:"value,omitempty,string"`// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EndTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}MetricsValue: Metrics value that holds number of executions counted.
func (MetricsValue)MarshalJSON¶
func (sMetricsValue) MarshalJSON() ([]byte,error)
typeOperation¶
type Operation struct {// Done: This field indicates whether the script execution has completed. A// completed execution has a populated `response` field containing the// ExecutionResponse from function that was executed.Donebool `json:"done,omitempty"`// Error: If a `run` call succeeds but the script function (or Apps Script// itself) throws an exception, this field contains a Status object. The// `Status` object's `details` field contains an array with a single// ExecutionError object that provides information about the nature of the// error.Error *Status `json:"error,omitempty"`// Response: If the script function returns successfully, this field contains// an ExecutionResponse object with the function's return value.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Done") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Operation: A representation of an execution of an Apps Script functionstarted with run. The execution response does not arrive until the functionfinishes executing. The maximum execution runtime is listed in the AppsScript quotas guide(/apps-script/guides/services/quotas#current_limitations). After executionhas started, it can have one of four outcomes: - If the script functionreturns successfully, the response field contains an ExecutionResponseobject with the function's return value in the object's `result` field. - Ifthe script function (or Apps Script itself) throws an exception, the errorfield contains a Status object. The `Status` object's `details` fieldcontains an array with a single ExecutionError object that providesinformation about the nature of the error. - If the execution has not yetcompleted, the done field is `false` and the neither the `response` nor`error` fields are present. - If the `run` call itself fails (for example,because of a malformed request or an authorization error), the methodreturns an HTTP response code in the 4XX range with a different format forthe response body. Client libraries automatically convert a 4XX responseinto an exception class.
func (Operation)MarshalJSON¶
typeProcessesListCall¶
type ProcessesListCall struct {// contains filtered or unexported fields}func (*ProcessesListCall)Context¶
func (c *ProcessesListCall) Context(ctxcontext.Context) *ProcessesListCall
Context sets the context to be used in this call's Do method.
func (*ProcessesListCall)Do¶
func (c *ProcessesListCall) Do(opts ...googleapi.CallOption) (*ListUserProcessesResponse,error)
Do executes the "script.processes.list" call.Any non-2xx status code is an error. Response headers are in either*ListUserProcessesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProcessesListCall)Fields¶
func (c *ProcessesListCall) Fields(s ...googleapi.Field) *ProcessesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProcessesListCall)Header¶
func (c *ProcessesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProcessesListCall)IfNoneMatch¶
func (c *ProcessesListCall) IfNoneMatch(entityTagstring) *ProcessesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProcessesListCall)PageSize¶
func (c *ProcessesListCall) PageSize(pageSizeint64) *ProcessesListCall
PageSize sets the optional parameter "pageSize": The maximum number ofreturned processes per page of results. Defaults to 50.
func (*ProcessesListCall)PageToken¶
func (c *ProcessesListCall) PageToken(pageTokenstring) *ProcessesListCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from a previous response.
func (*ProcessesListCall)Pages¶
func (c *ProcessesListCall) Pages(ctxcontext.Context, f func(*ListUserProcessesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ProcessesListCall)UserProcessFilterDeploymentId¶
func (c *ProcessesListCall) UserProcessFilterDeploymentId(userProcessFilterDeploymentIdstring) *ProcessesListCall
UserProcessFilterDeploymentId sets the optional parameter"userProcessFilter.deploymentId": Optional field used to limit returnedprocesses to those originating from projects with a specific deployment ID.
func (*ProcessesListCall)UserProcessFilterEndTime¶
func (c *ProcessesListCall) UserProcessFilterEndTime(userProcessFilterEndTimestring) *ProcessesListCall
UserProcessFilterEndTime sets the optional parameter"userProcessFilter.endTime": Optional field used to limit returned processesto those that completed on or before the given timestamp.
func (*ProcessesListCall)UserProcessFilterFunctionName¶
func (c *ProcessesListCall) UserProcessFilterFunctionName(userProcessFilterFunctionNamestring) *ProcessesListCall
UserProcessFilterFunctionName sets the optional parameter"userProcessFilter.functionName": Optional field used to limit returnedprocesses to those originating from a script function with the givenfunction name.
func (*ProcessesListCall)UserProcessFilterProjectName¶
func (c *ProcessesListCall) UserProcessFilterProjectName(userProcessFilterProjectNamestring) *ProcessesListCall
UserProcessFilterProjectName sets the optional parameter"userProcessFilter.projectName": Optional field used to limit returnedprocesses to those originating from projects with project names containing aspecific string.
func (*ProcessesListCall)UserProcessFilterScriptId¶
func (c *ProcessesListCall) UserProcessFilterScriptId(userProcessFilterScriptIdstring) *ProcessesListCall
UserProcessFilterScriptId sets the optional parameter"userProcessFilter.scriptId": Optional field used to limit returnedprocesses to those originating from projects with a specific script ID.
func (*ProcessesListCall)UserProcessFilterStartTime¶
func (c *ProcessesListCall) UserProcessFilterStartTime(userProcessFilterStartTimestring) *ProcessesListCall
UserProcessFilterStartTime sets the optional parameter"userProcessFilter.startTime": Optional field used to limit returnedprocesses to those that were started on or after the given timestamp.
func (*ProcessesListCall)UserProcessFilterStatuses¶
func (c *ProcessesListCall) UserProcessFilterStatuses(userProcessFilterStatuses ...string) *ProcessesListCall
UserProcessFilterStatuses sets the optional parameter"userProcessFilter.statuses": Optional field used to limit returnedprocesses to those having one of the specified process statuses.
Possible values:
"PROCESS_STATUS_UNSPECIFIED" - Unspecified status."RUNNING" - The process is currently running."PAUSED" - The process has paused."COMPLETED" - The process has completed."CANCELED" - The process was cancelled."FAILED" - The process failed."TIMED_OUT" - The process timed out."UNKNOWN" - Process status unknown."DELAYED" - The process is delayed, waiting for quota."EXECUTION_DISABLED" - AppsScript executions are disabled by Admin.
func (*ProcessesListCall)UserProcessFilterTypes¶
func (c *ProcessesListCall) UserProcessFilterTypes(userProcessFilterTypes ...string) *ProcessesListCall
UserProcessFilterTypes sets the optional parameter"userProcessFilter.types": Optional field used to limit returned processesto those having one of the specified process types.
Possible values:
"PROCESS_TYPE_UNSPECIFIED" - Unspecified type."ADD_ON" - The process was started from an add-on entry point."EXECUTION_API" - The process was started using the Apps Script API."TIME_DRIVEN" - The process was started from a time-based trigger."TRIGGER" - The process was started from an event-based trigger."WEBAPP" - The process was started from a web app entry point."EDITOR" - The process was started using the Apps Script IDE."SIMPLE_TRIGGER" - The process was started from a G Suite simple trigger."MENU" - The process was started from a G Suite menu item."BATCH_TASK" - The process was started as a task in a batch job.
func (*ProcessesListCall)UserProcessFilterUserAccessLevels¶
func (c *ProcessesListCall) UserProcessFilterUserAccessLevels(userProcessFilterUserAccessLevels ...string) *ProcessesListCall
UserProcessFilterUserAccessLevels sets the optional parameter"userProcessFilter.userAccessLevels": Optional field used to limit returnedprocesses to those having one of the specified user access levels.
Possible values:
"USER_ACCESS_LEVEL_UNSPECIFIED" - User access level unspecified"NONE" - The user has no access."READ" - The user has read-only access."WRITE" - The user has write access."OWNER" - The user is an owner.
typeProcessesListScriptProcessesCall¶
type ProcessesListScriptProcessesCall struct {// contains filtered or unexported fields}func (*ProcessesListScriptProcessesCall)Context¶
func (c *ProcessesListScriptProcessesCall) Context(ctxcontext.Context) *ProcessesListScriptProcessesCall
Context sets the context to be used in this call's Do method.
func (*ProcessesListScriptProcessesCall)Do¶
func (c *ProcessesListScriptProcessesCall) Do(opts ...googleapi.CallOption) (*ListScriptProcessesResponse,error)
Do executes the "script.processes.listScriptProcesses" call.Any non-2xx status code is an error. Response headers are in either*ListScriptProcessesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProcessesListScriptProcessesCall)Fields¶
func (c *ProcessesListScriptProcessesCall) Fields(s ...googleapi.Field) *ProcessesListScriptProcessesCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProcessesListScriptProcessesCall)Header¶
func (c *ProcessesListScriptProcessesCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProcessesListScriptProcessesCall)IfNoneMatch¶
func (c *ProcessesListScriptProcessesCall) IfNoneMatch(entityTagstring) *ProcessesListScriptProcessesCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProcessesListScriptProcessesCall)PageSize¶
func (c *ProcessesListScriptProcessesCall) PageSize(pageSizeint64) *ProcessesListScriptProcessesCall
PageSize sets the optional parameter "pageSize": The maximum number ofreturned processes per page of results. Defaults to 50.
func (*ProcessesListScriptProcessesCall)PageToken¶
func (c *ProcessesListScriptProcessesCall) PageToken(pageTokenstring) *ProcessesListScriptProcessesCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from a previous response.
func (*ProcessesListScriptProcessesCall)Pages¶
func (c *ProcessesListScriptProcessesCall) Pages(ctxcontext.Context, f func(*ListScriptProcessesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ProcessesListScriptProcessesCall)ScriptId¶
func (c *ProcessesListScriptProcessesCall) ScriptId(scriptIdstring) *ProcessesListScriptProcessesCall
ScriptId sets the optional parameter "scriptId": The script ID of theproject whose processes are listed.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterDeploymentId¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterDeploymentId(scriptProcessFilterDeploymentIdstring) *ProcessesListScriptProcessesCall
ScriptProcessFilterDeploymentId sets the optional parameter"scriptProcessFilter.deploymentId": Optional field used to limit returnedprocesses to those originating from projects with a specific deployment ID.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterEndTime¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterEndTime(scriptProcessFilterEndTimestring) *ProcessesListScriptProcessesCall
ScriptProcessFilterEndTime sets the optional parameter"scriptProcessFilter.endTime": Optional field used to limit returnedprocesses to those that completed on or before the given timestamp.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterFunctionName¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterFunctionName(scriptProcessFilterFunctionNamestring) *ProcessesListScriptProcessesCall
ScriptProcessFilterFunctionName sets the optional parameter"scriptProcessFilter.functionName": Optional field used to limit returnedprocesses to those originating from a script function with the givenfunction name.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterStartTime¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterStartTime(scriptProcessFilterStartTimestring) *ProcessesListScriptProcessesCall
ScriptProcessFilterStartTime sets the optional parameter"scriptProcessFilter.startTime": Optional field used to limit returnedprocesses to those that were started on or after the given timestamp.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterStatuses¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterStatuses(scriptProcessFilterStatuses ...string) *ProcessesListScriptProcessesCall
ScriptProcessFilterStatuses sets the optional parameter"scriptProcessFilter.statuses": Optional field used to limit returnedprocesses to those having one of the specified process statuses.
Possible values:
"PROCESS_STATUS_UNSPECIFIED" - Unspecified status."RUNNING" - The process is currently running."PAUSED" - The process has paused."COMPLETED" - The process has completed."CANCELED" - The process was cancelled."FAILED" - The process failed."TIMED_OUT" - The process timed out."UNKNOWN" - Process status unknown."DELAYED" - The process is delayed, waiting for quota."EXECUTION_DISABLED" - AppsScript executions are disabled by Admin.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterTypes¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterTypes(scriptProcessFilterTypes ...string) *ProcessesListScriptProcessesCall
ScriptProcessFilterTypes sets the optional parameter"scriptProcessFilter.types": Optional field used to limit returned processesto those having one of the specified process types.
Possible values:
"PROCESS_TYPE_UNSPECIFIED" - Unspecified type."ADD_ON" - The process was started from an add-on entry point."EXECUTION_API" - The process was started using the Apps Script API."TIME_DRIVEN" - The process was started from a time-based trigger."TRIGGER" - The process was started from an event-based trigger."WEBAPP" - The process was started from a web app entry point."EDITOR" - The process was started using the Apps Script IDE."SIMPLE_TRIGGER" - The process was started from a G Suite simple trigger."MENU" - The process was started from a G Suite menu item."BATCH_TASK" - The process was started as a task in a batch job.
func (*ProcessesListScriptProcessesCall)ScriptProcessFilterUserAccessLevels¶
func (c *ProcessesListScriptProcessesCall) ScriptProcessFilterUserAccessLevels(scriptProcessFilterUserAccessLevels ...string) *ProcessesListScriptProcessesCall
ScriptProcessFilterUserAccessLevels sets the optional parameter"scriptProcessFilter.userAccessLevels": Optional field used to limitreturned processes to those having one of the specified user access levels.
Possible values:
"USER_ACCESS_LEVEL_UNSPECIFIED" - User access level unspecified"NONE" - The user has no access."READ" - The user has read-only access."WRITE" - The user has write access."OWNER" - The user is an owner.
typeProcessesService¶
type ProcessesService struct {// contains filtered or unexported fields}funcNewProcessesService¶
func NewProcessesService(s *Service) *ProcessesService
func (*ProcessesService)List¶
func (r *ProcessesService) List() *ProcessesListCall
List: List information about processes made by or on behalf of a user, suchas process type and current status.
func (*ProcessesService)ListScriptProcesses¶
func (r *ProcessesService) ListScriptProcesses() *ProcessesListScriptProcessesCall
ListScriptProcesses: List information about a script's executed processes,such as process type and current status.
typeProject¶
type Project struct {// CreateTime: When the script was created.CreateTimestring `json:"createTime,omitempty"`// Creator: User who originally created the script.Creator *GoogleAppsScriptTypeUser `json:"creator,omitempty"`// LastModifyUser: User who last modified the script.LastModifyUser *GoogleAppsScriptTypeUser `json:"lastModifyUser,omitempty"`// ParentId: The parent's Drive ID that the script will be attached to. This is// usually the ID of a Google Document or Google Sheet. This field is optional,// and if not set, a stand-alone script will be created.ParentIdstring `json:"parentId,omitempty"`// ScriptId: The script project's Drive ID.ScriptIdstring `json:"scriptId,omitempty"`// Title: The title for the project.Titlestring `json:"title,omitempty"`// UpdateTime: When the script was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Project: The script project resource.
func (Project)MarshalJSON¶
typeProjectsCreateCall¶
type ProjectsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsCreateCall)Context¶
func (c *ProjectsCreateCall) Context(ctxcontext.Context) *ProjectsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsCreateCall)Do¶
func (c *ProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Project,error)
Do executes the "script.projects.create" call.Any non-2xx status code is an error. Response headers are in either*Project.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsCreateCall)Fields¶
func (c *ProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsCreateCall)Header¶
func (c *ProjectsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsDeploymentsCreateCall¶
type ProjectsDeploymentsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsDeploymentsCreateCall)Context¶
func (c *ProjectsDeploymentsCreateCall) Context(ctxcontext.Context) *ProjectsDeploymentsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDeploymentsCreateCall)Do¶
func (c *ProjectsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Deployment,error)
Do executes the "script.projects.deployments.create" call.Any non-2xx status code is an error. Response headers are in either*Deployment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsDeploymentsCreateCall)Fields¶
func (c *ProjectsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDeploymentsCreateCall)Header¶
func (c *ProjectsDeploymentsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsDeploymentsDeleteCall¶
type ProjectsDeploymentsDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsDeploymentsDeleteCall)Context¶
func (c *ProjectsDeploymentsDeleteCall) Context(ctxcontext.Context) *ProjectsDeploymentsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDeploymentsDeleteCall)Do¶
func (c *ProjectsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "script.projects.deployments.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsDeploymentsDeleteCall)Fields¶
func (c *ProjectsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDeploymentsDeleteCall)Header¶
func (c *ProjectsDeploymentsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsDeploymentsGetCall¶
type ProjectsDeploymentsGetCall struct {// contains filtered or unexported fields}func (*ProjectsDeploymentsGetCall)Context¶
func (c *ProjectsDeploymentsGetCall) Context(ctxcontext.Context) *ProjectsDeploymentsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDeploymentsGetCall)Do¶
func (c *ProjectsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment,error)
Do executes the "script.projects.deployments.get" call.Any non-2xx status code is an error. Response headers are in either*Deployment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsDeploymentsGetCall)Fields¶
func (c *ProjectsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDeploymentsGetCall)Header¶
func (c *ProjectsDeploymentsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsDeploymentsGetCall)IfNoneMatch¶
func (c *ProjectsDeploymentsGetCall) IfNoneMatch(entityTagstring) *ProjectsDeploymentsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsDeploymentsListCall¶
type ProjectsDeploymentsListCall struct {// contains filtered or unexported fields}func (*ProjectsDeploymentsListCall)Context¶
func (c *ProjectsDeploymentsListCall) Context(ctxcontext.Context) *ProjectsDeploymentsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDeploymentsListCall)Do¶
func (c *ProjectsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentsResponse,error)
Do executes the "script.projects.deployments.list" call.Any non-2xx status code is an error. Response headers are in either*ListDeploymentsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsDeploymentsListCall)Fields¶
func (c *ProjectsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDeploymentsListCall)Header¶
func (c *ProjectsDeploymentsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsDeploymentsListCall)IfNoneMatch¶
func (c *ProjectsDeploymentsListCall) IfNoneMatch(entityTagstring) *ProjectsDeploymentsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsDeploymentsListCall)PageSize¶
func (c *ProjectsDeploymentsListCall) PageSize(pageSizeint64) *ProjectsDeploymentsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofdeployments on each returned page. Defaults to 50.
func (*ProjectsDeploymentsListCall)PageToken¶
func (c *ProjectsDeploymentsListCall) PageToken(pageTokenstring) *ProjectsDeploymentsListCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from a previous response.
func (*ProjectsDeploymentsListCall)Pages¶
func (c *ProjectsDeploymentsListCall) Pages(ctxcontext.Context, f func(*ListDeploymentsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsDeploymentsService¶
type ProjectsDeploymentsService struct {// contains filtered or unexported fields}funcNewProjectsDeploymentsService¶
func NewProjectsDeploymentsService(s *Service) *ProjectsDeploymentsService
func (*ProjectsDeploymentsService)Create¶
func (r *ProjectsDeploymentsService) Create(scriptIdstring, deploymentconfig *DeploymentConfig) *ProjectsDeploymentsCreateCall
Create: Creates a deployment of an Apps Script project.
- scriptId: The script project's Drive ID.
func (*ProjectsDeploymentsService)Delete¶
func (r *ProjectsDeploymentsService) Delete(scriptIdstring, deploymentIdstring) *ProjectsDeploymentsDeleteCall
Delete: Deletes a deployment of an Apps Script project.
- deploymentId: The deployment ID to be undeployed.- scriptId: The script project's Drive ID.
func (*ProjectsDeploymentsService)Get¶
func (r *ProjectsDeploymentsService) Get(scriptIdstring, deploymentIdstring) *ProjectsDeploymentsGetCall
Get: Gets a deployment of an Apps Script project.
- deploymentId: The deployment ID.- scriptId: The script project's Drive ID.
func (*ProjectsDeploymentsService)List¶
func (r *ProjectsDeploymentsService) List(scriptIdstring) *ProjectsDeploymentsListCall
List: Lists the deployments of an Apps Script project.
- scriptId: The script project's Drive ID.
func (*ProjectsDeploymentsService)Update¶
func (r *ProjectsDeploymentsService) Update(scriptIdstring, deploymentIdstring, updatedeploymentrequest *UpdateDeploymentRequest) *ProjectsDeploymentsUpdateCall
Update: Updates a deployment of an Apps Script project.
- deploymentId: The deployment ID for this deployment.- scriptId: The script project's Drive ID.
typeProjectsDeploymentsUpdateCall¶
type ProjectsDeploymentsUpdateCall struct {// contains filtered or unexported fields}func (*ProjectsDeploymentsUpdateCall)Context¶
func (c *ProjectsDeploymentsUpdateCall) Context(ctxcontext.Context) *ProjectsDeploymentsUpdateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDeploymentsUpdateCall)Do¶
func (c *ProjectsDeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Deployment,error)
Do executes the "script.projects.deployments.update" call.Any non-2xx status code is an error. Response headers are in either*Deployment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsDeploymentsUpdateCall)Fields¶
func (c *ProjectsDeploymentsUpdateCall) Fields(s ...googleapi.Field) *ProjectsDeploymentsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDeploymentsUpdateCall)Header¶
func (c *ProjectsDeploymentsUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsGetCall¶
type ProjectsGetCall struct {// contains filtered or unexported fields}func (*ProjectsGetCall)Context¶
func (c *ProjectsGetCall) Context(ctxcontext.Context) *ProjectsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsGetCall)Do¶
func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project,error)
Do executes the "script.projects.get" call.Any non-2xx status code is an error. Response headers are in either*Project.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsGetCall)Fields¶
func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsGetCall)Header¶
func (c *ProjectsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsGetCall)IfNoneMatch¶
func (c *ProjectsGetCall) IfNoneMatch(entityTagstring) *ProjectsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsGetContentCall¶
type ProjectsGetContentCall struct {// contains filtered or unexported fields}func (*ProjectsGetContentCall)Context¶
func (c *ProjectsGetContentCall) Context(ctxcontext.Context) *ProjectsGetContentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsGetContentCall)Do¶
func (c *ProjectsGetContentCall) Do(opts ...googleapi.CallOption) (*Content,error)
Do executes the "script.projects.getContent" call.Any non-2xx status code is an error. Response headers are in either*Content.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsGetContentCall)Fields¶
func (c *ProjectsGetContentCall) Fields(s ...googleapi.Field) *ProjectsGetContentCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsGetContentCall)Header¶
func (c *ProjectsGetContentCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsGetContentCall)IfNoneMatch¶
func (c *ProjectsGetContentCall) IfNoneMatch(entityTagstring) *ProjectsGetContentCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsGetContentCall)VersionNumber¶
func (c *ProjectsGetContentCall) VersionNumber(versionNumberint64) *ProjectsGetContentCall
VersionNumber sets the optional parameter "versionNumber": The versionnumber of the project to retrieve. If not provided, the project's HEADversion is returned.
typeProjectsGetMetricsCall¶
type ProjectsGetMetricsCall struct {// contains filtered or unexported fields}func (*ProjectsGetMetricsCall)Context¶
func (c *ProjectsGetMetricsCall) Context(ctxcontext.Context) *ProjectsGetMetricsCall
Context sets the context to be used in this call's Do method.
func (*ProjectsGetMetricsCall)Do¶
func (c *ProjectsGetMetricsCall) Do(opts ...googleapi.CallOption) (*Metrics,error)
Do executes the "script.projects.getMetrics" call.Any non-2xx status code is an error. Response headers are in either*Metrics.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsGetMetricsCall)Fields¶
func (c *ProjectsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsGetMetricsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsGetMetricsCall)Header¶
func (c *ProjectsGetMetricsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsGetMetricsCall)IfNoneMatch¶
func (c *ProjectsGetMetricsCall) IfNoneMatch(entityTagstring) *ProjectsGetMetricsCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsGetMetricsCall)MetricsFilterDeploymentId¶
func (c *ProjectsGetMetricsCall) MetricsFilterDeploymentId(metricsFilterDeploymentIdstring) *ProjectsGetMetricsCall
MetricsFilterDeploymentId sets the optional parameter"metricsFilter.deploymentId": Optional field indicating a specificdeployment to retrieve metrics from.
func (*ProjectsGetMetricsCall)MetricsGranularity¶
func (c *ProjectsGetMetricsCall) MetricsGranularity(metricsGranularitystring) *ProjectsGetMetricsCall
MetricsGranularity sets the optional parameter "metricsGranularity":Required field indicating what granularity of metrics are returned.
Possible values:
"UNSPECIFIED_GRANULARITY" - Default metric granularity used to query no
metrics.
"WEEKLY" - Represents weekly metrics."DAILY" - Represents daily metrics over a period of 7 days.
typeProjectsService¶
type ProjectsService struct {Deployments *ProjectsDeploymentsServiceVersions *ProjectsVersionsService// contains filtered or unexported fields}funcNewProjectsService¶
func NewProjectsService(s *Service) *ProjectsService
func (*ProjectsService)Create¶
func (r *ProjectsService) Create(createprojectrequest *CreateProjectRequest) *ProjectsCreateCall
Create: Creates a new, empty script project with no script files and a basemanifest file.
func (*ProjectsService)Get¶
func (r *ProjectsService) Get(scriptIdstring) *ProjectsGetCall
Get: Gets a script project's metadata.
- scriptId: The script project's Drive ID.
func (*ProjectsService)GetContent¶
func (r *ProjectsService) GetContent(scriptIdstring) *ProjectsGetContentCall
GetContent: Gets the content of the script project, including the codesource and metadata for each script file.
- scriptId: The script project's Drive ID.
func (*ProjectsService)GetMetrics¶
func (r *ProjectsService) GetMetrics(scriptIdstring) *ProjectsGetMetricsCall
GetMetrics: Get metrics data for scripts, such as number of executions andactive users.
- scriptId: Required field indicating the script to get metrics for.
func (*ProjectsService)UpdateContent¶
func (r *ProjectsService) UpdateContent(scriptIdstring, content *Content) *ProjectsUpdateContentCall
UpdateContent: Updates the content of the specified script project. Thiscontent is stored as the HEAD version, and is used when the script isexecuted as a trigger, in the script editor, in add-on preview mode, or as aweb app or Apps Script API in development mode. This clears all the existingfiles in the project.
- scriptId: The script project's Drive ID.
typeProjectsUpdateContentCall¶
type ProjectsUpdateContentCall struct {// contains filtered or unexported fields}func (*ProjectsUpdateContentCall)Context¶
func (c *ProjectsUpdateContentCall) Context(ctxcontext.Context) *ProjectsUpdateContentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsUpdateContentCall)Do¶
func (c *ProjectsUpdateContentCall) Do(opts ...googleapi.CallOption) (*Content,error)
Do executes the "script.projects.updateContent" call.Any non-2xx status code is an error. Response headers are in either*Content.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsUpdateContentCall)Fields¶
func (c *ProjectsUpdateContentCall) Fields(s ...googleapi.Field) *ProjectsUpdateContentCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsUpdateContentCall)Header¶
func (c *ProjectsUpdateContentCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsVersionsCreateCall¶
type ProjectsVersionsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsVersionsCreateCall)Context¶
func (c *ProjectsVersionsCreateCall) Context(ctxcontext.Context) *ProjectsVersionsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsVersionsCreateCall)Do¶
func (c *ProjectsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Version,error)
Do executes the "script.projects.versions.create" call.Any non-2xx status code is an error. Response headers are in either*Version.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsVersionsCreateCall)Fields¶
func (c *ProjectsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsVersionsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsVersionsCreateCall)Header¶
func (c *ProjectsVersionsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsVersionsGetCall¶
type ProjectsVersionsGetCall struct {// contains filtered or unexported fields}func (*ProjectsVersionsGetCall)Context¶
func (c *ProjectsVersionsGetCall) Context(ctxcontext.Context) *ProjectsVersionsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsVersionsGetCall)Do¶
func (c *ProjectsVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version,error)
Do executes the "script.projects.versions.get" call.Any non-2xx status code is an error. Response headers are in either*Version.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsVersionsGetCall)Fields¶
func (c *ProjectsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsVersionsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsVersionsGetCall)Header¶
func (c *ProjectsVersionsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsVersionsGetCall)IfNoneMatch¶
func (c *ProjectsVersionsGetCall) IfNoneMatch(entityTagstring) *ProjectsVersionsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsVersionsListCall¶
type ProjectsVersionsListCall struct {// contains filtered or unexported fields}func (*ProjectsVersionsListCall)Context¶
func (c *ProjectsVersionsListCall) Context(ctxcontext.Context) *ProjectsVersionsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsVersionsListCall)Do¶
func (c *ProjectsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse,error)
Do executes the "script.projects.versions.list" call.Any non-2xx status code is an error. Response headers are in either*ListVersionsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsVersionsListCall)Fields¶
func (c *ProjectsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsVersionsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsVersionsListCall)Header¶
func (c *ProjectsVersionsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsVersionsListCall)IfNoneMatch¶
func (c *ProjectsVersionsListCall) IfNoneMatch(entityTagstring) *ProjectsVersionsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsVersionsListCall)PageSize¶
func (c *ProjectsVersionsListCall) PageSize(pageSizeint64) *ProjectsVersionsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofversions on each returned page. Defaults to 50.
func (*ProjectsVersionsListCall)PageToken¶
func (c *ProjectsVersionsListCall) PageToken(pageTokenstring) *ProjectsVersionsListCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from a previous response.
func (*ProjectsVersionsListCall)Pages¶
func (c *ProjectsVersionsListCall) Pages(ctxcontext.Context, f func(*ListVersionsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsVersionsService¶
type ProjectsVersionsService struct {// contains filtered or unexported fields}funcNewProjectsVersionsService¶
func NewProjectsVersionsService(s *Service) *ProjectsVersionsService
func (*ProjectsVersionsService)Create¶
func (r *ProjectsVersionsService) Create(scriptIdstring, version *Version) *ProjectsVersionsCreateCall
Create: Creates a new immutable version using the current code, with aunique version number.
- scriptId: The script project's Drive ID.
func (*ProjectsVersionsService)Get¶
func (r *ProjectsVersionsService) Get(scriptIdstring, versionNumberint64) *ProjectsVersionsGetCall
Get: Gets a version of a script project.
- scriptId: The script project's Drive ID.- versionNumber: The version number.
func (*ProjectsVersionsService)List¶
func (r *ProjectsVersionsService) List(scriptIdstring) *ProjectsVersionsListCall
List: List the versions of a script project.
- scriptId: The script project's Drive ID.
typeScriptStackTraceElement¶
type ScriptStackTraceElement struct {// Function: The name of the function that failed.Functionstring `json:"function,omitempty"`// LineNumber: The line number where the script failed.LineNumberint64 `json:"lineNumber,omitempty"`// ForceSendFields is a list of field names (e.g. "Function") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Function") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ScriptStackTraceElement: A stack trace through the script that shows wherethe execution failed.
func (ScriptStackTraceElement)MarshalJSON¶
func (sScriptStackTraceElement) MarshalJSON() ([]byte,error)
typeScriptsRunCall¶
type ScriptsRunCall struct {// contains filtered or unexported fields}func (*ScriptsRunCall)Context¶
func (c *ScriptsRunCall) Context(ctxcontext.Context) *ScriptsRunCall
Context sets the context to be used in this call's Do method.
func (*ScriptsRunCall)Do¶
func (c *ScriptsRunCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "script.scripts.run" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ScriptsRunCall)Fields¶
func (c *ScriptsRunCall) Fields(s ...googleapi.Field) *ScriptsRunCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ScriptsRunCall)Header¶
func (c *ScriptsRunCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeScriptsService¶
type ScriptsService struct {// contains filtered or unexported fields}funcNewScriptsService¶
func NewScriptsService(s *Service) *ScriptsService
func (*ScriptsService)Run¶
func (r *ScriptsService) Run(scriptIdstring, executionrequest *ExecutionRequest) *ScriptsRunCall
Run:
- scriptId: The script ID of the script to be executed. Find the script IDon the **Project settings** page under "IDs." As multiple executable APIscan be deployed in new IDE for same script, this field should be populatedwith DeploymentID generated while deploying in new IDE instead of scriptID.
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProcesses *ProcessesServiceProjects *ProjectsServiceScripts *ScriptsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.3.0
NewService creates a new Service.
typeStatus¶
type Status struct {// Code: The status code. For this API, this value either: - 10, indicating a// `SCRIPT_TIMEOUT` error, - 3, indicating an `INVALID_ARGUMENT` error, or - 1,// indicating a `CANCELLED` execution.Codeint64 `json:"code,omitempty"`// Details: An array that contains a single ExecutionError object that provides// information about the nature of the error.Details []googleapi.RawMessage `json:"details,omitempty"`// Message: A developer-facing error message, which is in English. Any// user-facing error message is localized and sent in the details field, or// localized by the client.Messagestring `json:"message,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Status: If a `run` call succeeds but the script function (or Apps Scriptitself) throws an exception, the response body's error field contains this`Status` object.
func (Status)MarshalJSON¶
typeUpdateDeploymentRequest¶
type UpdateDeploymentRequest struct {// DeploymentConfig: The deployment configuration.DeploymentConfig *DeploymentConfig `json:"deploymentConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "DeploymentConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeploymentConfig") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}UpdateDeploymentRequest: Request with deployment information to update anexisting deployment.
func (UpdateDeploymentRequest)MarshalJSON¶
func (sUpdateDeploymentRequest) MarshalJSON() ([]byte,error)
typeVersion¶
type Version struct {// CreateTime: When the version was created.CreateTimestring `json:"createTime,omitempty"`// Description: The description for this version.Descriptionstring `json:"description,omitempty"`// ScriptId: The script project's Drive ID.ScriptIdstring `json:"scriptId,omitempty"`// VersionNumber: The incremental ID that is created by Apps Script when a// version is created. This is system assigned number and is immutable once// created.VersionNumberint64 `json:"versionNumber,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Version: A resource representing a script project version. A version is a"snapshot" of a script project and is similar to a read-only branchedrelease. When creating deployments, the version to use must be specified.