Skip to content

Commit

Permalink
version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
formainframe committed Jun 15, 2021
1 parent 9a972b4 commit d162076
Show file tree
Hide file tree
Showing 50 changed files with 1,672 additions and 303 deletions.
478 changes: 277 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.4.30'
Expand Down Expand Up @@ -30,6 +40,11 @@ repositories {
mavenCentral()
}

task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.21"
Expand All @@ -47,12 +62,6 @@ test {
useJUnitPlatform()
}


task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
Expand Down
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# This program and the accompanying materials are made available under the terms of the
# Eclipse Public License v2.0 which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright © 2021 IBA Group, a.s.
#

kotlin.code.style=official

ossrhUsername=formainframe
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

rootProject.name = 'zosmf-retrofit2'

10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/BytesConverterFactory.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import okhttp3.ResponseBody
Expand Down
48 changes: 48 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/CancelJobPurgeOutRequest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName

data class CancelJobPurgeOutRequest(
@SerializedName("jobid")
@Expose
var jobid: String? = null,

@SerializedName("jobname")
@Expose
var jobname: String? = null,

@SerializedName("original-jobid")
@Expose
var originalJobid: String? = null,

@SerializedName("owner")
@Expose
var owner: String? = null,

@SerializedName("member")
@Expose
var member: String? = null,

@SerializedName("sysname")
@Expose
var sysname: String? = null,

@SerializedName("job-correlator")
@Expose
var jobCorrelator: String? = null,

@SerializedName("status")
@Expose
var status: String? = null
)
48 changes: 48 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/CancelJobRequest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName

data class CancelJobRequest(
@SerializedName("jobid")
@Expose
var jobid: String? = null,

@SerializedName("jobname")
@Expose
var jobname: String? = null,

@SerializedName("original-jobid")
@Expose
var originalJobid: String? = null,

@SerializedName("owner")
@Expose
var owner: String? = null,

@SerializedName("member")
@Expose
var member: String? = null,

@SerializedName("sysname")
@Expose
var sysname: String? = null,

@SerializedName("job-correlator")
@Expose
var jobCorrelator: String? = null,

@SerializedName("status")
@Expose
var status: String? = null
)
10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/CopyData.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
Expand Down
30 changes: 27 additions & 3 deletions src/main/kotlin/eu/ibagroup/r2z/CreateDataset.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
import eu.ibagroup.r2z.annotations.AvailableSince
import eu.ibagroup.r2z.annotations.ZVersion

data class CreateDataset(
@SerializedName("volser")
Expand All @@ -18,7 +30,7 @@ data class CreateDataset(

@SerializedName("alcunit")
@Expose
var allocationUnit : AllocationUnit,
var allocationUnit : AllocationUnit? = null,

@SerializedName("primary")
var primaryAllocation: Int,
Expand All @@ -43,7 +55,7 @@ data class CreateDataset(
@Expose
var recordLength: Int? = null,

@SerializedName("storeclass")
@SerializedName("storclass")
@Expose
var storageClass: String? = null,

Expand All @@ -53,15 +65,27 @@ data class CreateDataset(

@SerializedName("dataclass")
@Expose
var dataClass: String? = null
var dataClass: String? = null,

@SerializedName("avgblk")
var averageBlockLength: Int? = null,

@SerializedName("dsntype")
@Expose
var dsnType: DsnameType? = null,

@AvailableSince(ZVersion.ZOS_2_4)
@SerializedName("like")
@Expose
var datasetModel: String? = null
)

enum class AllocationUnit(private val type : String) {
@SerializedName("TRK")
TRK("TRK"),
@SerializedName("CYL")
CYL("CYL"),
@Deprecated("This one doesn't work in z/OSMF. Just to simplify For Mainframe plugin")
@SerializedName("BLK")
BLK("BLK");

Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/CreateUssFile.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
Expand Down
37 changes: 30 additions & 7 deletions src/main/kotlin/eu/ibagroup/r2z/DataAPI.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import eu.ibagroup.r2z.annotations.AvailableSince
import eu.ibagroup.r2z.annotations.ZVersion
import retrofit2.Call
import retrofit2.http.*

Expand Down Expand Up @@ -352,7 +364,6 @@ interface DataAPI {
@Query("research") research: String? = null,
@Query("insensitive") insensitive: Boolean? = null,
@Query("maxreturnsize") maxReturnSize: Int? = null

): Call<String>

@PUT("/zosmf/restfiles/fs/{filepath-name}")
Expand Down Expand Up @@ -452,7 +463,6 @@ enum class XIBMOption(private val type: String = "recursive") {
}



enum class XIBMObtainENQ(private val type: String) {

EXCL("excl"),
Expand Down Expand Up @@ -494,14 +504,27 @@ data class XIBMRecordRange(private val format: Format, private val sss: Int, pri

}

enum class XIBMDataType(private val type: String) {
private const val codePagePrefix = "IBM-"

enum class CodePage(val codePage: String) {
IBM_1025("${codePagePrefix}1025"),
IBM_1047("${codePagePrefix}1047")
}

data class XIBMDataType(
val type: Type,
@AvailableSince(ZVersion.ZOS_2_4) val encoding: CodePage? = null
) {

enum class Type(val value: String) {
TEXT("text"),
BINARY("binary"),
RECORD("record")
}

TEXT("text"),
BINARY("binary"),
RECORD("record");

override fun toString(): String {
return type
return if (encoding != null) "${type.value};fileEncoding=${encoding.codePage}" else type.value
}


Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/DataSetsList.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/Dataset.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/eu/ibagroup/r2z/HUtils.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright © 2021 IBA Group, a.s.
*/

package eu.ibagroup.r2z

import com.google.gson.annotations.Expose
Expand Down
Loading

0 comments on commit d162076

Please sign in to comment.