ionoscloud-container-registry 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) 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 +54 -0
  6. data/Rakefile +10 -0
  7. data/docs/api/LocationsApi.md +78 -0
  8. data/docs/api/NamesApi.md +82 -0
  9. data/docs/api/RegistriesApi.md +470 -0
  10. data/docs/api/RepositoriesApi.md +84 -0
  11. data/docs/api/TokensApi.md +478 -0
  12. data/docs/models/ApiErrorMessage.md +20 -0
  13. data/docs/models/ApiErrorResponse.md +20 -0
  14. data/docs/models/ApiResourceMetadata.md +30 -0
  15. data/docs/models/Credentials.md +20 -0
  16. data/docs/models/Day.md +15 -0
  17. data/docs/models/Location.md +18 -0
  18. data/docs/models/LocationsResponse.md +24 -0
  19. data/docs/models/PaginationLinks.md +22 -0
  20. data/docs/models/PatchRegistryInput.md +18 -0
  21. data/docs/models/PatchTokenInput.md +22 -0
  22. data/docs/models/PostRegistryInput.md +18 -0
  23. data/docs/models/PostRegistryOutput.md +26 -0
  24. data/docs/models/PostRegistryProperties.md +22 -0
  25. data/docs/models/PostTokenInput.md +18 -0
  26. data/docs/models/PostTokenOutput.md +26 -0
  27. data/docs/models/PostTokenProperties.md +24 -0
  28. data/docs/models/PutRegistryInput.md +18 -0
  29. data/docs/models/PutRegistryOutput.md +26 -0
  30. data/docs/models/PutTokenInput.md +18 -0
  31. data/docs/models/PutTokenOutput.md +26 -0
  32. data/docs/models/RegistriesResponse.md +30 -0
  33. data/docs/models/RegistryProperties.md +26 -0
  34. data/docs/models/RegistryResponse.md +26 -0
  35. data/docs/models/Scope.md +22 -0
  36. data/docs/models/StorageUsage.md +20 -0
  37. data/docs/models/TokenProperties.md +26 -0
  38. data/docs/models/TokenResponse.md +26 -0
  39. data/docs/models/TokensResponse.md +34 -0
  40. data/docs/models/WeeklySchedule.md +20 -0
  41. data/docs/summary.md +44 -0
  42. data/git_push.sh +56 -0
  43. data/ionoscloud-container-registry.gemspec +38 -0
  44. data/lib/ionoscloud-container-registry/api/locations_api.rb +77 -0
  45. data/lib/ionoscloud-container-registry/api/names_api.rb +90 -0
  46. data/lib/ionoscloud-container-registry/api/registries_api.rb +439 -0
  47. data/lib/ionoscloud-container-registry/api/repositories_api.rb +99 -0
  48. data/lib/ionoscloud-container-registry/api/tokens_api.rb +500 -0
  49. data/lib/ionoscloud-container-registry/api_client.rb +471 -0
  50. data/lib/ionoscloud-container-registry/api_error.rb +57 -0
  51. data/lib/ionoscloud-container-registry/configuration.rb +276 -0
  52. data/lib/ionoscloud-container-registry/models/api_error_message.rb +237 -0
  53. data/lib/ionoscloud-container-registry/models/api_error_response.rb +233 -0
  54. data/lib/ionoscloud-container-registry/models/api_resource_metadata.rb +293 -0
  55. data/lib/ionoscloud-container-registry/models/credentials.rb +237 -0
  56. data/lib/ionoscloud-container-registry/models/day.rb +42 -0
  57. data/lib/ionoscloud-container-registry/models/location.rb +218 -0
  58. data/lib/ionoscloud-container-registry/models/locations_response.rb +246 -0
  59. data/lib/ionoscloud-container-registry/models/pagination_links.rb +251 -0
  60. data/lib/ionoscloud-container-registry/models/patch_registry_input.rb +219 -0
  61. data/lib/ionoscloud-container-registry/models/patch_token_input.rb +272 -0
  62. data/lib/ionoscloud-container-registry/models/post_registry_input.rb +223 -0
  63. data/lib/ionoscloud-container-registry/models/post_registry_output.rb +256 -0
  64. data/lib/ionoscloud-container-registry/models/post_registry_properties.rb +268 -0
  65. data/lib/ionoscloud-container-registry/models/post_token_input.rb +223 -0
  66. data/lib/ionoscloud-container-registry/models/post_token_output.rb +256 -0
  67. data/lib/ionoscloud-container-registry/models/post_token_properties.rb +316 -0
  68. data/lib/ionoscloud-container-registry/models/put_registry_input.rb +223 -0
  69. data/lib/ionoscloud-container-registry/models/put_registry_output.rb +256 -0
  70. data/lib/ionoscloud-container-registry/models/put_token_input.rb +223 -0
  71. data/lib/ionoscloud-container-registry/models/put_token_output.rb +256 -0
  72. data/lib/ionoscloud-container-registry/models/registries_response.rb +288 -0
  73. data/lib/ionoscloud-container-registry/models/registry_properties.rb +287 -0
  74. data/lib/ionoscloud-container-registry/models/registry_response.rb +256 -0
  75. data/lib/ionoscloud-container-registry/models/scope.rb +247 -0
  76. data/lib/ionoscloud-container-registry/models/storage_usage.rb +229 -0
  77. data/lib/ionoscloud-container-registry/models/token_properties.rb +326 -0
  78. data/lib/ionoscloud-container-registry/models/token_response.rb +256 -0
  79. data/lib/ionoscloud-container-registry/models/tokens_response.rb +316 -0
  80. data/lib/ionoscloud-container-registry/models/weekly_schedule.rb +234 -0
  81. data/lib/ionoscloud-container-registry/version.rb +15 -0
  82. data/lib/ionoscloud-container-registry.rb +73 -0
  83. data/spec/api_client_spec.rb +226 -0
  84. data/spec/configuration_spec.rb +42 -0
  85. data/spec/spec_helper.rb +111 -0
  86. metadata +173 -0
