ionoscloud-cert-manager 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +70 -0
  4. data/LICENSE +201 -0
  5. data/README.md +2 -0
  6. data/Rakefile +10 -0
  7. data/docs/api/CertificatesApi.md +392 -0
  8. data/docs/api/InformationApi.md +226 -0
  9. data/docs/models/ApiInfoDto.md +21 -0
  10. data/docs/models/CertificateCollectionDto.md +29 -0
  11. data/docs/models/CertificateCollectionDtoLinks.md +21 -0
  12. data/docs/models/CertificateDto.md +25 -0
  13. data/docs/models/CertificatePatchDto.md +17 -0
  14. data/docs/models/CertificatePatchPropertiesDto.md +17 -0
  15. data/docs/models/CertificatePostDto.md +17 -0
  16. data/docs/models/CertificatePostPropertiesDto.md +23 -0
  17. data/docs/models/CertificatePropertiesDto.md +21 -0
  18. data/docs/models/ConfigPropertyDto.md +23 -0
  19. data/docs/models/ResourceMetadataDto.md +31 -0
  20. data/docs/summary.md +23 -0
  21. data/git_push.sh +56 -0
  22. data/ionoscloud-cert-manager.gemspec +38 -0
  23. data/lib/ionoscloud-cert-manager/api/certificates_api.rb +345 -0
  24. data/lib/ionoscloud-cert-manager/api/information_api.rb +193 -0
  25. data/lib/ionoscloud-cert-manager/api_client.rb +471 -0
  26. data/lib/ionoscloud-cert-manager/api_error.rb +57 -0
  27. data/lib/ionoscloud-cert-manager/configuration.rb +276 -0
  28. data/lib/ionoscloud-cert-manager/models/api_info_dto.rb +263 -0
  29. data/lib/ionoscloud-cert-manager/models/certificate_collection_dto.rb +334 -0
  30. data/lib/ionoscloud-cert-manager/models/certificate_collection_dto_links.rb +262 -0
  31. data/lib/ionoscloud-cert-manager/models/certificate_dto.rb +297 -0
  32. data/lib/ionoscloud-cert-manager/models/certificate_patch_dto.rb +231 -0
  33. data/lib/ionoscloud-cert-manager/models/certificate_patch_properties_dto.rb +231 -0
  34. data/lib/ionoscloud-cert-manager/models/certificate_post_dto.rb +231 -0
  35. data/lib/ionoscloud-cert-manager/models/certificate_post_properties_dto.rb +300 -0
  36. data/lib/ionoscloud-cert-manager/models/certificate_properties_dto.rb +262 -0
  37. data/lib/ionoscloud-cert-manager/models/config_property_dto.rb +295 -0
  38. data/lib/ionoscloud-cert-manager/models/resource_metadata_dto.rb +353 -0
  39. data/lib/ionoscloud-cert-manager/version.rb +15 -0
  40. data/lib/ionoscloud-cert-manager.rb +52 -0
  41. data/spec/api_client_spec.rb +226 -0
  42. data/spec/configuration_spec.rb +42 -0
  43. data/spec/spec_helper.rb +111 -0
  44. metadata +132 -0
