Skip to content

Commit acc5c2e

Browse files
author
SDKAuto
committed
CodeGen from PR 12192 in Azure/azure-rest-api-specs
Merge f4a222d6c44b46343ff88e733c320e825eba0ddd into d266093
1 parent e188de6 commit acc5c2e

File tree

7 files changed

+238
-83
lines changed

7 files changed

+238
-83
lines changed

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
super(SourceControlConfigurationClient, self).__init__(self.config.credentials, self.config)
4646

4747
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
48-
self.api_version = '2019-11-01-preview'
48+
self.api_version = '2020-10-01-preview'
4949
self._serialize = Serializer(client_models)
5050
self._deserialize = Deserializer(client_models)
5151

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from ._models_py3 import ResourceProviderOperationDisplay
2121
from ._models_py3 import Result
2222
from ._models_py3 import SourceControlConfiguration
23+
from ._models_py3 import SystemData
2324
except (SyntaxError, ImportError):
2425
from ._models import ComplianceStatus
2526
from ._models import ErrorDefinition
@@ -31,15 +32,15 @@
3132
from ._models import ResourceProviderOperationDisplay
3233
from ._models import Result
3334
from ._models import SourceControlConfiguration
35+
from ._models import SystemData
3436
from ._paged_models import ResourceProviderOperationPaged
3537
from ._paged_models import SourceControlConfigurationPaged
3638
from ._source_control_configuration_client_enums import (
37-
ComplianceState,
38-
MessageLevel,
39+
ComplianceStateType,
40+
MessageLevelType,
3941
OperatorType,
40-
OperatorScope,
41-
EnableHelmOperator,
42-
ProvisioningState,
42+
OperatorScopeType,
43+
ProvisioningStateType,
4344
)
4445

4546
__all__ = [
@@ -53,12 +54,12 @@
5354
'ResourceProviderOperationDisplay',
5455
'Result',
5556
'SourceControlConfiguration',
57+
'SystemData',
5658
'SourceControlConfigurationPaged',
5759
'ResourceProviderOperationPaged',
58-
'ComplianceState',
59-
'MessageLevel',
60+
'ComplianceStateType',
61+
'MessageLevelType',
6062
'OperatorType',
61-
'OperatorScope',
62-
'EnableHelmOperator',
63-
'ProvisioningState',
63+
'OperatorScopeType',
64+
'ProvisioningStateType',
6465
]

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py

Lines changed: 106 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class ComplianceStatus(Model):
3131
Possible values include: 'Pending', 'Compliant', 'Noncompliant',
3232
'Installed', 'Failed'
3333
:vartype compliance_state: str or
34-
~azure.mgmt.kubernetesconfiguration.models.ComplianceState
34+
~azure.mgmt.kubernetesconfiguration.models.ComplianceStateType
3535
:param last_config_applied: Datetime the configuration was last applied.
3636
:type last_config_applied: datetime
3737
:param message: Message from when the configuration was applied.
3838
:type message: str
3939
:param message_level: Level of the message. Possible values include:
4040
'Error', 'Warning', 'Information'
4141
:type message_level: str or
42-
~azure.mgmt.kubernetesconfiguration.models.MessageLevel
42+
~azure.mgmt.kubernetesconfiguration.models.MessageLevelType
4343
"""
4444

4545
_validation = {
@@ -64,36 +64,29 @@ def __init__(self, **kwargs):
6464
class ErrorDefinition(Model):
6565
"""Error definition.
6666
67-
Variables are only populated by the server, and will be ignored when
68-
sending a request.
67+
All required parameters must be populated in order to send to Azure.
6968
70-
:ivar code: Service specific error code which serves as the substatus for
71-
the HTTP error code.
72-
:vartype code: str
73-
:ivar message: Description of the error.
74-
:vartype message: str
75-
:ivar details: Internal error details.
76-
:vartype details:
77-
list[~azure.mgmt.kubernetesconfiguration.models.ErrorDefinition]
69+
:param code: Required. Service specific error code which serves as the
70+
substatus for the HTTP error code.
71+
:type code: str
72+
:param message: Required. Description of the error.
73+
:type message: str
7874
"""
7975

8076
_validation = {
81-
'code': {'readonly': True},
82-
'message': {'readonly': True},
83-
'details': {'readonly': True},
77+
'code': {'required': True},
78+
'message': {'required': True},
8479
}
8580

8681
_attribute_map = {
8782
'code': {'key': 'code', 'type': 'str'},
8883
'message': {'key': 'message', 'type': 'str'},
89-
'details': {'key': 'details', 'type': '[ErrorDefinition]'},
9084
}
9185

9286
def __init__(self, **kwargs):
9387
super(ErrorDefinition, self).__init__(**kwargs)
94-
self.code = None
95-
self.message = None
96-
self.details = None
88+
self.code = kwargs.get('code', None)
89+
self.message = kwargs.get('message', None)
9790

9891

9992
class ErrorResponse(Model):
@@ -156,6 +149,9 @@ class Resource(Model):
156149
:vartype name: str
157150
:ivar type: Resource type
158151
:vartype type: str
152+
:param system_data: Top level metadata
153+
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
154+
:type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData
159155
"""
160156

