Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change deserialization and merge patch to bitwise #2909

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,6 @@ public final class DocumentModelBuildOperationDetails extends OperationDetails {
public DocumentModelBuildOperationDetails() {
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
* @return the DocumentModelBuildOperationDetails object itself.
*/
public DocumentModelBuildOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -146,6 +116,36 @@ public DocumentModelBuildOperationDetails setError(Error error) {
return this;
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
* @return the DocumentModelBuildOperationDetails object itself.
*/
public DocumentModelBuildOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,6 @@ public final class DocumentModelComposeOperationDetails extends OperationDetails
public DocumentModelComposeOperationDetails() {
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
* @return the DocumentModelComposeOperationDetails object itself.
*/
public DocumentModelComposeOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -146,6 +116,36 @@ public DocumentModelComposeOperationDetails setError(Error error) {
return this;
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just changing the order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just a change in order but it's a good time to have a discussion on how we want to order overridden methods. Before this change, the methods defined the type came first then overridden methods, but in serialization code the properties defined by super types came first. It'd be nice to have a standard system for both serialization and getters/setters, such as properties and setters/getters defined by super types always come first (or last).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, as long as the two orders (methods order and properties processing order during serialziation) are consistent, and both override methods and new methods have their own section, that would be fine.
I also asked copilot. It says override methods from super class comes first. So I would vote for this - override methods come first. :)
image

* @return the DocumentModelComposeOperationDetails object itself.
*/
public DocumentModelComposeOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,6 @@ public final class DocumentModelCopyToOperationDetails extends OperationDetails
public DocumentModelCopyToOperationDetails() {
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
* @return the DocumentModelCopyToOperationDetails object itself.
*/
public DocumentModelCopyToOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -146,6 +116,36 @@ public DocumentModelCopyToOperationDetails setError(Error error) {
return this;
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
* Get the result property: Operation result upon success.
*
* @return the result value.
*/
public DocumentModelDetails getResult() {
return this.result;
}

/**
* Set the result property: Operation result upon success.
*
* @param result the result value to set.
* @return the DocumentModelCopyToOperationDetails object itself.
*/
public DocumentModelCopyToOperationDetails setResult(DocumentModelDetails result) {
this.result = result;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ public final class ManifestList extends Manifest {
public ManifestList() {
}

/**
* {@inheritDoc}
*/
@Override
public ManifestList setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* Get the mediaType property: Media type for this Manifest.
*
Expand Down Expand Up @@ -72,15 +81,6 @@ public ManifestList setManifests(List<ManifestListAttributes> manifests) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public ManifestList setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ public final class ManifestWrapper extends Manifest {
public ManifestWrapper() {
}

/**
* {@inheritDoc}
*/
@Override
public ManifestWrapper setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* Get the mediaType property: Media type for this Manifest.
*
Expand Down Expand Up @@ -299,15 +308,6 @@ public ManifestWrapper setSignatures(List<ImageSignature> signatures) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public ManifestWrapper setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ public final class OCIIndex extends Manifest {
public OCIIndex() {
}

/**
* {@inheritDoc}
*/
@Override
public OCIIndex setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* Get the manifests property: List of OCI image layer information.
*
Expand Down Expand Up @@ -73,15 +82,6 @@ public OCIIndex setAnnotations(OciAnnotations annotations) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public OCIIndex setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ public final class V1Manifest extends Manifest {
public V1Manifest() {
}

/**
* {@inheritDoc}
*/
@Override
public V1Manifest setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* Get the architecture property: CPU architecture.
*
Expand Down Expand Up @@ -172,15 +181,6 @@ public V1Manifest setSignatures(List<ImageSignature> signatures) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public V1Manifest setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ public final class V2Manifest extends Manifest {
public V2Manifest() {
}

/**
* {@inheritDoc}
*/
@Override
public V2Manifest setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* Get the mediaType property: Media type for this Manifest.
*
Expand Down Expand Up @@ -98,15 +107,6 @@ public V2Manifest setLayers(List<OciDescriptor> layers) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public V2Manifest setSchemaVersion(Integer schemaVersion) {
super.setSchemaVersion(schemaVersion);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Loading
Loading