github.com/optim-corp/cios-golang-sdk@v0.5.1/openapi/components/deviceasset-component.openapi.yml (about)

     1  openapi: 3.0.3
     2  info:
     3    title: Device Asset Component
     4    description: Component
     5    version: 1.0.0
     6  
     7  paths: {}
     8  
     9  components:
    10    schemas:
    11      MultipleDeviceModel:
    12        required:
    13          - total
    14          - models
    15        properties:
    16          total:
    17            type: integer
    18            format: int64
    19          models:
    20            type: array
    21            items:
    22              $ref: '#/components/schemas/DeviceModel'
    23      SingleDeviceModel:
    24        required:
    25          - model
    26        properties:
    27          model:
    28            $ref: '#/components/schemas/DeviceModel'
    29      DeviceModel:
    30        required:
    31          - id
    32          - name
    33          - resource_owner_id
    34          - created_at
    35          - updated_at
    36        type: object
    37        properties:
    38          id:
    39            type: string
    40          name:
    41            type: string
    42          resource_owner_id:
    43            type: string
    44            format: uuid
    45          maker_id:
    46            type: string
    47            nullable: true
    48          version:
    49            type: string
    50            nullable: true
    51          watch:
    52            $ref: '#/components/schemas/Watch'
    53          components:
    54            $ref: '#/components/schemas/ConstitutionComponent'
    55          created_at:
    56            type: string
    57            description: ナノ秒
    58          updated_at:
    59            type: string
    60            description: ナノ秒
    61      DeviceModelRequest:
    62        required:
    63          - name
    64          - resource_owner_id
    65        type: object
    66        properties:
    67          name:
    68            type: string
    69          resource_owner_id:
    70            type: string
    71            format: uuid
    72          maker_id:
    73            type: string
    74            format: uuid
    75          version:
    76            type: string
    77          watch:
    78            $ref: '#/components/schemas/Watch'
    79          components:
    80            $ref: '#/components/schemas/ConstitutionComponent'
    81      DeviceModelUpdateRequest:
    82        type: object
    83        properties:
    84          name:
    85            type: string
    86          resource_owner_id:
    87            type: string
    88            format: uuid
    89          maker_id:
    90            type: string
    91            format: uuid
    92          version:
    93            type: string
    94          watch:
    95            type: object
    96            properties:
    97              types:
    98                type: object
    99                properties:
   100                  unit:
   101                    type: array
   102                    items:
   103                      type: string
   104                  parts:
   105                    items:
   106                      type: string
   107              component_ids:
   108                type: object
   109          components:
   110            type: array
   111            items:
   112              $ref: '#/components/schemas/ConstitutionComponent'
   113      MultipleConstitutionComponent:
   114        type: object
   115        properties:
   116          total:
   117            type: integer
   118            format: int64
   119          components:
   120            type: array
   121            items:
   122              $ref: '#/components/schemas/ConstitutionComponent'
   123      ConstitutionComponent:
   124        type: object
   125        properties:
   126          id:
   127            type: string
   128          parent_id:
   129            nullable: true
   130            type: string
   131          address:
   132            nullable: true
   133            type: string
   134          type:
   135            $ref: './device-component.openapi.yml#/components/schemas/ComponentTypeEnum'
   136          attribute:
   137            nullable: true
   138            type: object
   139            example:
   140              model: RASOU001
   141              serialNo: 1234567890
   142              usage_start_date: 1575903600000000000
   143          display_info:
   144            type: array
   145            items:
   146              $ref: './general.yml#/components/schemas/DisplayInfo'
   147          components:
   148            nullable: true
   149            type: array
   150            items:
   151              $ref: '#/components/schemas/ConstitutionComponent'
   152      MultipleDeviceModelEntity:
   153        type: object
   154        required:
   155          - total
   156          - entities
   157        properties:
   158          total:
   159            type: integer
   160            format: int64
   161          entities:
   162            type: array
   163            items:
   164              $ref: '#/components/schemas/DeviceModelsEntity'
   165      SingleDeviceModelsEntity:
   166        type: object
   167        required:
   168          - entity
   169        properties:
   170          entity:
   171            $ref: '#/components/schemas/DeviceModelsEntity'
   172      DeviceModelsEntity:
   173        type: object
   174        required:
   175          - id
   176          - device_id
   177          - key
   178          - model
   179          - resource_owner_id
   180          - created_at
   181          - updated_at
   182        properties:
   183          id:
   184            type: string
   185          key:
   186            type: string
   187          device_id:
   188            type: string
   189          model:
   190            type: object
   191            required:
   192              - id
   193              - name
   194              - created_at
   195              - updated_at
   196            properties:
   197              id:
   198                type: string
   199              name:
   200                type: string
   201              key:
   202                type: string
   203              maker_id:
   204                type: string
   205              version:
   206                type: string
   207              created_at:
   208                type: string
   209                description: ナノ秒
   210              updated_at:
   211                type: string
   212                description: ナノ秒
   213          serial_number:
   214            type: string
   215          start_at:
   216            nullable: true
   217            type: string
   218            description: ナノ秒
   219          custom_inventory:
   220            type: array
   221            items:
   222              type: object
   223              example:
   224                001: bnu4hbnrmflais1m02e1
   225                002: bnu4hbnrmflais1m02e2
   226                003: bnu4hbnrmflais1m02e3
   227                004: bnu4hbnrmflais1m02e4
   228                005: bnu4hbnrmflais1m02e5
   229                006: bnu4hbnrmflais1m02e6
   230                007: bnu4hbnrmflais1m02e7
   231                008: bnu4hbnrmflais1m02e8
   232                009: bnu4hbnrmflais1m02e9
   233                010: bnu4hbnrmflais1m02e0
   234          resource_owner_id:
   235            type: string
   236          watch:
   237            $ref: '#/components/schemas/Watch'
   238          components:
   239            $ref: '#/components/schemas/DeviceEntitiesComponent'
   240          created_at:
   241            type: string
   242          updated_at:
   243            type: string
   244      MultipleDeviceEntitiesComponent:
   245        required:
   246          - total
   247          - components
   248        type: object
   249        properties:
   250          total:
   251            type: integer
   252            format: int64
   253          components:
   254            type: array
   255            items:
   256              $ref: '#/components/schemas/DeviceEntitiesComponent'
   257      SingleDeviceEntitiesComponent:
   258        type: object
   259        required:
   260          - component
   261        properties:
   262          component:
   263            $ref: '#/components/schemas/DeviceEntitiesComponent'
   264      DeviceEntitiesComponent:
   265        type: object
   266        nullable: true
   267        required:
   268          - id
   269          - type
   270        properties:
   271          id:
   272            type: string
   273          type:
   274            $ref: "./device-component.openapi.yml#/components/schemas/ComponentTypeEnum"
   275          parent_id:
   276            type: string
   277          attribute:
   278            type: object
   279          display_info:
   280            type: array
   281            items:
   282              $ref: './general.yml#/components/schemas/DisplayInfo'
   283          components:
   284            type: array
   285            items:
   286              $ref: '#/components/schemas/DeviceEntitiesComponent'
   287      DeviceEntitiesComponentUpdateRequest:
   288        type: object
   289        properties:
   290          type:
   291            type: string
   292          parent_id:
   293            type: string
   294          attribute:
   295            type: object
   296            example:
   297              parts_id: parts0001
   298              serial_number: x00001
   299          display_info:
   300            $ref: './general.yml#/components/schemas/DisplayInfo'
   301      MultipleLifeCycle:
   302        type: object
   303        required:
   304          - total
   305          - lifecycles
   306        properties:
   307          total:
   308            type: integer
   309            format: int64
   310          lifecycles:
   311            type: array
   312            items:
   313              $ref: '#/components/schemas/LifeCycle'
   314      SingleLifeCycle:
   315        type: object
   316        required:
   317          - lifecycle
   318        properties:
   319          lifecycle:
   320            $ref: '#/components/schemas/LifeCycle'
   321  
   322      LifeCycleRequest:
   323        type: object
   324        required:
   325          - event_at
   326          - event_kind
   327          - event_mode
   328          - event_type
   329        properties:
   330          event_kind:
   331            type: string
   332          event_mode:
   333            type: string
   334          event_type:
   335            type: string
   336          before_id:
   337            type: string
   338          before_component:
   339            $ref: '#/components/schemas/DeviceEntitiesComponent'
   340          after_id:
   341            type: string
   342          after_component:
   343            $ref: '#/components/schemas/DeviceEntitiesComponent'
   344          event_at:
   345            type: string
   346            description: ナノ秒
   347          note:
   348            type: string
   349          resource_owner_id:
   350            type: string
   351      LifeCycle:
   352        type: object
   353        required:
   354          - id
   355          - event_at
   356          - event_kind
   357          - event_mode
   358          - event_type
   359          - resource_owner_id
   360        properties:
   361          id:
   362            type: string
   363          event_kind:
   364            type: string
   365          event_mode:
   366            type: string
   367          event_type:
   368            type: string
   369          before_id:
   370            type: string
   371          before_component:
   372            $ref: '#/components/schemas/DeviceEntitiesComponent'
   373          after_id:
   374            type: string
   375          after_component:
   376            $ref: '#/components/schemas/DeviceEntitiesComponent'
   377          event_at:
   378            type: string
   379            description: ナノ秒
   380          note:
   381            type: string
   382          resource_owner_id:
   383            type: string
   384      Watch:
   385        type: object
   386        nullable: true
   387        properties:
   388          types:
   389            nullable: true
   390            type: object
   391          component_ids:
   392            nullable: true
   393            type: object
   394            example:
   395              0x0010: [ "unitSerialNo", "unitStatus", "commandValue" ]