Skip to content

Make Operation.targetId of ResourceId type #792

Closed
@mziccard

Description

@mziccard

Compute's operations have a targetId field that right now is of type String.
As soon as we mapped all possible resource URLs to identity classes we should change targetId to ResourceId type. Operation class should become:

public class Operation<T extends ResourceId> {
  // ...
  T targetId();
  // ...
}

This way all methods in Compute will return the corresponding operation, eg:

Operation<SnapshotId> createSnapshot(SnapshotInfo snapshot, OperationOption... options);

Metadata

Metadata

Assignees

Labels

api: computeIssues related to the Compute Engine API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions