Skip to content

Commit

Permalink
[AutoPR apimanagement/resource-manager] Remove readonly attribute fro…
Browse files Browse the repository at this point in the history
…m identities collection in users (#3775)

* Generated from cbd8b32037c8d911d9c4024dd3accb02bfad8e93

Remove readonly attribute from identities collection in users

* Packaging update of azure-mgmt-apimanagement
  • Loading branch information
AutorestCI authored Nov 12, 2018
1 parent d6eebe3 commit ce59516
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 60 deletions.
3 changes: 3 additions & 0 deletions azure-mgmt-apimanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class UserContract(Resource):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param first_name: First name.
:type first_name: str
Expand All @@ -54,7 +54,6 @@ class UserContract(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'identities': {'readonly': True},
'groups': {'readonly': True},
}

Expand All @@ -76,7 +75,7 @@ def __init__(self, **kwargs):
super(UserContract, self).__init__(**kwargs)
self.state = kwargs.get('state', "active")
self.note = kwargs.get('note', None)
self.identities = None
self.identities = kwargs.get('identities', None)
self.first_name = kwargs.get('first_name', None)
self.last_name = kwargs.get('last_name', None)
self.email = kwargs.get('email', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class UserContract(Resource):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param first_name: First name.
:type first_name: str
Expand All @@ -54,7 +54,6 @@ class UserContract(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'identities': {'readonly': True},
'groups': {'readonly': True},
}

Expand All @@ -72,11 +71,11 @@ class UserContract(Resource):
'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'},
}