161157
_validation = {
@@ -168,13 +164,15 @@ class Resource(Model):
168164
'id': {'key': 'id', 'type': 'str'},
169165
'name': {'key': 'name', 'type': 'str'},
170166
'type': {'key': 'type', 'type': 'str'},
167+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
171168
}
172169

173170
def __init__(self, **kwargs):
174171
super(Resource, self).__init__(**kwargs)
175172
self.id = None
176173
self.name = None
177174
self.type = None
175+
self.system_data = kwargs.get('system_data', None)
178176

179177

180178
class ProxyResource(Resource):
@@ -189,6 +187,9 @@ class ProxyResource(Resource):
189187
:vartype name: str
190188
:ivar type: Resource type
191189
:vartype type: str
190+
:param system_data: Top level metadata
191+
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
192+
:type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData
192193
"""
193194

194195
_validation = {
@@ -201,6 +202,7 @@ class ProxyResource(Resource):
201202
'id': {'key': 'id', 'type': 'str'},
202203
'name': {'key': 'name', 'type': 'str'},
203204
'type': {'key': 'type', 'type': 'str'},
205+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
204206
}
205207

206208
def __init__(self, **kwargs):
@@ -210,23 +212,35 @@ def __init__(self, **kwargs):
210212
class ResourceProviderOperation(Model):
211213
"""Supported operation of this resource provider.
212214
215+
Variables are only populated by the server, and will be ignored when
216+
sending a request.
217+
213218
:param name: Operation name, in format of
214219
{provider}/{resource}/{operation}
215220
:type name: str
216221
:param display: Display metadata associated with the operation.
217222
:type display:
218223
~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationDisplay
224+
:ivar is_data_action: The flag that indicates whether the operation
225+
applies to data plane.
226+
:vartype is_data_action: bool
219227
"""
220228

229+
_validation = {
230+
'is_data_action': {'readonly': True},
231+
}
232+
221233
_attribute_map = {
222234
'name': {'key': 'name', 'type': 'str'},
223235
'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'},
236+
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
224237
}
225238

226239
def __init__(self, **kwargs):
227240
super(ResourceProviderOperation, self).__init__(**kwargs)
228241
self.name = kwargs.get('name', None)
229242
self.display = kwargs.get('display', None)
243+
self.is_data_action = None
230244

231245

232246
class ResourceProviderOperationDisplay(Model):
@@ -274,7 +288,7 @@ def __init__(self, **kwargs):
274288

275289

276290
class SourceControlConfiguration(ProxyResource):
277-
"""The SourceControl Configuration object.
291+
"""The SourceControl Configuration object returned in Get & Put response.
278292
279293
Variables are only populated by the server, and will be ignored when
280294
sending a request.
@@ -285,6 +299,9 @@ class SourceControlConfiguration(ProxyResource):
285299
:vartype name: str
286300
:ivar type: Resource type
287301
:vartype type: str
302+
:param system_data: Top level metadata
303+
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
304+
:type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData
288305
:param repository_url: Url of the SourceControl Repository.
289306
:type repository_url: str
290307
:param operator_namespace: The namespace to which this operator is
@@ -301,27 +318,32 @@ class SourceControlConfiguration(ProxyResource):
301318
:param operator_params: Any Parameters for the Operator instance in string
302319
format.
303320
:type operator_params: str
321+
:param configuration_protected_settings: Name-value pairs of protected
322+
configuration settings for the configuration
323+
:type configuration_protected_settings: dict[str, str]
304324
:param operator_scope: Scope at which the operator will be installed.
305325
Possible values include: 'cluster', 'namespace'. Default value: "cluster"
306326
.
307327
:type operator_scope: str or
308-
~azure.mgmt.kubernetesconfiguration.models.OperatorScope
328+
~azure.mgmt.kubernetesconfiguration.models.OperatorScopeType
309329
:ivar repository_public_key: Public Key associated with this SourceControl
310330
configuration (either generated within the cluster or provided by the
311331
user).
312332
:vartype repository_public_key: str
333+
:param ssh_known_hosts_contents: Base64-encoded known_hosts contents
334+
containing public SSH keys required to access private Git instances
335+
:type ssh_known_hosts_contents: str
313336
:param enable_helm_operator: Option to enable Helm Operator for this git
314-
configuration. Possible values include: 'true', 'false'
315-
:type enable_helm_operator: str or
316-
~azure.mgmt.kubernetesconfiguration.models.EnableHelmOperator
337+
configuration.
338+
:type enable_helm_operator: bool
317339
:param helm_operator_properties: Properties for Helm operator.
318340
:type helm_operator_properties:
319341
~azure.mgmt.kubernetesconfiguration.models.HelmOperatorProperties
320342
:ivar provisioning_state: The provisioning state of the resource provider.
321343
Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded',
322344
'Failed'
323345
:vartype provisioning_state: str or
324-
~azure.mgmt.kubernetesconfiguration.models.ProvisioningState
346+
~azure.mgmt.kubernetesconfiguration.models.ProvisioningStateType
325347
:ivar compliance_status: Compliance Status of the Configuration
326348
:vartype compliance_status:
327349
~azure.mgmt.kubernetesconfiguration.models.ComplianceStatus
@@ -340,14 +362,17 @@ class SourceControlConfiguration(ProxyResource):
340362
'id': {'key': 'id', 'type': 'str'},
341363
'name': {'key': 'name', 'type': 'str'},
342364
'type': {'key': 'type', 'type': 'str'},
365+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
343366
'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'},
344367
'operator_namespace': {'key': 'properties.operatorNamespace', 'type': 'str'},
345368
'operator_instance_name': {'key': 'properties.operatorInstanceName', 'type': 'str'},
346369
'operator_type': {'key': 'properties.operatorType', 'type': 'str'},
347370
'operator_params': {'key': 'properties.operatorParams', 'type': 'str'},
371+
'configuration_protected_settings': {'key': 'properties.configurationProtectedSettings', 'type': '{str}'},
348372
'operator_scope': {'key': 'properties.operatorScope', 'type': 'str'},
349373
'repository_public_key': {'key': 'properties.repositoryPublicKey', 'type': 'str'},
350-
'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'str'},
374+
'ssh_known_hosts_contents': {'key': 'properties.sshKnownHostsContents', 'type': 'str'},
375+
'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'bool'},
351376
'helm_operator_properties': {'key': 'properties.helmOperatorProperties', 'type': 'HelmOperatorProperties'},
352377
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
353378
'compliance_status': {'key': 'properties.complianceStatus', 'type': 'ComplianceStatus'},
@@ -360,9 +385,64 @@ def __init__(self, **kwargs):
360385
self.operator_instance_name = kwargs.get('operator_instance_name', None)
361386
self.operator_type = kwargs.get('operator_type', None)
362387
self.operator_params = kwargs.get('operator_params', None)
388+
self.configuration_protected_settings = kwargs.get('configuration_protected_settings', None)
363389
self.operator_scope = kwargs.get('operator_scope', "cluster")
364390
self.repository_public_key = None
391+
self.ssh_known_hosts_contents = kwargs.get('ssh_known_hosts_contents', None)
365392
self.enable_helm_operator = kwargs.get('enable_helm_operator', None)
366393
self.helm_operator_properties = kwargs.get('helm_operator_properties', None)
367394
self.provisioning_state = None
368395
self.compliance_status = None
396+
397+
398+
class SystemData(Model):
399+
"""Top level metadata
400+
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources.
401+
402+
Variables are only populated by the server, and will be ignored when
403+
sending a request.
404+
405+
:ivar created_by: A string identifier for the identity that created the
406+
resource
407+
:vartype created_by: str
408+
:ivar created_by_type: The type of identity that created the resource:
409+
user, application, managedIdentity, key
410+
:vartype created_by_type: str
411+
:ivar created_at: The timestamp of resource creation (UTC)
412+
:vartype created_at: datetime
413+
:ivar last_modified_by: A string identifier for the identity that last
414+
modified the resource
415+
:vartype last_modified_by: str
416+
:ivar last_modified_by_type: The type of identity that last modified the
417+
resource: user, application, managedIdentity, key
418+
:vartype last_modified_by_type: str
419+
:ivar last_modified_at: The timestamp of resource last modification (UTC)
420+
:vartype last_modified_at: datetime
421+
"""
422+
423+
_validation = {
424+
'created_by': {'readonly': True},
425+
'created_by_type': {'readonly': True},
426+
'created_at': {'readonly': True},
427+
'last_modified_by': {'readonly': True},
428+
'last_modified_by_type': {'readonly': True},
429+
'last_modified_at': {'readonly': True},
430+
}
431+
432+
_attribute_map = {
433+
'created_by': {'key': 'createdBy', 'type': 'str'},
434+
'created_by_type': {'key': 'createdByType', 'type': 'str'},
435+
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
436+
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
437+
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
438+
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
439+
}
440+
441+
def __init__(self, **kwargs):
442+
super(SystemData, self).__init__(**kwargs)
443+
self.created_by = None
444+
self.created_by_type = None
445+
self.created_at = None
446+
self.last_modified_by = None
447+
self.last_modified_by_type = None
448+
self.last_modified_at = None

0 commit comments

Comments
 (0)