@@ -0,0 +1,25 @@
1
+ # CertificateDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The certificate ID. | [optional][readonly] |
8
+ | **type** | **String** | The resource type. | [optional][readonly] |
9
+ | **href** | **String** | The URL to the object representation (absolute path). | [optional][readonly] |
10
+ | **metadata** | [**ResourceMetadataDto**](ResourceMetadataDto.md) | | [optional] |
11
+ | **properties** | [**CertificatePropertiesDto**](CertificatePropertiesDto.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ionoscloud-cert-manager'
17
+
18
+ instance = IonoscloudCertManager::CertificateDto.new(
19
+ id: 63f766c7-3f85-4d83-b528-8ddeec5b436c,
20
+ type: certificate,
21
+ href: https://api.ionos.com/certificatemanager/certificates/63f766c7-3f85-4d83-b528-8ddeec5b436c,
22
+ metadata: null,
23
+ properties: null
24
+ )
25
+ ```
@@ -0,0 +1,17 @@
1
+ # CertificatePatchDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **properties** | [**CertificatePatchPropertiesDto**](CertificatePatchPropertiesDto.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ionoscloud-cert-manager'
13
+
14
+ instance = IonoscloudCertManager::CertificatePatchDto.new(
15
+ properties: null
16
+ )
17
+ ```
@@ -0,0 +1,17 @@
1
+ # CertificatePatchPropertiesDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The certificate name. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ionoscloud-cert-manager'
13
+
14
+ instance = IonoscloudCertManager::CertificatePatchPropertiesDto.new(
15
+ name: My Certificate
16
+ )
17
+ ```
@@ -0,0 +1,17 @@
1
+ # CertificatePostDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **properties** | [**CertificatePostPropertiesDto**](CertificatePostPropertiesDto.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ionoscloud-cert-manager'
13
+
14
+ instance = IonoscloudCertManager::CertificatePostDto.new(
15
+ properties: null
16
+ )
17
+ ```
@@ -0,0 +1,23 @@
1
+ # CertificatePostPropertiesDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The certificate name. | |
8
+ | **certificate** | **String** | The certificate body. | |
9
+ | **certificate_chain** | **String** | The certificate chain. | |
10
+ | **private_key** | **String** | The RSA private key is used for authentication and symmetric key exchange when establishing an SSL session. It is a part of the public key infrastructure generally used with SSL certificates. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ionoscloud-cert-manager'
16
+
17
+ instance = IonoscloudCertManager::CertificatePostPropertiesDto.new(
18
+ name: My Certificate,
19
+ certificate: -----BEGIN CERTIFICATE-----MIIE5TCCAs2gAwIBAgIBATANBgkqhkiG9w0BAQsFADA2MQswCQYDVQQGEwJSTzEK-----END CERTIFICATE-----,
20
+ certificate_chain: -----BEGIN CERTIFICATE-----MIIDoTCCAokCFDrAUWffdxWJVz2Axl9lp/4xiUteMA0GCSqGSIb3DQEBCwUAMIGG-----END CERTIFICATE-----,
21
+ private_key: -----BEGIN RSA PRIVATE KEY-----MIIJKQIBAAKCAgEAzDehfqWBr+9q0pxwCDDRph7QSPiMbkDGaGKc+Fd2h3doT8Li-----END RSA PRIVATE KEY-----
22
+ )
23
+ ```
@@ -0,0 +1,21 @@
1
+ # CertificatePropertiesDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The certificate name. | [optional] |
8
+ | **certificate** | **String** | The certificate body. | [optional] |
9
+ | **certificate_chain** | **String** | Optional. The certificate chain. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ionoscloud-cert-manager'
15
+
16
+ instance = IonoscloudCertManager::CertificatePropertiesDto.new(
17
+ name: My Certificate,
18
+ certificate: -----BEGIN CERTIFICATE-----MIIE5TCCAs2gAwIBAgIBATANBgkqhkiG9w0BAQsFADA2MQswCQYDVQQGEwJSTzEK-----END CERTIFICATE-----,
19
+ certificate_chain: -----BEGIN CERTIFICATE-----MIIDoTCCAokCFDrAUWffdxWJVz2Axl9lp/4xiUteMA0GCSqGSIb3DQEBCwUAMIGG-----END CERTIFICATE-----
20
+ )
21
+ ```
@@ -0,0 +1,23 @@
1
+ # ConfigPropertyDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The property id. | [optional][readonly] |
8
+ | **name** | **String** | The property name. | |
9
+ | **value** | **String** | The property value. | |
10
+ | **description** | **String** | The property description. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ionoscloud-cert-manager'
16
+
17
+ instance = IonoscloudCertManager::ConfigPropertyDto.new(
18
+ id: null,
19
+ name: null,
20
+ value: null,
21
+ description: null
22
+ )
23
+ ```
@@ -0,0 +1,31 @@
1
+ # ResourceMetadataDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **etag** | **String** | The entity tag of the resource, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11. The entity tag is also added as an 'ETag' response header to requests that do not use the 'depth' parameter. | [optional][readonly] |
8
+ | **created_date** | **String** | The date the resource was created. | [optional][readonly] |
9
+ | **created_by** | **String** | The user who created the resource. | [optional][readonly] |
10
+ | **created_by_user_id** | **String** | The ID of the user who created the resource. | [optional][readonly] |
11
+ | **last_modified_date** | **String** | The date when the resource was last modified. | [optional][readonly] |
12
+ | **last_modified_by** | **String** | The user who last modified the resource. | [optional][readonly] |
13
+ | **last_modified_by_user_id** | **String** | The ID of the user who last modified the resource. | [optional][readonly] |
14
+ | **state** | **String** | The resource state. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ionoscloud-cert-manager'
20
+
21
+ instance = IonoscloudCertManager::ResourceMetadataDto.new(
22
+ etag: 45480eb3fbfc31f1d916c1eaa4abdcc3,
23
+ created_date: 2015-12-04T14:34:09.000Z,
24
+ created_by: user@example.com,
25
+ created_by_user_id: 45480eb3fbfc31f1d916c1eaa4abdcc3,
26
+ last_modified_date: 2015-12-04T14:34:09.000Z,
27
+ last_modified_by: user@example.com,
28
+ last_modified_by_user_id: 63cef532-26fe-4a64-a4e0-de7c8a506c90,
29
+ state: AVAILABLE
30
+ )
31
+ ```
data/docs/summary.md ADDED
@@ -0,0 +1,23 @@
1
+ # Table of contents
2
+
3
+ * [Introduction](README.md)
4
+ * [Changelog](CHANGELOG.md)
5
+
6
+ ## API
7
+
8
+ * [CertificatesApi](api/CertificatesApi.md)
9
+ * [InformationApi](api/InformationApi.md)
10
+
11
+ ## Models
12
+
13
+ * [ApiInfoDto](models/ApiInfoDto.md)
14
+ * [CertificateCollectionDto](models/CertificateCollectionDto.md)
15
+ * [CertificateCollectionDtoLinks](models/CertificateCollectionDtoLinks.md)
16
+ * [CertificateDto](models/CertificateDto.md)
17
+ * [CertificatePatchDto](models/CertificatePatchDto.md)
18
+ * [CertificatePatchPropertiesDto](models/CertificatePatchPropertiesDto.md)
19
+ * [CertificatePostDto](models/CertificatePostDto.md)
20
+ * [CertificatePostPropertiesDto](models/CertificatePostPropertiesDto.md)
21
+ * [CertificatePropertiesDto](models/CertificatePropertiesDto.md)
22
+ * [ConfigPropertyDto](models/ConfigPropertyDto.md)
23
+ * [ResourceMetadataDto](models/ResourceMetadataDto.md)
data/git_push.sh ADDED
@@ -0,0 +1,56 @@
1
+ #!/bin/sh
2
+
3
+
4
+ git_user_id=$1
5
+ git_repo_id=$2
6
+ release_note=$3
7
+ git_host=$4
8
+
9
+ if [ "$git_host" = "" ]; then
10
+ git_host="github.com"
11
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
12
+ fi
13
+
14
+ if [ "$git_user_id" = "" ]; then
15
+ git_user_id="ionos-cloud"
16
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
17
+ fi
18
+
19
+ if [ "$git_repo_id" = "" ]; then
20
+ git_repo_id="sdk-ruby-cert-manager"
21
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
22
+ fi
23
+
24
+ if [ "$release_note" = "" ]; then
25
+ release_note="Minor update"
26
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
27
+ fi
28
+
29
+ # Initialize the local directory as a Git repository
30
+ git init
31
+
32
+ # Adds the files in the local repository and stages them for commit.
33
+ git add .
34
+
35
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
36
+ git commit -m "$release_note"
37
+
38
+ # Sets the new remote
39
+ git_remote=`git remote`
40
+ if [ "$git_remote" = "" ]; then # git remote not defined
41
+
42
+ if [ "$GIT_TOKEN" = "" ]; then
43
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
44
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
45
+ else
46
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
47
+ fi
48
+
49
+ fi
50
+
51
+ git pull origin master
52
+
53
+ # Pushes (Forces) the changes in the local repository up to the remote repository
54
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
55
+ git push origin master 2>&1 | grep -v 'To https'
56
+
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Certificate Manager Service API
5
+
6
+ #Using the Certificate Manager Service, you can conveniently provision and manage SSL certificates with IONOS services and your internal connected resources. For the [Application Load Balancer](https://api.ionos.com/docs/cloud/v6/#Application-Load-Balancers-get-datacenters-datacenterId-applicationloadbalancers), you usually need a certificate to encrypt your HTTPS traffic. The service provides the basic functions of uploading and deleting your certificates for this purpose.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 5.2.1-SNAPSHOT
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "ionoscloud-cert-manager/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "ionoscloud-cert-manager"
20
+ s.version = IonoscloudCertManager::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["OpenAPI-Generator"]
23
+ s.email = [""]
24
+ s.homepage = "https://openapi-generator.tech"
25
+ s.summary = "Certificate Manager Service API Ruby Gem"
26
+ s.description = "Using the Certificate Manager Service, you can conveniently provision and manage SSL certificates with IONOS services and your internal connected resources. For the [Application Load Balancer](https://api.ionos.com/docs/cloud/v6/#Application-Load-Balancers-get-datacenters-datacenterId-applicationloadbalancers), you usually need a certificate to encrypt your HTTPS traffic. The service provides the basic functions of uploading and deleting your certificates for this purpose."
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 2.4"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+
32
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
+
34
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
35
+ s.test_files = `find spec/*`.split("\n")
36
+ s.executables = []
37
+ s.require_paths = ["lib"]
38
+ end
@@ -0,0 +1,345 @@
1
+ =begin
2
+ #Certificate Manager Service API
3
+
4
+ #Using the Certificate Manager Service, you can conveniently provision and manage SSL certificates with IONOS services and your internal connected resources. For the [Application Load Balancer](https://api.ionos.com/docs/cloud/v6/#Application-Load-Balancers-get-datacenters-datacenterId-applicationloadbalancers), you usually need a certificate to encrypt your HTTPS traffic. The service provides the basic functions of uploading and deleting your certificates for this purpose.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module IonoscloudCertManager
16
+ class CertificatesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a Certificate by ID
23
+ # Deletes a certificate specified by its ID.
24
+ # @param certificate_id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def certificates_delete(certificate_id, opts = {})
28
+ certificates_delete_with_http_info(certificate_id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete a Certificate by ID
33
+ # Deletes a certificate specified by its ID.
34
+ # @param certificate_id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def certificates_delete_with_http_info(certificate_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CertificatesApi.certificates_delete ...'
40
+ end
41
+ # verify the required parameter 'certificate_id' is set
42
+ if @api_client.config.client_side_validation && certificate_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'certificate_id' when calling CertificatesApi.certificates_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/certificatemanager/certificates/{certificateId}'.sub('{' + 'certificateId' + '}', CGI.escape(certificate_id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"CertificatesApi.certificates_delete",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: CertificatesApi#certificates_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Get Certificates
84
+ # Retrieves all available certificates.
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :offset &#39;Limit&#39; and &#39;Offset&#39; are optional; you can use these filter parameters to retrieve only part of the results obtained by a request. Offset is the first element (from the complete list of elements) to be included in the response.
87
+ # @option opts [String] :limit &#39;Limit&#39; and &#39;Offset&#39; are optional; you can use these filter parameters to retrieve only part of the results of a query. If both &#39;Offset&#39; and &#39;Limit&#39;are specified, the offset lines are skipped before counting the returned limit lines.
88
+ # @return [CertificateCollectionDto]
89
+ def certificates_get(opts = {})
90
+ data, _status_code, _headers = certificates_get_with_http_info(opts)
91
+ data
92
+ end
93
+
94
+ # Get Certificates
95
+ # Retrieves all available certificates.
96
+ # @param [Hash] opts the optional parameters
97
+ # @option opts [String] :offset &#39;Limit&#39; and &#39;Offset&#39; are optional; you can use these filter parameters to retrieve only part of the results obtained by a request. Offset is the first element (from the complete list of elements) to be included in the response.
98
+ # @option opts [String] :limit &#39;Limit&#39; and &#39;Offset&#39; are optional; you can use these filter parameters to retrieve only part of the results of a query. If both &#39;Offset&#39; and &#39;Limit&#39;are specified, the offset lines are skipped before counting the returned limit lines.
99
+ # @return [Array<(CertificateCollectionDto, Integer, Hash)>] CertificateCollectionDto data, response status code and response headers
100
+ def certificates_get_with_http_info(opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CertificatesApi.certificates_get ...'
103
+ end
104
+ # resource path
105
+ local_var_path = '/certificatemanager/certificates'
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
110
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type] || 'CertificateCollectionDto'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"CertificatesApi.certificates_get",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: CertificatesApi#certificates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Get a Certificate by ID
147
+ # Retrieves a certificate specified by its ID.
148
+ # @param certificate_id [String]
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [CertificateDto]
151
+ def certificates_get_by_id(certificate_id, opts = {})
152
+ data, _status_code, _headers = certificates_get_by_id_with_http_info(certificate_id, opts)
153
+ data
154
+ end
155
+
156
+ # Get a Certificate by ID
157
+ # Retrieves a certificate specified by its ID.
158
+ # @param certificate_id [String]
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(CertificateDto, Integer, Hash)>] CertificateDto data, response status code and response headers
161
+ def certificates_get_by_id_with_http_info(certificate_id, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: CertificatesApi.certificates_get_by_id ...'
164
+ end
165
+ # verify the required parameter 'certificate_id' is set
166
+ if @api_client.config.client_side_validation && certificate_id.nil?
167
+ fail ArgumentError, "Missing the required parameter 'certificate_id' when calling CertificatesApi.certificates_get_by_id"
168
+ end
169
+ # resource path
170
+ local_var_path = '/certificatemanager/certificates/{certificateId}'.sub('{' + 'certificateId' + '}', CGI.escape(certificate_id.to_s))
171
+
172
+ # query parameters
173
+ query_params = opts[:query_params] || {}
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = opts[:form_params] || {}
182
+
183
+ # http body (model)
184
+ post_body = opts[:debug_body]
185
+
186
+ # return_type
187
+ return_type = opts[:debug_return_type] || 'CertificateDto'
188
+
189
+ # auth_names
190
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
191
+
192
+ new_options = opts.merge(
193
+ :operation => :"CertificatesApi.certificates_get_by_id",
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => return_type
200
+ )
201
+
202
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: CertificatesApi#certificates_get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+
209
+ # Update a Certificate Name by ID
210
+ # Updates the name of the specified certificate.
211
+ # @param certificate_id [String]
212
+ # @param certificate_patch_dto [CertificatePatchDto]
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [CertificateDto]
215
+ def certificates_patch(certificate_id, certificate_patch_dto, opts = {})
216
+ data, _status_code, _headers = certificates_patch_with_http_info(certificate_id, certificate_patch_dto, opts)
217
+ data
218
+ end
219
+
220
+ # Update a Certificate Name by ID
221
+ # Updates the name of the specified certificate.
222
+ # @param certificate_id [String]
223
+ # @param certificate_patch_dto [CertificatePatchDto]
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [Array<(CertificateDto, Integer, Hash)>] CertificateDto data, response status code and response headers
226
+ def certificates_patch_with_http_info(certificate_id, certificate_patch_dto, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: CertificatesApi.certificates_patch ...'
229
+ end
230
+ # verify the required parameter 'certificate_id' is set
231
+ if @api_client.config.client_side_validation && certificate_id.nil?
232
+ fail ArgumentError, "Missing the required parameter 'certificate_id' when calling CertificatesApi.certificates_patch"
233
+ end
234
+ # verify the required parameter 'certificate_patch_dto' is set
235
+ if @api_client.config.client_side_validation && certificate_patch_dto.nil?
236
+ fail ArgumentError, "Missing the required parameter 'certificate_patch_dto' when calling CertificatesApi.certificates_patch"
237
+ end
238
+ # resource path
239
+ local_var_path = '/certificatemanager/certificates/{certificateId}'.sub('{' + 'certificateId' + '}', CGI.escape(certificate_id.to_s))
240
+
241
+ # query parameters
242
+ query_params = opts[:query_params] || {}
243
+
244
+ # header parameters
245
+ header_params = opts[:header_params] || {}
246
+ # HTTP header 'Accept' (if needed)
247
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
248
+ # HTTP header 'Content-Type'
249
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
250
+
251
+ # form parameters
252
+ form_params = opts[:form_params] || {}
253
+
254
+ # http body (model)
255
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(certificate_patch_dto)
256
+
257
+ # return_type
258
+ return_type = opts[:debug_return_type] || 'CertificateDto'
259
+
260
+ # auth_names
261
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
262
+
263
+ new_options = opts.merge(
264
+ :operation => :"CertificatesApi.certificates_patch",
265
+ :header_params => header_params,
266
+ :query_params => query_params,
267
+ :form_params => form_params,
268
+ :body => post_body,
269
+ :auth_names => auth_names,
270
+ :return_type => return_type
271
+ )
272
+
273
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: CertificatesApi#certificates_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+
280
+ # Add a New Certificate
281
+ # Adds a new PEM (Privacy Enhanced Mail) file that is used to store SSL certificates and their associated private keys.
282
+ # @param certificate_post_dto [CertificatePostDto]
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [CertificateDto]
285
+ def certificates_post(certificate_post_dto, opts = {})
286
+ data, _status_code, _headers = certificates_post_with_http_info(certificate_post_dto, opts)
287
+ data
288
+ end
289
+
290
+ # Add a New Certificate
291
+ # Adds a new PEM (Privacy Enhanced Mail) file that is used to store SSL certificates and their associated private keys.
292
+ # @param certificate_post_dto [CertificatePostDto]
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [Array<(CertificateDto, Integer, Hash)>] CertificateDto data, response status code and response headers
295
+ def certificates_post_with_http_info(certificate_post_dto, opts = {})
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug 'Calling API: CertificatesApi.certificates_post ...'
298
+ end
299
+ # verify the required parameter 'certificate_post_dto' is set
300
+ if @api_client.config.client_side_validation && certificate_post_dto.nil?
301
+ fail ArgumentError, "Missing the required parameter 'certificate_post_dto' when calling CertificatesApi.certificates_post"
302
+ end
303
+ # resource path
304
+ local_var_path = '/certificatemanager/certificates'
305
+
306
+ # query parameters
307
+ query_params = opts[:query_params] || {}
308
+
309
+ # header parameters
310
+ header_params = opts[:header_params] || {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+ # HTTP header 'Content-Type'
314
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(certificate_post_dto)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'CertificateDto'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"CertificatesApi.certificates_post",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: CertificatesApi#certificates_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
344
+ end
345
+ end