Skip to content

Commit 14e92db

Browse files
committed
Version 1.0.4 - version update
1 parent cf9a05c commit 14e92db

File tree

4 files changed

+205
-0
lines changed

4 files changed

+205
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
14+
15+
/**
16+
* Certificate templates configuration.
17+
*/
18+
public class CertificateTemplatesConfig extends GetConfigElementsResourcesItem {
19+
20+
}
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/**
18+
* Certificate templates configuration.
19+
*/
20+
public class CertificateTemplatesConfigItem extends GenericModel {
21+
22+
/**
23+
* The type of configuration. Value options differ depending on the `config_element` property that you want to define.
24+
*/
25+
public interface Type {
26+
/**
27+
* letsencrypt.
28+
*/
29+
String LETSENCRYPT = "letsencrypt";
30+
/**
31+
* letsencrypt-stage.
32+
*/
33+
String LETSENCRYPT_STAGE = "letsencrypt-stage";
34+
/**
35+
* cis.
36+
*/
37+
String CIS = "cis";
38+
/**
39+
* classic_infrastructure.
40+
*/
41+
String CLASSIC_INFRASTRUCTURE = "classic_infrastructure";
42+
/**
43+
* root_certificate_authority.
44+
*/
45+
String ROOT_CERTIFICATE_AUTHORITY = "root_certificate_authority";
46+
/**
47+
* intermediate_certificate_authority.
48+
*/
49+
String INTERMEDIATE_CERTIFICATE_AUTHORITY = "intermediate_certificate_authority";
50+
/**
51+
* certificate_template.
52+
*/
53+
String CERTIFICATE_TEMPLATE = "certificate_template";
54+
}
55+
56+
protected String name;
57+
protected String type;
58+
protected CertificateTemplateConfig config;
59+
60+
/**
61+
* Gets the name.
62+
* <p>
63+
* The human-readable name to assign to your configuration.
64+
*
65+
* @return the name
66+
*/
67+
public String getName() {
68+
return name;
69+
}
70+
71+
/**
72+
* Gets the type.
73+
* <p>
74+
* The type of configuration. Value options differ depending on the `config_element` property that you want to define.
75+
*
76+
* @return the type
77+
*/
78+
public String getType() {
79+
return type;
80+
}
81+
82+
/**
83+
* Gets the config.
84+
* <p>
85+
* Properties that describe a certificate template. You can use a certificate template to control the parameters that
86+
* are applied to your issued private certificates. For more information, see the
87+
* [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-certificate-templates).
88+
*
89+
* @return the config
90+
*/
91+
public CertificateTemplateConfig getConfig() {
92+
return config;
93+
}
94+
}
95+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
15+
16+
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
17+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.CertificateTemplateConfig;
18+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.CertificateTemplatesConfigItem;
19+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.utils.TestUtilities;
20+
21+
import java.io.InputStream;
22+
import java.util.ArrayList;
23+
import java.util.Arrays;
24+
import java.util.HashMap;
25+
import java.util.List;
26+
27+
import org.testng.annotations.Test;
28+
29+
import static org.testng.Assert.*;
30+
31+
/**
32+
* Unit test class for the CertificateTemplatesConfigItem model.
33+
*/
34+
public class CertificateTemplatesConfigItemTest {
35+
final HashMap<String, InputStream> mockStreamMap = TestUtilities.createMockStreamMap();
36+
final List<FileWithMetadata> mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata();
37+
38+
@Test
39+
public void testCertificateTemplatesConfigItem() throws Throwable {
40+
CertificateTemplatesConfigItem certificateTemplatesConfigItemModel = new CertificateTemplatesConfigItem();
41+
assertNull(certificateTemplatesConfigItemModel.getName());
42+
assertNull(certificateTemplatesConfigItemModel.getType());
43+
assertNull(certificateTemplatesConfigItemModel.getConfig());
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
15+
16+
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
17+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.CertificateTemplateConfig;
18+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.CertificateTemplatesConfig;
19+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model.CertificateTemplatesConfigItem;
20+
import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.utils.TestUtilities;
21+
22+
import java.io.InputStream;
23+
import java.util.ArrayList;
24+
import java.util.Arrays;
25+
import java.util.HashMap;
26+
import java.util.List;
27+
28+
import org.testng.annotations.Test;
29+
30+
import static org.testng.Assert.*;
31+
32+
/**
33+
* Unit test class for the CertificateTemplatesConfig model.
34+
*/
35+
public class CertificateTemplatesConfigTest {
36+
final HashMap<String, InputStream> mockStreamMap = TestUtilities.createMockStreamMap();
37+
final List<FileWithMetadata> mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata();
38+
39+
@Test
40+
public void testCertificateTemplatesConfig() throws Throwable {
41+
CertificateTemplatesConfig certificateTemplatesConfigModel = new CertificateTemplatesConfig();
42+
assertNull(certificateTemplatesConfigModel.getCertificateTemplates());
43+
}
44+
}

0 commit comments

Comments
 (0)