Documentation
¶
Overview ¶
Use the Genie Migrate API to create and manage migration projects and the source files to convert.
Index ¶
- type AddProjectFilesRequest
- type AddProjectFilesResponse
- type CancelOperationRequest
- type ConversionRun
- type ConversionRunErrorCode
- type ConversionRunFile
- type ConversionRunState
- type ConvertProjectFilesOperationInterface
- type ConvertProjectFilesRequest
- type ConvertProjectFilesResponse
- type CreateProjectRequest
- type DatabricksServiceExceptionWithDetailsProto
- type DeleteProjectRequest
- type DestinationKind
- type DestinationResource
- type ErrorCode
- type FileStatus
- type GenieMigrateAPI
- func (a *GenieMigrateAPI) AddFiles(ctx context.Context, request AddProjectFilesRequest) (*AddProjectFilesResponse, error)
- func (a *GenieMigrateAPI) CancelOperation(ctx context.Context, request CancelOperationRequest) error
- func (a *GenieMigrateAPI) ConvertProjectFiles(ctx context.Context, request ConvertProjectFilesRequest) (ConvertProjectFilesOperationInterface, error)
- func (a *GenieMigrateAPI) Create(ctx context.Context, request CreateProjectRequest) (*Project, error)
- func (a *GenieMigrateAPI) Delete(ctx context.Context, request DeleteProjectRequest) error
- func (a *GenieMigrateAPI) Get(ctx context.Context, request GetProjectRequest) (*Project, error)
- func (a *GenieMigrateAPI) GetFile(ctx context.Context, request GetProjectFileRequest) (*ProjectFile, error)
- func (a *GenieMigrateAPI) GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)
- func (a *GenieMigrateAPI) List(ctx context.Context, request ListProjectsRequest) listing.Iterator[Project]
- func (a *GenieMigrateAPI) ListAll(ctx context.Context, request ListProjectsRequest) ([]Project, error)
- func (a *GenieMigrateAPI) ListFiles(ctx context.Context, request ListProjectFilesRequest) listing.Iterator[ProjectFile]
- func (a *GenieMigrateAPI) ListFilesAll(ctx context.Context, request ListProjectFilesRequest) ([]ProjectFile, error)
- func (a *GenieMigrateAPI) RemoveFiles(ctx context.Context, request RemoveProjectFilesRequest) (*RemoveProjectFilesResponse, error)
- func (a *GenieMigrateAPI) ReviewProjectFiles(ctx context.Context, request ReviewProjectFilesRequest) (*ReviewProjectFilesResponse, error)
- func (a *GenieMigrateAPI) UnreviewProjectFiles(ctx context.Context, request UnreviewProjectFilesRequest) (*UnreviewProjectFilesResponse, error)
- func (a *GenieMigrateAPI) Update(ctx context.Context, request UpdateProjectRequest) (*Project, error)
- type GenieMigrateInterface
- type GenieMigrateServicedeprecated
- type GetOperationRequest
- type GetProjectFileRequest
- type GetProjectRequest
- type ListProjectFilesRequest
- type ListProjectFilesResponse
- type ListProjectsRequest
- type ListProjectsResponse
- type Location
- type Operation
- type Project
- type ProjectConfig
- type ProjectFile
- type RemoveProjectFilesRequest
- type RemoveProjectFilesResponse
- type ReviewProjectFilesRequest
- type ReviewProjectFilesResponse
- type SourceDialect
- type SourceFileRef
- type TargetFramework
- type UnreviewProjectFilesRequest
- type UnreviewProjectFilesResponse
- type UpdateProjectRequest
- type WorkspaceLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddProjectFilesRequest ¶
type AddProjectFilesRequest struct {
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`.
Name string `json:"-" url:"-"`
// The files to add, each identified by `workspace.path` or
// `workspace.object_id`. Send at most 500 files per request. Duplicate
// files, and requests that exceed a file-count limit, return
// `INVALID_PARAMETER_VALUE`. Files already in the project aren't
// overwritten. An empty list changes nothing.
Sources []SourceFileRef `json:"sources"`
}
The request to add workspace files to a migration project.
func (*AddProjectFilesRequest) UnmarshalJSON ¶
func (s *AddProjectFilesRequest) UnmarshalJSON(b []byte) error
type AddProjectFilesResponse ¶
type AddProjectFilesResponse struct {
// The requested files, in request order, without conversion results. Call
// `ListProjectFiles` or `GetProjectFile` to read their state.
Files []ProjectFile `json:"files,omitempty"`
}
Lists the files from an `AddProjectFiles` request, including files that were already in the project.
func (*AddProjectFilesResponse) UnmarshalJSON ¶
func (s *AddProjectFilesResponse) UnmarshalJSON(b []byte) error
type CancelOperationRequest ¶
type CancelOperationRequest struct {
// The name of the operation resource to be cancelled.
Name string `json:"-" url:"-"`
}
The request message for `CancelOperation` method.
func (*CancelOperationRequest) UnmarshalJSON ¶
func (s *CancelOperationRequest) UnmarshalJSON(b []byte) error
type ConversionRun ¶
type ConversionRun struct {
// The time the run was accepted, before its background job started.
CreateTime *time.Time `json:"create_time,omitempty"`
// The time the run ended. Absent while the run is active.
EndTime *time.Time `json:"end_time,omitempty"`
// Why the run failed. Set only when `state` is
// `CONVERSION_RUN_STATE_FAILED`.
ErrorCode ConversionRunErrorCode `json:"error_code,omitempty"`
// The files in this run, at most 500, each with its status in this run.
// Later conversions and reviews can change `ProjectFile.status` but don't
// change this list.
Files []ConversionRunFile `json:"files,omitempty"`
// The resource name of the project being converted, in the format
// `projects/{project_id}`.
Project string `json:"project,omitempty"`
// The skill folders that the run was started with. Empty if the run
// discovers skills automatically.
SkillPaths []string `json:"skill_paths,omitempty"`
// The state of the run.
State ConversionRunState `json:"state,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A conversion of a migration project's files, with its state and the status of each file.
func (ConversionRun) MarshalJSON ¶
func (s ConversionRun) MarshalJSON() ([]byte, error)
func (*ConversionRun) UnmarshalJSON ¶
func (s *ConversionRun) UnmarshalJSON(b []byte) error
type ConversionRunErrorCode ¶
type ConversionRunErrorCode string
Why a conversion run failed.
const ConversionRunErrorCodeConversionRunErrorCodeExpired ConversionRunErrorCode = `CONVERSION_RUN_ERROR_CODE_EXPIRED`
const ConversionRunErrorCodeConversionRunErrorCodeJobFailed ConversionRunErrorCode = `CONVERSION_RUN_ERROR_CODE_JOB_FAILED`
const ConversionRunErrorCodeConversionRunErrorCodeSubmitRejected ConversionRunErrorCode = `CONVERSION_RUN_ERROR_CODE_SUBMIT_REJECTED`
func (*ConversionRunErrorCode) Set ¶
func (f *ConversionRunErrorCode) Set(v string) error
Set raw string value and validate it against allowed values
func (*ConversionRunErrorCode) String ¶
func (f *ConversionRunErrorCode) String() string
String representation for fmt.Print
func (*ConversionRunErrorCode) Type ¶
func (f *ConversionRunErrorCode) Type() string
Type always returns ConversionRunErrorCode to satisfy [pflag.Value] interface
func (*ConversionRunErrorCode) Values ¶
func (f *ConversionRunErrorCode) Values() []ConversionRunErrorCode
Values returns all possible values for ConversionRunErrorCode.
There is no guarantee on the order of the values in the slice.
type ConversionRunFile ¶
type ConversionRunFile struct {
// The resource name of the file, in the format
// `projects/{project_id}/files/{file_id}`.
Name string `json:"name,omitempty"`
// The status of the file in this run. `ProjectFile.status` has the file's
// latest status across all runs.
Status FileStatus `json:"status,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A file in a conversion run.
func (ConversionRunFile) MarshalJSON ¶
func (s ConversionRunFile) MarshalJSON() ([]byte, error)
func (*ConversionRunFile) UnmarshalJSON ¶
func (s *ConversionRunFile) UnmarshalJSON(b []byte) error
type ConversionRunState ¶
type ConversionRunState string
State of a conversion run.
const ConversionRunStateConversionRunStateActive ConversionRunState = `CONVERSION_RUN_STATE_ACTIVE`
const ConversionRunStateConversionRunStateCancelled ConversionRunState = `CONVERSION_RUN_STATE_CANCELLED`
const ConversionRunStateConversionRunStateCompleted ConversionRunState = `CONVERSION_RUN_STATE_COMPLETED`
const ConversionRunStateConversionRunStateFailed ConversionRunState = `CONVERSION_RUN_STATE_FAILED`
func (*ConversionRunState) Set ¶
func (f *ConversionRunState) Set(v string) error
Set raw string value and validate it against allowed values
func (*ConversionRunState) String ¶
func (f *ConversionRunState) String() string
String representation for fmt.Print
func (*ConversionRunState) Type ¶
func (f *ConversionRunState) Type() string
Type always returns ConversionRunState to satisfy [pflag.Value] interface
func (*ConversionRunState) Values ¶
func (f *ConversionRunState) Values() []ConversionRunState
Values returns all possible values for ConversionRunState.
There is no guarantee on the order of the values in the slice.
type ConvertProjectFilesOperationInterface ¶
type ConvertProjectFilesOperationInterface interface {
// Wait blocks until the long-running operation is completed. If no timeout is
// specified, this will poll indefinitely. If a timeout is provided and the operation
// didn't finish within the timeout, this function will return an error, otherwise
// returns successful response and any errors encountered.
Wait(ctx context.Context, opts ...api.Option) (*ConvertProjectFilesResponse, error)
// Starts asynchronous cancellation on a long-running operation. The server
// makes a best effort to cancel the operation, but success is not guaranteed.
Cancel(ctx context.Context) error
// Name returns the name of the long-running operation. The name is assigned
// by the server and is unique within the service from which the operation is created.
Name() string
// Metadata returns metadata associated with the long-running operation.
// If the metadata is not available, the returned metadata and error are both nil.
Metadata() (*ConversionRun, error)
// Done reports whether the long-running operation has completed.
Done() (bool, error)
}
type ConvertProjectFilesRequest ¶
type ConvertProjectFilesRequest struct {
// The files to convert, in the format
// `projects/{project_id}/files/{file_id}`. For example,
// `projects/123/files/789`. All files must belong to `parent`. At most 500
// files; a workspace can set a lower limit, and requests over it return
// `INVALID_PARAMETER_VALUE`.
Names []string `json:"names,omitempty"`
// The resource name of the project whose files to convert, in the format
// `projects/{project_id}`. For example, `projects/123`.
Parent string `json:"-" url:"-"`
// Custom skills that the conversion can use, as workspace paths of skill
// folders. Each folder must contain a `SKILL.md` file and be directly
// inside a skills folder: `<home>/.assistant/skills`,
// `/Workspace/.assistant/skills`, or another configured skills folder. At
// most 10 paths, which together must fit in 1000 bytes when encoded as a
// JSON array. Larger values return `INVALID_PARAMETER_VALUE`. If empty, the
// conversion discovers skills automatically.
SkillPaths []string `json:"skill_paths,omitempty"`
// Whether to convert each selected file from scratch instead of continuing
// from its previous results (changes, to-do items, blockers, and notes).
// Supported only for projects whose target framework is
// `TARGET_FRAMEWORK_SQL`; other projects return `INVALID_PARAMETER_VALUE`.
// Defaults to `false`.
StartOver bool `json:"start_over,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The request to convert files of a migration project.
func (ConvertProjectFilesRequest) MarshalJSON ¶
func (s ConvertProjectFilesRequest) MarshalJSON() ([]byte, error)
func (*ConvertProjectFilesRequest) UnmarshalJSON ¶
func (s *ConvertProjectFilesRequest) UnmarshalJSON(b []byte) error
type ConvertProjectFilesResponse ¶
type ConvertProjectFilesResponse struct {
// The completed conversion run. Each file's outcome is in `run.files`; a
// completed run can include files that failed to convert.
Run *ConversionRun `json:"run,omitempty"`
}
The result of a completed conversion.
func (*ConvertProjectFilesResponse) UnmarshalJSON ¶
func (s *ConvertProjectFilesResponse) UnmarshalJSON(b []byte) error
type CreateProjectRequest ¶
type CreateProjectRequest struct {
// The project to create. The server sets `name` in the response.
Project Project `json:"project"`
}
func (*CreateProjectRequest) UnmarshalJSON ¶
func (s *CreateProjectRequest) UnmarshalJSON(b []byte) error
type DatabricksServiceExceptionWithDetailsProto ¶
type DatabricksServiceExceptionWithDetailsProto struct {
Details []json.RawMessage `json:"details,omitempty"`
ErrorCode ErrorCode `json:"error_code,omitempty"`
Message string `json:"message,omitempty"`
StackTrace string `json:"stack_trace,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Databricks Error that is returned by all Databricks APIs.
func (DatabricksServiceExceptionWithDetailsProto) MarshalJSON ¶
func (s DatabricksServiceExceptionWithDetailsProto) MarshalJSON() ([]byte, error)
func (*DatabricksServiceExceptionWithDetailsProto) UnmarshalJSON ¶
func (s *DatabricksServiceExceptionWithDetailsProto) UnmarshalJSON(b []byte) error
type DeleteProjectRequest ¶
type DeleteProjectRequest struct {
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`.
Name string `json:"-" url:"-"`
}
func (*DeleteProjectRequest) UnmarshalJSON ¶
func (s *DeleteProjectRequest) UnmarshalJSON(b []byte) error
type DestinationKind ¶
type DestinationKind string
Destination asset kind for a converted file.
const DestinationKindDestinationKindDesignerFile DestinationKind = `DESTINATION_KIND_DESIGNER_FILE`
const DestinationKindDestinationKindFile DestinationKind = `DESTINATION_KIND_FILE`
const DestinationKindDestinationKindNotebook DestinationKind = `DESTINATION_KIND_NOTEBOOK`
const DestinationKindDestinationKindQuery DestinationKind = `DESTINATION_KIND_QUERY`
func (*DestinationKind) Set ¶
func (f *DestinationKind) Set(v string) error
Set raw string value and validate it against allowed values
func (*DestinationKind) String ¶
func (f *DestinationKind) String() string
String representation for fmt.Print
func (*DestinationKind) Type ¶
func (f *DestinationKind) Type() string
Type always returns DestinationKind to satisfy [pflag.Value] interface
func (*DestinationKind) Values ¶
func (f *DestinationKind) Values() []DestinationKind
Values returns all possible values for DestinationKind.
There is no guarantee on the order of the values in the slice.
type DestinationResource ¶
type DestinationResource struct {
// The ID of the job that conversion created, if any.
JobId int64 `json:"job_id,omitempty"`
// The ID (a UUID) of the pipeline that conversion created, if any.
PipelineId string `json:"pipeline_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A Databricks job or pipeline created during conversion.
func (DestinationResource) MarshalJSON ¶
func (s DestinationResource) MarshalJSON() ([]byte, error)
func (*DestinationResource) UnmarshalJSON ¶
func (s *DestinationResource) UnmarshalJSON(b []byte) error
type ErrorCode ¶
type ErrorCode string
Error codes returned by Databricks APIs to indicate specific failure conditions.
const ErrorCodeAborted ErrorCode = `ABORTED`
const ErrorCodeAlreadyExists ErrorCode = `ALREADY_EXISTS`
const ErrorCodeBadRequest ErrorCode = `BAD_REQUEST`
const ErrorCodeCancelled ErrorCode = `CANCELLED`
const ErrorCodeCatalogAlreadyExists ErrorCode = `CATALOG_ALREADY_EXISTS`
const ErrorCodeCatalogDoesNotExist ErrorCode = `CATALOG_DOES_NOT_EXIST`
const ErrorCodeCatalogNotEmpty ErrorCode = `CATALOG_NOT_EMPTY`
const ErrorCodeCouldNotAcquireLock ErrorCode = `COULD_NOT_ACQUIRE_LOCK`
const ErrorCodeDacAlreadyExists ErrorCode = `DAC_ALREADY_EXISTS`
const ErrorCodeDacDoesNotExist ErrorCode = `DAC_DOES_NOT_EXIST`
const ErrorCodeDataLoss ErrorCode = `DATA_LOSS`
const ErrorCodeDeadlineExceeded ErrorCode = `DEADLINE_EXCEEDED`
const ErrorCodeDeploymentTimeout ErrorCode = `DEPLOYMENT_TIMEOUT`
const ErrorCodeDirectoryNotEmpty ErrorCode = `DIRECTORY_NOT_EMPTY`
const ErrorCodeDirectoryProtected ErrorCode = `DIRECTORY_PROTECTED`
const ErrorCodeDryRunFailed ErrorCode = `DRY_RUN_FAILED`
const ErrorCodeEndpointNotFound ErrorCode = `ENDPOINT_NOT_FOUND`
const ErrorCodeExternalLocationAlreadyExists ErrorCode = `EXTERNAL_LOCATION_ALREADY_EXISTS`
const ErrorCodeExternalLocationDoesNotExist ErrorCode = `EXTERNAL_LOCATION_DOES_NOT_EXIST`
const ErrorCodeFeatureDisabled ErrorCode = `FEATURE_DISABLED`
const ErrorCodeGitConflict ErrorCode = `GIT_CONFLICT`
const ErrorCodeGitRemoteError ErrorCode = `GIT_REMOTE_ERROR`
const ErrorCodeGitSensitiveTokenDetected ErrorCode = `GIT_SENSITIVE_TOKEN_DETECTED`
const ErrorCodeGitUnknownRef ErrorCode = `GIT_UNKNOWN_REF`
const ErrorCodeGitUrlNotOnAllowList ErrorCode = `GIT_URL_NOT_ON_ALLOW_LIST`
const ErrorCodeInsecurePartnerResponse ErrorCode = `INSECURE_PARTNER_RESPONSE`
const ErrorCodeInternalError ErrorCode = `INTERNAL_ERROR`
const ErrorCodeInvalidParameterValue ErrorCode = `INVALID_PARAMETER_VALUE`
const ErrorCodeInvalidState ErrorCode = `INVALID_STATE`
const ErrorCodeInvalidStateTransition ErrorCode = `INVALID_STATE_TRANSITION`
const ErrorCodeIoError ErrorCode = `IO_ERROR`
const ErrorCodeIpynbFileInRepo ErrorCode = `IPYNB_FILE_IN_REPO`
const ErrorCodeMalformedPartnerResponse ErrorCode = `MALFORMED_PARTNER_RESPONSE`
const ErrorCodeMalformedRequest ErrorCode = `MALFORMED_REQUEST`
const ErrorCodeManagedResourceGroupDoesNotExist ErrorCode = `MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST`
const ErrorCodeMaxBlockSizeExceeded ErrorCode = `MAX_BLOCK_SIZE_EXCEEDED`
const ErrorCodeMaxChildNodeSizeExceeded ErrorCode = `MAX_CHILD_NODE_SIZE_EXCEEDED`
const ErrorCodeMaxListSizeExceeded ErrorCode = `MAX_LIST_SIZE_EXCEEDED`
const ErrorCodeMaxNotebookSizeExceeded ErrorCode = `MAX_NOTEBOOK_SIZE_EXCEEDED`
const ErrorCodeMaxReadSizeExceeded ErrorCode = `MAX_READ_SIZE_EXCEEDED`
const ErrorCodeMetastoreAlreadyExists ErrorCode = `METASTORE_ALREADY_EXISTS`
const ErrorCodeMetastoreDoesNotExist ErrorCode = `METASTORE_DOES_NOT_EXIST`
const ErrorCodeMetastoreNotEmpty ErrorCode = `METASTORE_NOT_EMPTY`
const ErrorCodeNotFound ErrorCode = `NOT_FOUND`
const ErrorCodeNotImplemented ErrorCode = `NOT_IMPLEMENTED`
const ErrorCodePartialDelete ErrorCode = `PARTIAL_DELETE`
const ErrorCodePermissionDenied ErrorCode = `PERMISSION_DENIED`
const ErrorCodePermissionNotPropagated ErrorCode = `PERMISSION_NOT_PROPAGATED`
const ErrorCodePrincipalDoesNotExist ErrorCode = `PRINCIPAL_DOES_NOT_EXIST`
const ErrorCodeProjectsOperationTimeout ErrorCode = `PROJECTS_OPERATION_TIMEOUT`
const ErrorCodeProviderAlreadyExists ErrorCode = `PROVIDER_ALREADY_EXISTS`
const ErrorCodeProviderDoesNotExist ErrorCode = `PROVIDER_DOES_NOT_EXIST`
const ErrorCodeQuotaExceeded ErrorCode = `QUOTA_EXCEEDED`
const ErrorCodeRecipientAlreadyExists ErrorCode = `RECIPIENT_ALREADY_EXISTS`
const ErrorCodeRecipientDoesNotExist ErrorCode = `RECIPIENT_DOES_NOT_EXIST`
const ErrorCodeRequestLimitExceeded ErrorCode = `REQUEST_LIMIT_EXCEEDED`
const ErrorCodeResourceAlreadyExists ErrorCode = `RESOURCE_ALREADY_EXISTS`
const ErrorCodeResourceConflict ErrorCode = `RESOURCE_CONFLICT`
const ErrorCodeResourceDoesNotExist ErrorCode = `RESOURCE_DOES_NOT_EXIST`
const ErrorCodeResourceExhausted ErrorCode = `RESOURCE_EXHAUSTED`
const ErrorCodeResourceLimitExceeded ErrorCode = `RESOURCE_LIMIT_EXCEEDED`
const ErrorCodeSchemaAlreadyExists ErrorCode = `SCHEMA_ALREADY_EXISTS`
const ErrorCodeSchemaDoesNotExist ErrorCode = `SCHEMA_DOES_NOT_EXIST`
const ErrorCodeSchemaNotEmpty ErrorCode = `SCHEMA_NOT_EMPTY`
const ErrorCodeSearchQueryTooLong ErrorCode = `SEARCH_QUERY_TOO_LONG`
const ErrorCodeSearchQueryTooShort ErrorCode = `SEARCH_QUERY_TOO_SHORT`
const ErrorCodeServiceUnderMaintenance ErrorCode = `SERVICE_UNDER_MAINTENANCE`
const ErrorCodeStorageCredentialAlreadyExists ErrorCode = `STORAGE_CREDENTIAL_ALREADY_EXISTS`
const ErrorCodeStorageCredentialDoesNotExist ErrorCode = `STORAGE_CREDENTIAL_DOES_NOT_EXIST`
const ErrorCodeTableAlreadyExists ErrorCode = `TABLE_ALREADY_EXISTS`
const ErrorCodeTableDoesNotExist ErrorCode = `TABLE_DOES_NOT_EXIST`
const ErrorCodeUnauthenticated ErrorCode = `UNAUTHENTICATED`
const ErrorCodeUnknown ErrorCode = `UNKNOWN`
const ErrorCodeUnparseableHttpError ErrorCode = `UNPARSEABLE_HTTP_ERROR`
type FileStatus ¶
type FileStatus string
Conversion status of a file in a migration project.
const FileStatusFileStatusError FileStatus = `FILE_STATUS_ERROR`
const FileStatusFileStatusInProgress FileStatus = `FILE_STATUS_IN_PROGRESS`
const FileStatusFileStatusPartialSuccess FileStatus = `FILE_STATUS_PARTIAL_SUCCESS`
const FileStatusFileStatusQueued FileStatus = `FILE_STATUS_QUEUED`
const FileStatusFileStatusReviewed FileStatus = `FILE_STATUS_REVIEWED`
const FileStatusFileStatusStopped FileStatus = `FILE_STATUS_STOPPED`
const FileStatusFileStatusSuccess FileStatus = `FILE_STATUS_SUCCESS`
func (*FileStatus) Set ¶
func (f *FileStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*FileStatus) String ¶
func (f *FileStatus) String() string
String representation for fmt.Print
func (*FileStatus) Type ¶
func (f *FileStatus) Type() string
Type always returns FileStatus to satisfy [pflag.Value] interface
func (*FileStatus) Values ¶
func (f *FileStatus) Values() []FileStatus
Values returns all possible values for FileStatus.
There is no guarantee on the order of the values in the slice.
type GenieMigrateAPI ¶
type GenieMigrateAPI struct {
// contains filtered or unexported fields
}
Use the Genie Migrate API to create and manage migration projects and the source files to convert.
func NewGenieMigrate ¶
func NewGenieMigrate(client *client.DatabricksClient) *GenieMigrateAPI
func (*GenieMigrateAPI) AddFiles ¶
func (a *GenieMigrateAPI) AddFiles(ctx context.Context, request AddProjectFilesRequest) (*AddProjectFilesResponse, error)
func (*GenieMigrateAPI) CancelOperation ¶
func (a *GenieMigrateAPI) CancelOperation(ctx context.Context, request CancelOperationRequest) error
func (*GenieMigrateAPI) ConvertProjectFiles ¶
func (a *GenieMigrateAPI) ConvertProjectFiles(ctx context.Context, request ConvertProjectFilesRequest) (ConvertProjectFilesOperationInterface, error)
func (*GenieMigrateAPI) Create ¶
func (a *GenieMigrateAPI) Create(ctx context.Context, request CreateProjectRequest) (*Project, error)
func (*GenieMigrateAPI) Delete ¶
func (a *GenieMigrateAPI) Delete(ctx context.Context, request DeleteProjectRequest) error
func (*GenieMigrateAPI) Get ¶
func (a *GenieMigrateAPI) Get(ctx context.Context, request GetProjectRequest) (*Project, error)
func (*GenieMigrateAPI) GetFile ¶
func (a *GenieMigrateAPI) GetFile(ctx context.Context, request GetProjectFileRequest) (*ProjectFile, error)
func (*GenieMigrateAPI) GetOperation ¶
func (a *GenieMigrateAPI) GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)
func (*GenieMigrateAPI) List ¶
func (a *GenieMigrateAPI) List(ctx context.Context, request ListProjectsRequest) listing.Iterator[Project]
Lists the migration projects in a workspace folder. Select the folder with `filter`; without a filter, lists the caller's home folder. Listing every project in the workspace isn't supported.
Returns project summaries without conversion settings; call `GetProject` for the full project. A page can be empty even when more pages follow, so keep requesting pages until `next_page_token` is empty.
func (*GenieMigrateAPI) ListAll ¶
func (a *GenieMigrateAPI) ListAll(ctx context.Context, request ListProjectsRequest) ([]Project, error)
Lists the migration projects in a workspace folder. Select the folder with `filter`; without a filter, lists the caller's home folder. Listing every project in the workspace isn't supported.
Returns project summaries without conversion settings; call `GetProject` for the full project. A page can be empty even when more pages follow, so keep requesting pages until `next_page_token` is empty.
func (*GenieMigrateAPI) ListFiles ¶
func (a *GenieMigrateAPI) ListFiles(ctx context.Context, request ListProjectFilesRequest) listing.Iterator[ProjectFile]
Lists the files of a migration project with their latest conversion statuses. To read a file's changes, to-do items, blockers, and notes, call `GetProjectFile`. A page can have fewer files than requested, or none, even when more pages follow; keep requesting pages until `next_page_token` is empty.
func (*GenieMigrateAPI) ListFilesAll ¶
func (a *GenieMigrateAPI) ListFilesAll(ctx context.Context, request ListProjectFilesRequest) ([]ProjectFile, error)
Lists the files of a migration project with their latest conversion statuses. To read a file's changes, to-do items, blockers, and notes, call `GetProjectFile`. A page can have fewer files than requested, or none, even when more pages follow; keep requesting pages until `next_page_token` is empty.
func (*GenieMigrateAPI) RemoveFiles ¶
func (a *GenieMigrateAPI) RemoveFiles(ctx context.Context, request RemoveProjectFilesRequest) (*RemoveProjectFilesResponse, error)
func (*GenieMigrateAPI) ReviewProjectFiles ¶
func (a *GenieMigrateAPI) ReviewProjectFiles(ctx context.Context, request ReviewProjectFilesRequest) (*ReviewProjectFilesResponse, error)
func (*GenieMigrateAPI) UnreviewProjectFiles ¶
func (a *GenieMigrateAPI) UnreviewProjectFiles(ctx context.Context, request UnreviewProjectFilesRequest) (*UnreviewProjectFilesResponse, error)
type GenieMigrateInterface ¶
type GenieMigrateInterface interface {
// Adds source files to a migration project. Files that are already in the
// project are skipped and keep their conversion results.
AddFiles(ctx context.Context, request AddProjectFilesRequest) (*AddProjectFilesResponse, error)
// Requests cancellation of a long-running operation. Requires `CAN_EDIT`
// permission on the project. Cancellation is best effort: the operation can
// complete before cancellation takes effect. Call `GetOperation` to see its
// final state.
CancelOperation(ctx context.Context, request CancelOperationRequest) error
ConvertProjectFiles(ctx context.Context, request ConvertProjectFilesRequest) (ConvertProjectFilesOperationInterface, error)
// Creates a migration project in a workspace folder. The server assigns the
// project ID. Add source files to the project with `AddProjectFiles`.
Create(ctx context.Context, request CreateProjectRequest) (*Project, error)
// Moves a migration project to the workspace trash. The project keeps its ID
// until it's removed from the trash.
Delete(ctx context.Context, request DeleteProjectRequest) error
// Gets a migration project, including its conversion settings and whether
// they're locked. To list the project's source files, call `ListProjectFiles`.
// To track a conversion, call `GetOperation`.
Get(ctx context.Context, request GetProjectRequest) (*Project, error)
// Gets a file of a migration project, including the conversion details stored
// with its converted file, when available. Requires `CAN_READ` permission on
// the project and, once the file is converted, on the converted file.
GetFile(ctx context.Context, request GetProjectFileRequest) (*ProjectFile, error)
// Gets the latest state of a long-running operation, such as a conversion
// started by `ConvertProjectFiles`. Operation names have the format
// `projects/{project_id}/operations/{operation_id}`. Use the full name that the
// service returned, and treat the operation ID as opaque. Requires `CAN_READ`
// permission on the project.
GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)
// Lists the migration projects in a workspace folder. Select the folder with
// `filter`; without a filter, lists the caller's home folder. Listing every
// project in the workspace isn't supported.
//
// Returns project summaries without conversion settings; call `GetProject` for
// the full project. A page can be empty even when more pages follow, so keep
// requesting pages until `next_page_token` is empty.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListProjectsRequest) listing.Iterator[Project]
// Lists the migration projects in a workspace folder. Select the folder with
// `filter`; without a filter, lists the caller's home folder. Listing every
// project in the workspace isn't supported.
//
// Returns project summaries without conversion settings; call `GetProject` for
// the full project. A page can be empty even when more pages follow, so keep
// requesting pages until `next_page_token` is empty.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListProjectsRequest) ([]Project, error)
// Lists the files of a migration project with their latest conversion statuses.
// To read a file's changes, to-do items, blockers, and notes, call
// `GetProjectFile`. A page can have fewer files than requested, or none, even
// when more pages follow; keep requesting pages until `next_page_token` is
// empty.
//
// This method is generated by Databricks SDK Code Generator.
ListFiles(ctx context.Context, request ListProjectFilesRequest) listing.Iterator[ProjectFile]
// Lists the files of a migration project with their latest conversion statuses.
// To read a file's changes, to-do items, blockers, and notes, call
// `GetProjectFile`. A page can have fewer files than requested, or none, even
// when more pages follow; keep requesting pages until `next_page_token` is
// empty.
//
// This method is generated by Databricks SDK Code Generator.
ListFilesAll(ctx context.Context, request ListProjectFilesRequest) ([]ProjectFile, error)
// Removes files from a migration project by their resource names. The source
// files and their converted output stay in the workspace.
RemoveFiles(ctx context.Context, request RemoveProjectFilesRequest) (*RemoveProjectFilesResponse, error)
// Marks files of a migration project as reviewed, accepting their converted
// output. Each file's status becomes `FILE_STATUS_REVIEWED`, and reviewed files
// aren't converted again. Files that are already reviewed don't change. Returns
// the files in request order.
ReviewProjectFiles(ctx context.Context, request ReviewProjectFilesRequest) (*ReviewProjectFilesResponse, error)
// Removes the reviewed status from files of a migration project. Each file
// returns to the status it had before it was reviewed. Files that aren't
// reviewed don't change. Returns the files in request order.
UnreviewProjectFiles(ctx context.Context, request UnreviewProjectFilesRequest) (*UnreviewProjectFilesResponse, error)
// Updates a migration project. Only the fields listed in `update_mask` change.
// An empty mask, or a mask with an unsupported field, returns
// `INVALID_PARAMETER_VALUE`. When `changes_locked` is `true`, the source
// dialect and target framework can't be changed.
Update(ctx context.Context, request UpdateProjectRequest) (*Project, error)
}
type GenieMigrateService
deprecated
type GenieMigrateService interface {
// Adds source files to a migration project. Files that are already in the
// project are skipped and keep their conversion results.
AddFiles(ctx context.Context, request AddProjectFilesRequest) (*AddProjectFilesResponse, error)
// Requests cancellation of a long-running operation. Requires `CAN_EDIT`
// permission on the project. Cancellation is best effort: the operation can
// complete before cancellation takes effect. Call `GetOperation` to see its
// final state.
CancelOperation(ctx context.Context, request CancelOperationRequest) error
// Converts files of a migration project in a background job. Returns an
// operation; poll it with `GetOperation`. The operation's metadata is the
// current `ConversionRun`, with the run's state and the status of each
// file. When the run completes, the operation's response is a
// `ConvertProjectFilesResponse`. A failed or cancelled run sets the
// operation's `error` instead. Files that fail to convert don't fail the
// run.
//
// To stop a conversion, call `CancelOperation`. Cancellation is best
// effort, and the conversion can complete first. `GetOperation` reports the
// final outcome.
ConvertProjectFiles(ctx context.Context, request ConvertProjectFilesRequest) (*Operation, error)
// Creates a migration project in a workspace folder. The server assigns the
// project ID. Add source files to the project with `AddProjectFiles`.
Create(ctx context.Context, request CreateProjectRequest) (*Project, error)
// Moves a migration project to the workspace trash. The project keeps its
// ID until it's removed from the trash.
Delete(ctx context.Context, request DeleteProjectRequest) error
// Gets a migration project, including its conversion settings and whether
// they're locked. To list the project's source files, call
// `ListProjectFiles`. To track a conversion, call `GetOperation`.
Get(ctx context.Context, request GetProjectRequest) (*Project, error)
// Gets a file of a migration project, including the conversion details
// stored with its converted file, when available. Requires `CAN_READ`
// permission on the project and, once the file is converted, on the
// converted file.
GetFile(ctx context.Context, request GetProjectFileRequest) (*ProjectFile, error)
// Gets the latest state of a long-running operation, such as a conversion
// started by `ConvertProjectFiles`. Operation names have the format
// `projects/{project_id}/operations/{operation_id}`. Use the full name that
// the service returned, and treat the operation ID as opaque. Requires
// `CAN_READ` permission on the project.
GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)
// Lists the migration projects in a workspace folder. Select the folder
// with `filter`; without a filter, lists the caller's home folder. Listing
// every project in the workspace isn't supported.
//
// Returns project summaries without conversion settings; call `GetProject`
// for the full project. A page can be empty even when more pages follow, so
// keep requesting pages until `next_page_token` is empty.
List(ctx context.Context, request ListProjectsRequest) (*ListProjectsResponse, error)
// Lists the files of a migration project with their latest conversion
// statuses. To read a file's changes, to-do items, blockers, and notes,
// call `GetProjectFile`. A page can have fewer files than requested, or
// none, even when more pages follow; keep requesting pages until
// `next_page_token` is empty.
ListFiles(ctx context.Context, request ListProjectFilesRequest) (*ListProjectFilesResponse, error)
// Removes files from a migration project by their resource names. The
// source files and their converted output stay in the workspace.
RemoveFiles(ctx context.Context, request RemoveProjectFilesRequest) (*RemoveProjectFilesResponse, error)
// Marks files of a migration project as reviewed, accepting their converted
// output. Each file's status becomes `FILE_STATUS_REVIEWED`, and reviewed
// files aren't converted again. Files that are already reviewed don't
// change. Returns the files in request order.
ReviewProjectFiles(ctx context.Context, request ReviewProjectFilesRequest) (*ReviewProjectFilesResponse, error)
// Removes the reviewed status from files of a migration project. Each file
// returns to the status it had before it was reviewed. Files that aren't
// reviewed don't change. Returns the files in request order.
UnreviewProjectFiles(ctx context.Context, request UnreviewProjectFilesRequest) (*UnreviewProjectFilesResponse, error)
// Updates a migration project. Only the fields listed in `update_mask`
// change. An empty mask, or a mask with an unsupported field, returns
// `INVALID_PARAMETER_VALUE`. When `changes_locked` is `true`, the source
// dialect and target framework can't be changed.
Update(ctx context.Context, request UpdateProjectRequest) (*Project, error)
}
Use the Genie Migrate API to create and manage migration projects and the source files to convert.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type GetOperationRequest ¶
type GetOperationRequest struct {
// The name of the operation resource.
Name string `json:"-" url:"-"`
}
func (*GetOperationRequest) UnmarshalJSON ¶
func (s *GetOperationRequest) UnmarshalJSON(b []byte) error
type GetProjectFileRequest ¶
type GetProjectFileRequest struct {
// The resource name of the file, in the format
// `projects/{project_id}/files/{file_id}`. For example,
// `projects/123/files/789`.
Name string `json:"-" url:"-"`
}
func (*GetProjectFileRequest) UnmarshalJSON ¶
func (s *GetProjectFileRequest) UnmarshalJSON(b []byte) error
type GetProjectRequest ¶
type GetProjectRequest struct {
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`.
Name string `json:"-" url:"-"`
}
func (*GetProjectRequest) UnmarshalJSON ¶
func (s *GetProjectRequest) UnmarshalJSON(b []byte) error
type ListProjectFilesRequest ¶
type ListProjectFilesRequest struct {
// The maximum number of files to return, at most 500. If omitted, zero, or
// negative, the server chooses. The server can return a different number of
// files than requested, so keep requesting pages until `next_page_token` is
// empty.
PageSize int `json:"-" url:"page_size,omitempty"`
// The `next_page_token` from a previous response. Omit it for the first
// page. Use it only with the same `parent`.
PageToken string `json:"-" url:"page_token,omitempty"`
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`.
Parent string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListProjectFilesRequest) MarshalJSON ¶
func (s ListProjectFilesRequest) MarshalJSON() ([]byte, error)
func (*ListProjectFilesRequest) UnmarshalJSON ¶
func (s *ListProjectFilesRequest) UnmarshalJSON(b []byte) error
type ListProjectFilesResponse ¶
type ListProjectFilesResponse struct {
// The token for the next page. Empty when there are no more pages.
NextPageToken string `json:"next_page_token,omitempty"`
// The files in this page.
ProjectFiles []ProjectFile `json:"project_files,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The response to `ListProjectFiles`.
func (ListProjectFilesResponse) MarshalJSON ¶
func (s ListProjectFilesResponse) MarshalJSON() ([]byte, error)
func (*ListProjectFilesResponse) UnmarshalJSON ¶
func (s *ListProjectFilesResponse) UnmarshalJSON(b []byte) error
type ListProjectsRequest ¶
type ListProjectsRequest struct {
// The folder to list, as `folder = "folders/{folder_id}"`. For example,
// `folder = "folders/456"`. No other filter is supported. Defaults to the
// caller's home folder.
Filter string `json:"-" url:"filter,omitempty"`
// The maximum number of projects to return, at most 500. Defaults to 100 if
// omitted, zero, or negative. A page can have fewer projects than
// requested, or none, even when more pages follow.
PageSize int `json:"-" url:"page_size,omitempty"`
// The `next_page_token` from a previous response. Omit it for the first
// page. Use the same `filter` for every page.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListProjectsRequest) MarshalJSON ¶
func (s ListProjectsRequest) MarshalJSON() ([]byte, error)
func (*ListProjectsRequest) UnmarshalJSON ¶
func (s *ListProjectsRequest) UnmarshalJSON(b []byte) error
type ListProjectsResponse ¶
type ListProjectsResponse struct {
// The token for the next page. Empty when there are no more pages.
NextPageToken string `json:"next_page_token,omitempty"`
// The projects in this page, without `project_config` or `changes_locked`.
// Call `GetProject` for the full project.
Projects []Project `json:"projects,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The response to `ListProjects`.
func (ListProjectsResponse) MarshalJSON ¶
func (s ListProjectsResponse) MarshalJSON() ([]byte, error)
func (*ListProjectsResponse) UnmarshalJSON ¶
func (s *ListProjectsResponse) UnmarshalJSON(b []byte) error
type Location ¶
type Location struct {
// A file or folder in the workspace.
Workspace *WorkspaceLocation `json:"workspace,omitempty"`
}
The location of a file or folder. Exactly one location type is set. More location types can be added later, so clients should ignore types they don't recognize.
func (*Location) UnmarshalJSON ¶
type Operation ¶
type Operation struct {
// If the value is `false`, it means the operation is still in progress. If
// `true`, the operation is completed, and either `error` or `response` is
// available.
Done bool `json:"done,omitempty"`
// The error result of the operation in case of failure or cancellation.
Error *DatabricksServiceExceptionWithDetailsProto `json:"error,omitempty"`
// Service-specific metadata associated with the operation. It typically
// contains progress information and common metadata such as create time.
// Some services might not provide such metadata.
Metadata json.RawMessage `json:"metadata,omitempty"`
// The server-assigned name, which is only unique within the same service
// that originally returns it. If you use the default HTTP mapping, the
// `name` should be a resource name ending with `operations/{unique_id}`.
Name string `json:"name,omitempty"`
// The normal, successful response of the operation.
Response json.RawMessage `json:"response,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
This resource represents a long-running operation that is the result of a network API call.
func (Operation) MarshalJSON ¶
func (*Operation) UnmarshalJSON ¶
type Project ¶
type Project struct {
// Whether the source dialect and target framework are locked. They lock
// after a conversion or analysis runs on the project. Other settings stay
// editable.
ChangesLocked bool `json:"changes_locked,omitempty"`
// The time the project was created, if available. Can be absent from
// `CreateProject` and `UpdateProject` responses.
CreateTime *time.Time `json:"create_time,omitempty"`
// The display name of the project. Required on create, and can't be blank.
// Changing it renames the project.
DisplayName string `json:"display_name"`
// The workspace folder that contains the project, in the format
// `folders/{folder_id}`. For example, `folders/456`. If omitted on create,
// defaults to the caller's home folder. `UpdateProject` can't change it,
// but moving the project in the workspace does. Returned when available.
// Converted files are written to `project_config.destination_location`,
// which can be a different folder.
Folder string `json:"folder,omitempty"`
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`. The server assigns it when the project is
// created.
Name string `json:"name,omitempty"`
// The conversion settings of the project. Required on create. Returned by
// `CreateProject`, `GetProject`, and `UpdateProject`, but not by
// `ListProjects`.
ProjectConfig ProjectConfig `json:"project_config"`
// The time the project was last modified, if available. Can be absent from
// `CreateProject` and `UpdateProject` responses.
UpdateTime *time.Time `json:"update_time,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A migration project: the conversion settings and source files of one migration.
func (Project) MarshalJSON ¶
func (*Project) UnmarshalJSON ¶
type ProjectConfig ¶
type ProjectConfig struct {
// The workspace folder where converted files are written. Required on
// create; set `workspace.path` or `workspace.object_id`. `UpdateProject`
// can't change it.
DestinationLocation *Location `json:"destination_location,omitempty"`
// The workspace JSON file that holds the project's lineage report.
// Optional. To clear it, include `project_config.lineage_location` in
// `update_mask` and leave this field unset.
LineageLocation *Location `json:"lineage_location,omitempty"`
// The dialect of the project's source files. Can't be changed when
// `Project.changes_locked` is `true`.
SourceDialect SourceDialect `json:"source_dialect,omitempty"`
// The framework that source files are converted to. Required on create, and
// can't be `TARGET_FRAMEWORK_UNSPECIFIED`. Can't be changed when
// `Project.changes_locked` is `true`.
TargetFramework TargetFramework `json:"target_framework"`
}
Conversion settings of a migration project.
func (*ProjectConfig) UnmarshalJSON ¶
func (s *ProjectConfig) UnmarshalJSON(b []byte) error
type ProjectFile ¶
type ProjectFile struct {
// Issues that block the conversion. Returned only by `GetProjectFile`,
// which reads them from the converted file.
Blockers []string `json:"blockers,omitempty"`
// The changes made during conversion. Returned only by `GetProjectFile`,
// which reads them from the converted file.
Changes []string `json:"changes,omitempty"`
// The location of the asset that this file was derived from. Absent if the
// file wasn't derived from another asset.
DerivedFrom *Location `json:"derived_from,omitempty"`
// The location of the converted file. Absent until a conversion writes it.
Destination *Location `json:"destination,omitempty"`
// The kind of the converted file, when recorded.
DestinationKind DestinationKind `json:"destination_kind,omitempty"`
// The Databricks job or pipeline that conversion created for this file, if
// any.
DestinationResource *DestinationResource `json:"destination_resource,omitempty"`
// The error reported for this file, if any. `GetProjectFile` returns the
// error stored with the converted file when available, and otherwise the
// latest error recorded for the project file.
ErrorMessage string `json:"error_message,omitempty"`
// Whether the file has conversion notes. Returned by `ListProjectFiles`;
// call `GetProjectFile` to read the notes.
HasNotes bool `json:"has_notes,omitempty"`
// The resource name of the file, in the format
// `projects/{project_id}/files/{file_id}`. For example,
// `projects/123/files/789`. The server assigns `file_id`, an opaque value
// of at most 63 characters.
Name string `json:"name,omitempty"`
// Informational notes about the conversion that need no decision. Returned
// only by `GetProjectFile`, which reads them from the converted file.
Notes []string `json:"notes,omitempty"`
// The location of the source file.
Source *Location `json:"source,omitempty"`
// The file's latest conversion status across all runs. For its status in a
// specific run, read `ConversionRun.files` in that run's operation
// metadata.
Status FileStatus `json:"status,omitempty"`
// Follow-up work (to-do items) identified during conversion. Returned only
// by `GetProjectFile`, which reads them from the converted file.
Todos []string `json:"todos,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A source file in a migration project, with its latest conversion results. The service sets the conversion results. To accept the converted output, call `ReviewProjectFiles`; to undo that, call `UnreviewProjectFiles`. Neither method changes the conversion results.
func (ProjectFile) MarshalJSON ¶
func (s ProjectFile) MarshalJSON() ([]byte, error)
func (*ProjectFile) UnmarshalJSON ¶
func (s *ProjectFile) UnmarshalJSON(b []byte) error
type RemoveProjectFilesRequest ¶
type RemoveProjectFilesRequest struct {
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`.
Name string `json:"-" url:"-"`
// The files to remove, by `ProjectFile.name`. For example,
// `projects/123/files/789`. Every file must belong to the project in
// `name`. An empty list changes nothing. Send at most 10 files per request,
// the default limit. Requests over a project's limit return
// `INVALID_PARAMETER_VALUE`.
Names []string `json:"names,omitempty"`
}
The request to remove files from a migration project.
func (*RemoveProjectFilesRequest) UnmarshalJSON ¶
func (s *RemoveProjectFilesRequest) UnmarshalJSON(b []byte) error
type RemoveProjectFilesResponse ¶
type RemoveProjectFilesResponse struct {
// The requested files, in request order. Each entry identifies a source
// file and has no conversion results.
Files []ProjectFile `json:"files,omitempty"`
}
Lists the files from a `RemoveProjectFiles` request.
func (*RemoveProjectFilesResponse) UnmarshalJSON ¶
func (s *RemoveProjectFilesResponse) UnmarshalJSON(b []byte) error
type ReviewProjectFilesRequest ¶
type ReviewProjectFilesRequest struct {
// The files to review: 1 to 100 distinct file resource names, in the format
// `projects/{project_id}/files/{file_id}`. For example,
// `projects/123/files/789`.
Names []string `json:"names"`
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`. Every file in `names` must belong to this
// project.
Parent string `json:"-" url:"-"`
}
The request to mark files of a migration project as reviewed.
func (*ReviewProjectFilesRequest) UnmarshalJSON ¶
func (s *ReviewProjectFilesRequest) UnmarshalJSON(b []byte) error
type ReviewProjectFilesResponse ¶
type ReviewProjectFilesResponse struct {
// The reviewed files, in request order. To read a file's changes, to-do
// items, blockers, and notes, call `GetProjectFile`.
ProjectFiles []ProjectFile `json:"project_files,omitempty"`
}
The files reviewed by `ReviewProjectFiles`, in request order.
func (*ReviewProjectFilesResponse) UnmarshalJSON ¶
func (s *ReviewProjectFilesResponse) UnmarshalJSON(b []byte) error
type SourceDialect ¶
type SourceDialect string
Source dialect of the files in a migration project.
const SourceDialectSourceDialectAlteryx SourceDialect = `SOURCE_DIALECT_ALTERYX`
const SourceDialectSourceDialectBigquery SourceDialect = `SOURCE_DIALECT_BIGQUERY`
const SourceDialectSourceDialectInformatica SourceDialect = `SOURCE_DIALECT_INFORMATICA`
const SourceDialectSourceDialectOracle SourceDialect = `SOURCE_DIALECT_ORACLE`
const SourceDialectSourceDialectRedshift SourceDialect = `SOURCE_DIALECT_REDSHIFT`
const SourceDialectSourceDialectSnowflake SourceDialect = `SOURCE_DIALECT_SNOWFLAKE`
const SourceDialectSourceDialectSsis SourceDialect = `SOURCE_DIALECT_SSIS`
const SourceDialectSourceDialectTSql SourceDialect = `SOURCE_DIALECT_T_SQL`
const SourceDialectSourceDialectTeradata SourceDialect = `SOURCE_DIALECT_TERADATA`
func (*SourceDialect) Set ¶
func (f *SourceDialect) Set(v string) error
Set raw string value and validate it against allowed values
func (*SourceDialect) String ¶
func (f *SourceDialect) String() string
String representation for fmt.Print
func (*SourceDialect) Type ¶
func (f *SourceDialect) Type() string
Type always returns SourceDialect to satisfy [pflag.Value] interface
func (*SourceDialect) Values ¶
func (f *SourceDialect) Values() []SourceDialect
Values returns all possible values for SourceDialect.
There is no guarantee on the order of the values in the slice.
type SourceFileRef ¶
type SourceFileRef struct {
// The location of the asset that this file was derived from, if any. Used
// only by `AddProjectFiles`, and can't be changed after the file is added.
DerivedFrom *Location `json:"derived_from,omitempty"`
// The source file in the workspace. Must identify an existing file the
// caller can read.
Workspace *WorkspaceLocation `json:"workspace,omitempty"`
}
A reference to a source file in the workspace. Set `workspace.path` or `workspace.object_id`. For example, `{"workspace": {"path": "/Workspace/Shared/migration/source.sql"}}`.
func (*SourceFileRef) UnmarshalJSON ¶
func (s *SourceFileRef) UnmarshalJSON(b []byte) error
type TargetFramework ¶
type TargetFramework string
Output framework of the converted files in a migration project.
const TargetFrameworkTargetFrameworkDesigner TargetFramework = `TARGET_FRAMEWORK_DESIGNER`
const TargetFrameworkTargetFrameworkPyspark TargetFramework = `TARGET_FRAMEWORK_PYSPARK`
const TargetFrameworkTargetFrameworkSparkDeclarativePipelines TargetFramework = `TARGET_FRAMEWORK_SPARK_DECLARATIVE_PIPELINES`
const TargetFrameworkTargetFrameworkSql TargetFramework = `TARGET_FRAMEWORK_SQL`
func (*TargetFramework) Set ¶
func (f *TargetFramework) Set(v string) error
Set raw string value and validate it against allowed values
func (*TargetFramework) String ¶
func (f *TargetFramework) String() string
String representation for fmt.Print
func (*TargetFramework) Type ¶
func (f *TargetFramework) Type() string
Type always returns TargetFramework to satisfy [pflag.Value] interface
func (*TargetFramework) Values ¶
func (f *TargetFramework) Values() []TargetFramework
Values returns all possible values for TargetFramework.
There is no guarantee on the order of the values in the slice.
type UnreviewProjectFilesRequest ¶
type UnreviewProjectFilesRequest struct {
// The files to unreview: 1 to 100 distinct file resource names, in the
// format `projects/{project_id}/files/{file_id}`. For example,
// `projects/123/files/789`.
Names []string `json:"names"`
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`. Every file in `names` must belong to this
// project.
Parent string `json:"-" url:"-"`
}
The request to remove the reviewed status from files of a migration project.
func (*UnreviewProjectFilesRequest) UnmarshalJSON ¶
func (s *UnreviewProjectFilesRequest) UnmarshalJSON(b []byte) error
type UnreviewProjectFilesResponse ¶
type UnreviewProjectFilesResponse struct {
// The unreviewed files, in request order. To read a file's changes, to-do
// items, blockers, and notes, call `GetProjectFile`.
ProjectFiles []ProjectFile `json:"project_files,omitempty"`
}
The files unreviewed by `UnreviewProjectFiles`, in request order.
func (*UnreviewProjectFilesResponse) UnmarshalJSON ¶
func (s *UnreviewProjectFilesResponse) UnmarshalJSON(b []byte) error
type UpdateProjectRequest ¶
type UpdateProjectRequest struct {
// The resource name of the project, in the format `projects/{project_id}`.
// For example, `projects/123`. The server assigns it when the project is
// created.
Name string `json:"-" url:"-"`
// The project to update, identified by `name`.
Project Project `json:"project"`
// The fields to update. Supported fields are `display_name`,
// `project_config.source_dialect`, `project_config.target_framework`, and
// `project_config.lineage_location`. `project_config` and `*` update all
// three `project_config` fields and can't be combined with `display_name`.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateProjectRequest) UnmarshalJSON ¶
func (s *UpdateProjectRequest) UnmarshalJSON(b []byte) error
type WorkspaceLocation ¶
type WorkspaceLocation struct {
// The workspace object ID, as returned in `object_id` by the Workspace API.
// For example, `12345`.
ObjectId int64 `json:"object_id,omitempty"`
// The absolute workspace path. For example,
// `/Workspace/Shared/migration/source.sql`.
Path string `json:"path,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A file or folder in the workspace. On input, set `path` or `object_id`; if both are set, `object_id` is used. Responses set both when known.
func (WorkspaceLocation) MarshalJSON ¶
func (s WorkspaceLocation) MarshalJSON() ([]byte, error)
func (*WorkspaceLocation) UnmarshalJSON ¶
func (s *WorkspaceLocation) UnmarshalJSON(b []byte) error