com.ibm.streamsx.rest.internal.icp4d

Class JobDescription

  • java.lang.Object
    • com.ibm.streamsx.rest.internal.icp4d.JobDescription


  • public class JobDescription
    extends java.lang.Object
    This class represents a Job REST resource from the /v2/jobs API of the CP4D.
    Since:
    1.17
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      protected static class  Element.ElementArray<E extends com.ibm.streamsx.rest.internal.icp4d.Element>
      internal usage to get the list of elements
      class  JobDescription.Entity
      entity substructure "entity": { "job": { "asset_ref_type": "streams", "configuration": { "application": "https://cluster.ip/v2/asset_files/jobs/19561431-e6bd-4bfa-8f71-630821ed4e14/View.ConflictingAttributes.sab?space_id=66d50216-6048-4619-81cc-a2f38fa70fdb", "env_type": "streams", "env_variables": [], "streamsInstance": "sample-streams" }, "last_run_initiator": "None", "last_run_status": "None", "last_run_status_timestamp": 0, "last_run_time": "", "space_name": "sample-streams.nbgr55" } }
      static class  JobDescription.MetaData
      metadata sub-structure "metadata": { "asset_id": "19561431-e6bd-4bfa-8f71-630821ed4e14", "description": "jobs for test", "name": "python job", "owner_id": "1000330999", "version": 0 }
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected static com.google.gson.Gson gson 
      static java.lang.String STREAMS_ASSET_REF_TYPE
      Streams jobs must have this asset refernce type.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JobDescription() 
    • Field Detail

      • STREAMS_ASSET_REF_TYPE

        public static final java.lang.String STREAMS_ASSET_REF_TYPE
        Streams jobs must have this asset refernce type.
        See Also:
        Constant Field Values
      • gson

        protected static final com.google.gson.Gson gson
    • Constructor Detail

      • JobDescription

        public JobDescription()
    • Method Detail

      • isStreamsJob

        public boolean isStreamsJob()
        returns true, if the asset_ref_type of the entity is "streams", i.e. if this is a Streams job.
        Returns:
        true, when asset_ref_type == "streams", false otherwise
      • getName

        public java.lang.String getName()
        Returns the name of the job. Convenience method for getMetadata().getName()
        Returns:
        the name of the job
      • getAssetId

        public java.lang.String getAssetId()
        Returns the asset_id of the job, something like "19561431-e6bd-4bfa-8f71-630821ed4e14" Convenience method for getMetadata().getAsset_id();
        Returns:
        the asset_id
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • createList

        protected static final <E extends com.ibm.streamsx.rest.internal.icp4d.Element,A extends Element.ElementArray<E>> java.util.List<E> createList(AbstractConnection sc,
                                                                                                                                                       java.lang.String uri,
                                                                                                                                                       java.lang.Class<A> arrayClass)
                                                                                                                                                throws java.io.IOException
        Throws:
        java.io.IOException
streamsx.topology 2.1 @ IBMStreams GitHub