-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add API translation method for setting admin object metadata #707
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
src/us/kbase/workspace/AlterAdminObjectMetadataParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
package us.kbase.workspace; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import javax.annotation.Generated; | ||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
|
||
/** | ||
* <p>Original spec-file type: AlterAdminObjectMetadataParams</p> | ||
* <pre> | ||
* Input parameters for the alter_admin_object_metadata method. | ||
* updates - the metadata updates to apply to the objects. If the same object is specified | ||
* twice in the list, the update order is unspecified. | ||
* </pre> | ||
* | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Generated("com.googlecode.jsonschema2pojo") | ||
@JsonPropertyOrder({ | ||
"updates" | ||
}) | ||
public class AlterAdminObjectMetadataParams { | ||
|
||
@JsonProperty("updates") | ||
private List<ObjectMetadataUpdate> updates; | ||
private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
|
||
@JsonProperty("updates") | ||
public List<ObjectMetadataUpdate> getUpdates() { | ||
return updates; | ||
} | ||
|
||
@JsonProperty("updates") | ||
public void setUpdates(List<ObjectMetadataUpdate> updates) { | ||
this.updates = updates; | ||
} | ||
|
||
public AlterAdminObjectMetadataParams withUpdates(List<ObjectMetadataUpdate> updates) { | ||
this.updates = updates; | ||
return this; | ||
} | ||
|
||
@JsonAnyGetter | ||
public Map<String, Object> getAdditionalProperties() { | ||
return this.additionalProperties; | ||
} | ||
|
||
@JsonAnySetter | ||
public void setAdditionalProperties(String name, Object value) { | ||
this.additionalProperties.put(name, value); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ((((("AlterAdminObjectMetadataParams"+" [updates=")+ updates)+", additionalProperties=")+ additionalProperties)+"]"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
|
||
package us.kbase.workspace; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import javax.annotation.Generated; | ||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
|
||
/** | ||
* <p>Original spec-file type: ObjectMetadataUpdate</p> | ||
* <pre> | ||
* An object metadata update specification. | ||
* Required arguments: | ||
* ObjectIdentity oi - the object to be altered | ||
* One or both of the following arguments are required: | ||
* usermeta new - metadata to assign to the workspace. Duplicate keys will | ||
* be overwritten. | ||
* list<string> remove - these keys will be removed from the workspace | ||
* metadata key/value pairs. | ||
* </pre> | ||
* | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Generated("com.googlecode.jsonschema2pojo") | ||
@JsonPropertyOrder({ | ||
"oi", | ||
"new", | ||
"remove" | ||
}) | ||
public class ObjectMetadataUpdate { | ||
|
||
/** | ||
* <p>Original spec-file type: ObjectIdentity</p> | ||
* <pre> | ||
* An object identifier. | ||
* Select an object by either: | ||
* One, and only one, of the numerical id or name of the workspace. | ||
* ws_id wsid - the numerical ID of the workspace. | ||
* ws_name workspace - the name of the workspace. | ||
* AND | ||
* One, and only one, of the numerical id or name of the object. | ||
* obj_id objid- the numerical ID of the object. | ||
* obj_name name - name of the object. | ||
* OPTIONALLY | ||
* obj_ver ver - the version of the object. | ||
* OR an object reference string: | ||
* obj_ref ref - an object reference string. | ||
* </pre> | ||
* | ||
*/ | ||
@JsonProperty("oi") | ||
private ObjectIdentity oi; | ||
@JsonProperty("new") | ||
private Map<String, String> _new; | ||
@JsonProperty("remove") | ||
private List<String> remove; | ||
private Map<java.lang.String, Object> additionalProperties = new HashMap<java.lang.String, Object>(); | ||
|
||
/** | ||
* <p>Original spec-file type: ObjectIdentity</p> | ||
* <pre> | ||
* An object identifier. | ||
* Select an object by either: | ||
* One, and only one, of the numerical id or name of the workspace. | ||
* ws_id wsid - the numerical ID of the workspace. | ||
* ws_name workspace - the name of the workspace. | ||
* AND | ||
* One, and only one, of the numerical id or name of the object. | ||
* obj_id objid- the numerical ID of the object. | ||
* obj_name name - name of the object. | ||
* OPTIONALLY | ||
* obj_ver ver - the version of the object. | ||
* OR an object reference string: | ||
* obj_ref ref - an object reference string. | ||
* </pre> | ||
* | ||
*/ | ||
@JsonProperty("oi") | ||
public ObjectIdentity getOi() { | ||
return oi; | ||
} | ||
|
||
/** | ||
* <p>Original spec-file type: ObjectIdentity</p> | ||
* <pre> | ||
* An object identifier. | ||
* Select an object by either: | ||
* One, and only one, of the numerical id or name of the workspace. | ||
* ws_id wsid - the numerical ID of the workspace. | ||
* ws_name workspace - the name of the workspace. | ||
* AND | ||
* One, and only one, of the numerical id or name of the object. | ||
* obj_id objid- the numerical ID of the object. | ||
* obj_name name - name of the object. | ||
* OPTIONALLY | ||
* obj_ver ver - the version of the object. | ||
* OR an object reference string: | ||
* obj_ref ref - an object reference string. | ||
* </pre> | ||
* | ||
*/ | ||
@JsonProperty("oi") | ||
public void setOi(ObjectIdentity oi) { | ||
this.oi = oi; | ||
} | ||
|
||
public ObjectMetadataUpdate withOi(ObjectIdentity oi) { | ||
this.oi = oi; | ||
return this; | ||
} | ||
|
||
@JsonProperty("new") | ||
public Map<String, String> getNew() { | ||
return _new; | ||
} | ||
|
||
@JsonProperty("new") | ||
public void setNew(Map<String, String> _new) { | ||
this._new = _new; | ||
} | ||
|
||
public ObjectMetadataUpdate withNew(Map<String, String> _new) { | ||
this._new = _new; | ||
return this; | ||
} | ||
|
||
@JsonProperty("remove") | ||
public List<String> getRemove() { | ||
return remove; | ||
} | ||
|
||
@JsonProperty("remove") | ||
public void setRemove(List<String> remove) { | ||
this.remove = remove; | ||
} | ||
|
||
public ObjectMetadataUpdate withRemove(List<String> remove) { | ||
this.remove = remove; | ||
return this; | ||
} | ||
|
||
@JsonAnyGetter | ||
public Map<java.lang.String, Object> getAdditionalProperties() { | ||
return this.additionalProperties; | ||
} | ||
|
||
@JsonAnySetter | ||
public void setAdditionalProperties(java.lang.String name, Object value) { | ||
this.additionalProperties.put(name, value); | ||
} | ||
|
||
@Override | ||
public java.lang.String toString() { | ||
return ((((((((("ObjectMetadataUpdate"+" [oi=")+ oi)+", _new=")+ _new)+", remove=")+ remove)+", additionalProperties=")+ additionalProperties)+"]"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the next class are compiled from an updated spec which isn't included in order to split the changes up into smaller chunks.