def __init__(self, *, state="active", note: str=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None:
def __init__(self, *, state="active", note: str=None, identities=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None:
super(UserContract, self).__init__(**kwargs)
self.state = state
self.note = note
self.identities = None
self.identities = identities
self.first_name = first_name
self.last_name = last_name
self.email = email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserCreateParameters(Model):
"""User create details.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param state: Account state. Specifies whether the user is active or not.
Expand All @@ -28,8 +25,8 @@ class UserCreateParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param email: Required. Email address. Must not be empty and must be
unique within the service instance.
Expand All @@ -48,7 +45,6 @@ class UserCreateParameters(Model):
"""

_validation = {
'identities': {'readonly': True},
'email': {'required': True, 'max_length': 254, 'min_length': 1},
'first_name': {'required': True, 'max_length': 100, 'min_length': 1},
'last_name': {'required': True, 'max_length': 100, 'min_length': 1},
Expand All @@ -69,7 +65,7 @@ def __init__(self, **kwargs):
super(UserCreateParameters, self).__init__(**kwargs)
self.state = kwargs.get('state', "active")
self.note = kwargs.get('note', None)
self.identities = None
self.identities = kwargs.get('identities', None)
self.email = kwargs.get('email', None)
self.first_name = kwargs.get('first_name', None)
self.last_name = kwargs.get('last_name', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserCreateParameters(Model):
"""User create details.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param state: Account state. Specifies whether the user is active or not.
Expand All @@ -28,8 +25,8 @@ class UserCreateParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param email: Required. Email address. Must not be empty and must be
unique within the service instance.
Expand All @@ -48,7 +45,6 @@ class UserCreateParameters(Model):
"""

_validation = {
'identities': {'readonly': True},
'email': {'required': True, 'max_length': 254, 'min_length': 1},
'first_name': {'required': True, 'max_length': 100, 'min_length': 1},
'last_name': {'required': True, 'max_length': 100, 'min_length': 1},
Expand All @@ -65,11 +61,11 @@ class UserCreateParameters(Model):
'confirmation': {'key': 'properties.confirmation', 'type': 'str'},
}

def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, password: str=None, confirmation=None, **kwargs) -> None:
def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, identities=None, password: str=None, confirmation=None, **kwargs) -> None:
super(UserCreateParameters, self).__init__(**kwargs)
self.state = state
self.note = note
self.identities = None
self.identities = identities
self.email = email
self.first_name = first_name
self.last_name = last_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserEntityBaseParameters(Model):
"""User Entity Base Parameters set.
Variables are only populated by the server, and will be ignored when
sending a request.
:param state: Account state. Specifies whether the user is active or not.
Blocked users are unable to sign into the developer portal or call any
APIs of subscribed products. Default state is Active. Possible values
Expand All @@ -26,15 +23,11 @@ class UserEntityBaseParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
"""

_validation = {
'identities': {'readonly': True},
}

_attribute_map = {
'state': {'key': 'state', 'type': 'str'},
'note': {'key': 'note', 'type': 'str'},
Expand All @@ -45,4 +38,4 @@ def __init__(self, **kwargs):
super(UserEntityBaseParameters, self).__init__(**kwargs)
self.state = kwargs.get('state', "active")
self.note = kwargs.get('note', None)
self.identities = None
self.identities = kwargs.get('identities', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserEntityBaseParameters(Model):
"""User Entity Base Parameters set.
Variables are only populated by the server, and will be ignored when
sending a request.
:param state: Account state. Specifies whether the user is active or not.
Blocked users are unable to sign into the developer portal or call any
APIs of subscribed products. Default state is Active. Possible values
Expand All @@ -26,23 +23,19 @@ class UserEntityBaseParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
"""

_validation = {
'identities': {'readonly': True},
}

_attribute_map = {
'state': {'key': 'state', 'type': 'str'},
'note': {'key': 'note', 'type': 'str'},
'identities': {'key': 'identities', 'type': '[UserIdentityContract]'},
}

def __init__(self, *, state="active", note: str=None, **kwargs) -> None:
def __init__(self, *, state="active", note: str=None, identities=None, **kwargs) -> None:
super(UserEntityBaseParameters, self).__init__(**kwargs)
self.state = state
self.note = note
self.identities = None
self.identities = identities
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserUpdateParameters(Model):
"""User update parameters.
Variables are only populated by the server, and will be ignored when
sending a request.
:param state: Account state. Specifies whether the user is active or not.
Blocked users are unable to sign into the developer portal or call any
APIs of subscribed products. Default state is Active. Possible values
Expand All @@ -26,8 +23,8 @@ class UserUpdateParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param email: Email address. Must not be empty and must be unique within
the service instance.
Expand All @@ -41,7 +38,6 @@ class UserUpdateParameters(Model):
"""

_validation = {
'identities': {'readonly': True},
'email': {'max_length': 254, 'min_length': 1},
'first_name': {'max_length': 100, 'min_length': 1},
'last_name': {'max_length': 100, 'min_length': 1},
Expand All @@ -61,7 +57,7 @@ def __init__(self, **kwargs):
super(UserUpdateParameters, self).__init__(**kwargs)
self.state = kwargs.get('state', "active")
self.note = kwargs.get('note', None)
self.identities = None
self.identities = kwargs.get('identities', None)
self.email = kwargs.get('email', None)
self.password = kwargs.get('password', None)
self.first_name = kwargs.get('first_name', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class UserUpdateParameters(Model):
"""User update parameters.
Variables are only populated by the server, and will be ignored when
sending a request.
:param state: Account state. Specifies whether the user is active or not.
Blocked users are unable to sign into the developer portal or call any
APIs of subscribed products. Default state is Active. Possible values
Expand All @@ -26,8 +23,8 @@ class UserUpdateParameters(Model):
:type state: str or ~azure.mgmt.apimanagement.models.UserState
:param note: Optional note about a user set by the administrator.
:type note: str
:ivar identities: Collection of user identities.
:vartype identities:
:param identities: Collection of user identities.
:type identities:
list[~azure.mgmt.apimanagement.models.UserIdentityContract]
:param email: Email address. Must not be empty and must be unique within
the service instance.
Expand All @@ -41,7 +38,6 @@ class UserUpdateParameters(Model):
"""

_validation = {
'identities': {'readonly': True},
'email': {'max_length': 254, 'min_length': 1},
'first_name': {'max_length': 100, 'min_length': 1},
'last_name': {'max_length': 100, 'min_length': 1},
Expand All @@ -57,11 +53,11 @@ class UserUpdateParameters(Model):
'last_name': {'key': 'properties.lastName', 'type': 'str'},
}

def __init__(self, *, state="active", note: str=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None:
def __init__(self, *, state="active", note: str=None, identities=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None:
super(UserUpdateParameters, self).__init__(**kwargs)
self.state = state
self.note = note
self.identities = None
self.identities = identities
self.email = email
self.password = password
self.first_name = first_name
Expand Down

0 comments on commit ce59516

Please sign in to comment.