+
+
+class LinkSerializer(serializers.Serializer):
+ href = serializers.CharField(
+ help_text="URI of the referenced resource.",
+ required=True,
+ allow_null=False,
+ allow_blank=False
+ )
+
+ class Meta:
+ ref_name = 'NOTIFICATION_LINKSERIALIZER'
+
+
+class PkgmLinksSerializer(serializers.Serializer):
+ vnfPackage = LinkSerializer(
+ help_text="Link to the resource representing the VNF package to which the notified change applies.",
+ required=False,
+ allow_null=False
+ )
+ subscription = LinkSerializer(
+ help_text="Link to the related subscription.",
+ required=False,
+ allow_null=False
+ )
+
+
+class PkgChangeNotificationSerializer(serializers.Serializer):
+ id = serializers.CharField(
+ help_text="Identifier of this notification.",
+ required=True,
+ allow_null=False
+ )
+ notificationTypes = serializers.ChoiceField(
+ help_text="Discriminator for the different notification types.",
+ choices=["VnfPackageChangeNotification"],
+ required=True,
+ allow_null=False
+ )
+ subscriptionId = serializers.CharField(
+ help_text="Identifier of the subscription that this notification relates to.",
+ required=True,
+ allow_null=False
+ )
+ vnfPkgId = serializers.UUIDField(
+ help_text="Identifier of the VNF package.",
+ required=True,
+ allow_null=False
+ )
+ vnfdId = serializers.UUIDField(
+ help_text="This identifier, which is managed by the VNF provider, "
+ "identifies the VNF package and the VNFD in a globally unique way.",
+ required=True,
+ allow_null=False
+ )
+ changeType = serializers.ChoiceField(
+ help_text="The type of change of the VNF package.",
+ choices=PackageChangeType,
+ required=True,
+ allow_null=False
+ )
+ operationalState = serializers.ChoiceField(
+ help_text="New operational state of the VNF package.",
+ choices=PackageOperationalStateType,
+ required=False,
+ allow_null=False
+ )
+ vnfdId = serializers.CharField(
+ help_text="This identifier, which is managed by the VNF provider, "
+ "identifies the VNF package and the VNFD in a globally unique way.",
+ required=True,
+ allow_null=False
+ )
+ _links = PkgmLinksSerializer(
+ help_text="Links to resources related to this resource.",
+ required=True,
+ allow_null=False
+ )
+
+
+class PkgOnboardingNotificationSerializer(serializers.Serializer):
+ id = serializers.CharField(
+ help_text="Identifier of this notification.",
+ required=True,
+ allow_null=False
+ )
+ notificationTypes = serializers.ChoiceField(
+ help_text="Discriminator for the different notification types.",
+ choices=["VnfPackageOnboardingNotification"],
+ required=True,
+ allow_null=False
+ )
+ subscriptionId = serializers.CharField(
+ help_text="Identifier of the subscription that this notification relates to.",
+ required=True,
+ allow_null=False
+ )
+ vnfPkgId = serializers.UUIDField(
+ help_text="Identifier of the VNF package.",
+ required=True,
+ allow_null=False
+ )
+ vnfdId = serializers.UUIDField(
+ help_text="This identifier, which is managed by the VNF provider, "
+ "identifies the VNF package and the VNFD in a globally unique way.",
+ required=True,
+ allow_null=False
+ )
+ _links = PkgmLinksSerializer(
+ help_text="Links to resources related to this resource.",
+ required=True,
+ allow_null=False
+ )