@@ -0,0 +1,77 @@
1
+ =begin
2
+ #Container Registry service
3
+
4
+ #Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@cloud.ionos.com
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 IonoscloudContainerRegistry
16
+ class LocationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get container registry locations
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [LocationsResponse]
25
+ def locations_get(opts = {})
26
+ data, _status_code, _headers = locations_get_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Get container registry locations
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(LocationsResponse, Integer, Hash)>] LocationsResponse data, response status code and response headers
33
+ def locations_get_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: LocationsApi.locations_get ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/locations'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:debug_body]
53
+
54
+ # return_type
55
+ return_type = opts[:debug_return_type] || 'LocationsResponse'
56
+
57
+ # auth_names
58
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"LocationsApi.locations_get",
62
+ :header_params => header_params,
63
+ :query_params => query_params,
64
+ :form_params => form_params,
65
+ :body => post_body,
66
+ :auth_names => auth_names,
67
+ :return_type => return_type
68
+ )
69
+
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: LocationsApi#locations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #Container Registry service
3
+
4
+ #Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@cloud.ionos.com
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 IonoscloudContainerRegistry
16
+ class NamesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get container registry name availability
23
+ # Validate that the name is suitable to use for a new registry: - it uses only the characters \"a-z\", \"0-9\", or \"-\" - and starts with a letter and ends with a letter or number - and is between 3 to 63 characters in length - and is available
24
+ # @param name [String] The desired registry name
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def names_check_usage(name, opts = {})
28
+ names_check_usage_with_http_info(name, opts)
29
+ nil
30
+ end
31
+
32
+ # Get container registry name availability
33
+ # Validate that the name is suitable to use for a new registry: - it uses only the characters \&quot;a-z\&quot;, \&quot;0-9\&quot;, or \&quot;-\&quot; - and starts with a letter and ends with a letter or number - and is between 3 to 63 characters in length - and is available
34
+ # @param name [String] The desired registry name
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def names_check_usage_with_http_info(name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: NamesApi.names_check_usage ...'
40
+ end
41
+ # verify the required parameter 'name' is set
42
+ if @api_client.config.client_side_validation && name.nil?
43
+ fail ArgumentError, "Missing the required parameter 'name' when calling NamesApi.names_check_usage"
44
+ end
45
+ pattern = Regexp.new(/^[a-z][-a-z0-9]{1,61}[a-z0-9]$/)
46
+ if @api_client.config.client_side_validation && name !~ pattern
47
+ fail ArgumentError, "invalid value for 'name' when calling NamesApi.names_check_usage, must conform to the pattern #{pattern}."
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/names/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"NamesApi.names_check_usage",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: NamesApi#names_check_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,439 @@
1
+ =begin
2
+ #Container Registry service
3
+
4
+ #Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@cloud.ionos.com
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 IonoscloudContainerRegistry
16
+ class RegistriesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete registry
23
+ # @param registry_id [String] The unique ID of the registry
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def registries_delete(registry_id, opts = {})
27
+ registries_delete_with_http_info(registry_id, opts)
28
+ nil
29
+ end
30
+
31
+ # Delete registry
32
+ # @param registry_id [String] The unique ID of the registry
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def registries_delete_with_http_info(registry_id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_delete ...'
38
+ end
39
+ # verify the required parameter 'registry_id' is set
40
+ if @api_client.config.client_side_validation && registry_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'registry_id' when calling RegistriesApi.registries_delete"
42
+ end
43
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/)
44
+ if @api_client.config.client_side_validation && registry_id !~ pattern
45
+ fail ArgumentError, "invalid value for 'registry_id' when calling RegistriesApi.registries_delete, must conform to the pattern #{pattern}."
46
+ end
47
+
48
+ # resource path
49
+ local_var_path = '/registries/{registryId}'.sub('{' + 'registryId' + '}', CGI.escape(registry_id.to_s))
50
+
51
+ # query parameters
52
+ query_params = opts[:query_params] || {}
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"RegistriesApi.registries_delete",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Get a registry
89
+ # Get all information for a specific container registry
90
+ # @param registry_id [String] The unique ID of the registry
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [RegistryResponse]
93
+ def registries_find_by_id(registry_id, opts = {})
94
+ data, _status_code, _headers = registries_find_by_id_with_http_info(registry_id, opts)
95
+ data
96
+ end
97
+
98
+ # Get a registry
99
+ # Get all information for a specific container registry
100
+ # @param registry_id [String] The unique ID of the registry
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(RegistryResponse, Integer, Hash)>] RegistryResponse data, response status code and response headers
103
+ def registries_find_by_id_with_http_info(registry_id, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_find_by_id ...'
106
+ end
107
+ # verify the required parameter 'registry_id' is set
108
+ if @api_client.config.client_side_validation && registry_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'registry_id' when calling RegistriesApi.registries_find_by_id"
110
+ end
111
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/)
112
+ if @api_client.config.client_side_validation && registry_id !~ pattern
113
+ fail ArgumentError, "invalid value for 'registry_id' when calling RegistriesApi.registries_find_by_id, must conform to the pattern #{pattern}."
114
+ end
115
+
116
+ # resource path
117
+ local_var_path = '/registries/{registryId}'.sub('{' + 'registryId' + '}', CGI.escape(registry_id.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body]
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'RegistryResponse'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"RegistriesApi.registries_find_by_id",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # List all container registries
157
+ # List all managed container registries for your account
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :filter_name The registry name to search for
160
+ # @option opts [String] :limit The maximum number of elements to return (used together with nextPageToken for pagination) (default to '100')
161
+ # @option opts [String] :next_page_token The next page from the complete list of elements (used together with limit for pagination)
162
+ # @return [RegistriesResponse]
163
+ def registries_get(opts = {})
164
+ data, _status_code, _headers = registries_get_with_http_info(opts)
165
+ data
166
+ end
167
+
168
+ # List all container registries
169
+ # List all managed container registries for your account
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :filter_name The registry name to search for
172
+ # @option opts [String] :limit The maximum number of elements to return (used together with nextPageToken for pagination)
173
+ # @option opts [String] :next_page_token The next page from the complete list of elements (used together with limit for pagination)
174
+ # @return [Array<(RegistriesResponse, Integer, Hash)>] RegistriesResponse data, response status code and response headers
175
+ def registries_get_with_http_info(opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_get ...'
178
+ end
179
+ # resource path
180
+ local_var_path = '/registries'
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'filter.name'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
185
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
186
+ query_params[:'nextPageToken'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
187
+
188
+ # header parameters
189
+ header_params = opts[:header_params] || {}
190
+ # HTTP header 'Accept' (if needed)
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
192
+
193
+ # form parameters
194
+ form_params = opts[:form_params] || {}
195
+
196
+ # http body (model)
197
+ post_body = opts[:debug_body]
198
+
199
+ # return_type
200
+ return_type = opts[:debug_return_type] || 'RegistriesResponse'
201
+
202
+ # auth_names
203
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
204
+
205
+ new_options = opts.merge(
206
+ :operation => :"RegistriesApi.registries_get",
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Update the properties of a registry
223
+ # Update the properties of a registry - \"garbageCollectionSchedule\" time and days of the week for runs
224
+ # @param registry_id [String] The unique ID of the registry
225
+ # @param patch_registry_input [PatchRegistryInput]
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [RegistryResponse]
228
+ def registries_patch(registry_id, patch_registry_input, opts = {})
229
+ data, _status_code, _headers = registries_patch_with_http_info(registry_id, patch_registry_input, opts)
230
+ data
231
+ end
232
+
233
+ # Update the properties of a registry
234
+ # Update the properties of a registry - \&quot;garbageCollectionSchedule\&quot; time and days of the week for runs
235
+ # @param registry_id [String] The unique ID of the registry
236
+ # @param patch_registry_input [PatchRegistryInput]
237
+ # @param [Hash] opts the optional parameters
238
+ # @return [Array<(RegistryResponse, Integer, Hash)>] RegistryResponse data, response status code and response headers
239
+ def registries_patch_with_http_info(registry_id, patch_registry_input, opts = {})
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_patch ...'
242
+ end
243
+ # verify the required parameter 'registry_id' is set
244
+ if @api_client.config.client_side_validation && registry_id.nil?
245
+ fail ArgumentError, "Missing the required parameter 'registry_id' when calling RegistriesApi.registries_patch"
246
+ end
247
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/)
248
+ if @api_client.config.client_side_validation && registry_id !~ pattern
249
+ fail ArgumentError, "invalid value for 'registry_id' when calling RegistriesApi.registries_patch, must conform to the pattern #{pattern}."
250
+ end
251
+
252
+ # verify the required parameter 'patch_registry_input' is set
253
+ if @api_client.config.client_side_validation && patch_registry_input.nil?
254
+ fail ArgumentError, "Missing the required parameter 'patch_registry_input' when calling RegistriesApi.registries_patch"
255
+ end
256
+ # resource path
257
+ local_var_path = '/registries/{registryId}'.sub('{' + 'registryId' + '}', CGI.escape(registry_id.to_s))
258
+
259
+ # query parameters
260
+ query_params = opts[:query_params] || {}
261
+
262
+ # header parameters
263
+ header_params = opts[:header_params] || {}
264
+ # HTTP header 'Accept' (if needed)
265
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
266
+ # HTTP header 'Content-Type'
267
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
268
+
269
+ # form parameters
270
+ form_params = opts[:form_params] || {}
271
+
272
+ # http body (model)
273
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_registry_input)
274
+
275
+ # return_type
276
+ return_type = opts[:debug_return_type] || 'RegistryResponse'
277
+
278
+ # auth_names
279
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
280
+
281
+ new_options = opts.merge(
282
+ :operation => :"RegistriesApi.registries_patch",
283
+ :header_params => header_params,
284
+ :query_params => query_params,
285
+ :form_params => form_params,
286
+ :body => post_body,
287
+ :auth_names => auth_names,
288
+ :return_type => return_type
289
+ )
290
+
291
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+
298
+ # Create container registry
299
+ # Create a registry to hold container images or OCI compliant artifacts - \"name\" must have passed validation - \"location\" must be one of the available location IDs - \"garbageCollectionSchedule\" time and days of the week for runs
300
+ # @param post_registry_input [PostRegistryInput]
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [PostRegistryOutput]
303
+ def registries_post(post_registry_input, opts = {})
304
+ data, _status_code, _headers = registries_post_with_http_info(post_registry_input, opts)
305
+ data
306
+ end
307
+
308
+ # Create container registry
309
+ # Create a registry to hold container images or OCI compliant artifacts - \&quot;name\&quot; must have passed validation - \&quot;location\&quot; must be one of the available location IDs - \&quot;garbageCollectionSchedule\&quot; time and days of the week for runs
310
+ # @param post_registry_input [PostRegistryInput]
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [Array<(PostRegistryOutput, Integer, Hash)>] PostRegistryOutput data, response status code and response headers
313
+ def registries_post_with_http_info(post_registry_input, opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_post ...'
316
+ end
317
+ # verify the required parameter 'post_registry_input' is set
318
+ if @api_client.config.client_side_validation && post_registry_input.nil?
319
+ fail ArgumentError, "Missing the required parameter 'post_registry_input' when calling RegistriesApi.registries_post"
320
+ end
321
+ # resource path
322
+ local_var_path = '/registries'
323
+
324
+ # query parameters
325
+ query_params = opts[:query_params] || {}
326
+
327
+ # header parameters
328
+ header_params = opts[:header_params] || {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
+ # HTTP header 'Content-Type'
332
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
333
+
334
+ # form parameters
335
+ form_params = opts[:form_params] || {}
336
+
337
+ # http body (model)
338
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(post_registry_input)
339
+
340
+ # return_type
341
+ return_type = opts[:debug_return_type] || 'PostRegistryOutput'
342
+
343
+ # auth_names
344
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
345
+
346
+ new_options = opts.merge(
347
+ :operation => :"RegistriesApi.registries_post",
348
+ :header_params => header_params,
349
+ :query_params => query_params,
350
+ :form_params => form_params,
351
+ :body => post_body,
352
+ :auth_names => auth_names,
353
+ :return_type => return_type
354
+ )
355
+
356
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+
363
+ # Create or replace a container registry
364
+ # Create/replace a registry to hold container images or OCI compliant artifacts **On create** - \"name\" must have passed validation - \"location\" must be one of the available location IDs **On update** - \"name\" cannot be changed - \"location\" cannot be changed **On create or update** - \"garbageCollectionSchedule\": time and days of the week for runs
365
+ # @param registry_id [String] The unique ID of the registry
366
+ # @param put_registry_input [PutRegistryInput]
367
+ # @param [Hash] opts the optional parameters
368
+ # @return [PutRegistryOutput]
369
+ def registries_put(registry_id, put_registry_input, opts = {})
370
+ data, _status_code, _headers = registries_put_with_http_info(registry_id, put_registry_input, opts)
371
+ data
372
+ end
373
+
374
+ # Create or replace a container registry
375
+ # Create/replace a registry to hold container images or OCI compliant artifacts **On create** - \&quot;name\&quot; must have passed validation - \&quot;location\&quot; must be one of the available location IDs **On update** - \&quot;name\&quot; cannot be changed - \&quot;location\&quot; cannot be changed **On create or update** - \&quot;garbageCollectionSchedule\&quot;: time and days of the week for runs
376
+ # @param registry_id [String] The unique ID of the registry
377
+ # @param put_registry_input [PutRegistryInput]
378
+ # @param [Hash] opts the optional parameters
379
+ # @return [Array<(PutRegistryOutput, Integer, Hash)>] PutRegistryOutput data, response status code and response headers
380
+ def registries_put_with_http_info(registry_id, put_registry_input, opts = {})
381
+ if @api_client.config.debugging
382
+ @api_client.config.logger.debug 'Calling API: RegistriesApi.registries_put ...'
383
+ end
384
+ # verify the required parameter 'registry_id' is set
385
+ if @api_client.config.client_side_validation && registry_id.nil?
386
+ fail ArgumentError, "Missing the required parameter 'registry_id' when calling RegistriesApi.registries_put"
387
+ end
388
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/)
389
+ if @api_client.config.client_side_validation && registry_id !~ pattern
390
+ fail ArgumentError, "invalid value for 'registry_id' when calling RegistriesApi.registries_put, must conform to the pattern #{pattern}."
391
+ end
392
+
393
+ # verify the required parameter 'put_registry_input' is set
394
+ if @api_client.config.client_side_validation && put_registry_input.nil?
395
+ fail ArgumentError, "Missing the required parameter 'put_registry_input' when calling RegistriesApi.registries_put"
396
+ end
397
+ # resource path
398
+ local_var_path = '/registries/{registryId}'.sub('{' + 'registryId' + '}', CGI.escape(registry_id.to_s))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+ # HTTP header 'Content-Type'
408
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
409
+
410
+ # form parameters
411
+ form_params = opts[:form_params] || {}
412
+
413
+ # http body (model)
414
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(put_registry_input)
415
+
416
+ # return_type
417
+ return_type = opts[:debug_return_type] || 'PutRegistryOutput'
418
+
419
+ # auth_names
420
+ auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
421
+
422
+ new_options = opts.merge(
423
+ :operation => :"RegistriesApi.registries_put",
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => return_type
430
+ )
431
+
432
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug "API called: RegistriesApi#registries_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
435
+ end
436
+ return data, status_code, headers
437
+ end
438
+ end
439
+ end