From 728e9fa3f4dbe22956dcc495c88a9e5adf4b1685 Mon Sep 17 00:00:00 2001 From: Tanmay Satam Date: Mon, 5 Feb 2024 18:03:49 -0500 Subject: [PATCH] Update generated client SDKs --- .sha256sum | 2 +- .../mgmt/2023-11-22/redhatopenshift/models.go | 35 ++++++++++++++-- .../v2023_11_22/models/_models.py | 35 ++++++++++------ .../v2023_11_22/models/_models_py3.py | 40 +++++++++++-------- 4 files changed, 78 insertions(+), 34 deletions(-) diff --git a/.sha256sum b/.sha256sum index 29d20d7987d..ad15e322152 100644 --- a/.sha256sum +++ b/.sha256sum @@ -5,4 +5,4 @@ b1f1de0fe40d05de90742b17928968923b936adc294000f58974f50a297581dd swagger/redhat 01ba9562a8dac2824998ff0ad0d2465f79e6a66597bdb321e9409b9f2d12d222 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-04-01/redhatopenshift.json c023515341196746454c0ae7af077d40d3ec13f6b88b33cb558f0a7ab17a5a24 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2023-07-01-preview/redhatopenshift.json 440748951dd1c3b34b5ccbdcb7cd966e3b89490887a1f1d64429561fad789515 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/redhatopenshift.json -98b241e3225ff4bbe96f4046aea98dae06c2bac2cc0e25ab8d85583bfc7f1861 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-11-22/redhatopenshift.json +a1052ac8642527343815b212823c7c22f1edf9690b1004041b9ef6bab5b10393 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-11-22/redhatopenshift.json diff --git a/pkg/client/services/redhatopenshift/mgmt/2023-11-22/redhatopenshift/models.go b/pkg/client/services/redhatopenshift/mgmt/2023-11-22/redhatopenshift/models.go index 0b52821a121..57302d8e1ea 100644 --- a/pkg/client/services/redhatopenshift/mgmt/2023-11-22/redhatopenshift/models.go +++ b/pkg/client/services/redhatopenshift/mgmt/2023-11-22/redhatopenshift/models.go @@ -36,12 +36,21 @@ const fqdn = "github.com/Azure/ARO-RP/pkg/client/services/redhatopenshift/mgmt/2 type APIServerProfile struct { // Visibility - API server visibility. Possible values include: 'Private', 'Public' Visibility Visibility `json:"visibility,omitempty"` - // URL - The URL to access the cluster API server. + // URL - READ-ONLY; The URL to access the cluster API server. URL *string `json:"url,omitempty"` - // IP - The IP of the cluster API server. + // IP - READ-ONLY; The IP of the cluster API server. IP *string `json:"ip,omitempty"` } +// MarshalJSON is the custom marshaler for APIServerProfile. +func (asp APIServerProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asp.Visibility != "" { + objectMap["visibility"] = asp.Visibility + } + return json.Marshal(objectMap) +} + // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // Etag - READ-ONLY; Resource Etag. @@ -96,10 +105,16 @@ type ClusterProfile struct { // ConsoleProfile consoleProfile represents a console profile. type ConsoleProfile struct { - // URL - The URL to access the cluster console. + // URL - READ-ONLY; The URL to access the cluster console. URL *string `json:"url,omitempty"` } +// MarshalJSON is the custom marshaler for ConsoleProfile. +func (cp ConsoleProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // Display display represents the display details of an operation. type Display struct { // Provider - Friendly name of the resource provider. @@ -125,10 +140,22 @@ type IngressProfile struct { Name *string `json:"name,omitempty"` // Visibility - Ingress visibility. Possible values include: 'Private', 'Public' Visibility Visibility `json:"visibility,omitempty"` - // IP - The IP of the ingress. + // IP - READ-ONLY; The IP of the ingress. IP *string `json:"ip,omitempty"` } +// MarshalJSON is the custom marshaler for IngressProfile. +func (IP IngressProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.Name != nil { + objectMap["name"] = IP.Name + } + if IP.Visibility != "" { + objectMap["visibility"] = IP.Visibility + } + return json.Marshal(objectMap) +} + // LoadBalancerProfile loadBalancerProfile represents the profile of the cluster public load balancer. type LoadBalancerProfile struct { // ManagedOutboundIps - The desired managed outbound IPs for the cluster public load balancer. diff --git a/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models.py b/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models.py index b182f547a86..c6691d24c64 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models.py +++ b/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models.py @@ -20,6 +20,8 @@ class APIServerProfile(msrest.serialization.Model): """APIServerProfile represents an API server profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar visibility: API server visibility. Possible values include: "Private", "Public". :vartype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility :ivar url: The URL to access the cluster API server. @@ -28,6 +30,11 @@ class APIServerProfile(msrest.serialization.Model): :vartype ip: str """ + _validation = { + 'url': {'readonly': True}, + 'ip': {'readonly': True}, + } + _attribute_map = { 'visibility': {'key': 'visibility', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, @@ -41,15 +48,11 @@ def __init__( """ :keyword visibility: API server visibility. Possible values include: "Private", "Public". :paramtype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility - :keyword url: The URL to access the cluster API server. - :paramtype url: str - :keyword ip: The IP of the cluster API server. - :paramtype ip: str """ super(APIServerProfile, self).__init__(**kwargs) self.visibility = kwargs.get('visibility', None) - self.url = kwargs.get('url', None) - self.ip = kwargs.get('ip', None) + self.url = None + self.ip = None class CloudErrorBody(msrest.serialization.Model): @@ -153,10 +156,16 @@ def __init__( class ConsoleProfile(msrest.serialization.Model): """ConsoleProfile represents a console profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar url: The URL to access the cluster console. :vartype url: str """ + _validation = { + 'url': {'readonly': True}, + } + _attribute_map = { 'url': {'key': 'url', 'type': 'str'}, } @@ -166,11 +175,9 @@ def __init__( **kwargs ): """ - :keyword url: The URL to access the cluster console. - :paramtype url: str """ super(ConsoleProfile, self).__init__(**kwargs) - self.url = kwargs.get('url', None) + self.url = None class Display(msrest.serialization.Model): @@ -240,6 +247,8 @@ def __init__( class IngressProfile(msrest.serialization.Model): """IngressProfile represents an ingress profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar name: The ingress profile name. :vartype name: str :ivar visibility: Ingress visibility. Possible values include: "Private", "Public". @@ -248,6 +257,10 @@ class IngressProfile(msrest.serialization.Model): :vartype ip: str """ + _validation = { + 'ip': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'visibility': {'key': 'visibility', 'type': 'str'}, @@ -263,13 +276,11 @@ def __init__( :paramtype name: str :keyword visibility: Ingress visibility. Possible values include: "Private", "Public". :paramtype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility - :keyword ip: The IP of the ingress. - :paramtype ip: str """ super(IngressProfile, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.visibility = kwargs.get('visibility', None) - self.ip = kwargs.get('ip', None) + self.ip = None class LoadBalancerProfile(msrest.serialization.Model): diff --git a/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models_py3.py b/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models_py3.py index 97c198d0319..e881c9c36b3 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models_py3.py +++ b/python/client/azure/mgmt/redhatopenshift/v2023_11_22/models/_models_py3.py @@ -25,6 +25,8 @@ class APIServerProfile(msrest.serialization.Model): """APIServerProfile represents an API server profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar visibility: API server visibility. Possible values include: "Private", "Public". :vartype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility :ivar url: The URL to access the cluster API server. @@ -33,6 +35,11 @@ class APIServerProfile(msrest.serialization.Model): :vartype ip: str """ + _validation = { + 'url': {'readonly': True}, + 'ip': {'readonly': True}, + } + _attribute_map = { 'visibility': {'key': 'visibility', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, @@ -43,22 +50,16 @@ def __init__( self, *, visibility: Optional[Union[str, "Visibility"]] = None, - url: Optional[str] = None, - ip: Optional[str] = None, **kwargs ): """ :keyword visibility: API server visibility. Possible values include: "Private", "Public". :paramtype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility - :keyword url: The URL to access the cluster API server. - :paramtype url: str - :keyword ip: The IP of the cluster API server. - :paramtype ip: str """ super(APIServerProfile, self).__init__(**kwargs) self.visibility = visibility - self.url = url - self.ip = ip + self.url = None + self.ip = None class CloudErrorBody(msrest.serialization.Model): @@ -173,26 +174,28 @@ def __init__( class ConsoleProfile(msrest.serialization.Model): """ConsoleProfile represents a console profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar url: The URL to access the cluster console. :vartype url: str """ + _validation = { + 'url': {'readonly': True}, + } + _attribute_map = { 'url': {'key': 'url', 'type': 'str'}, } def __init__( self, - *, - url: Optional[str] = None, **kwargs ): """ - :keyword url: The URL to access the cluster console. - :paramtype url: str """ super(ConsoleProfile, self).__init__(**kwargs) - self.url = url + self.url = None class Display(msrest.serialization.Model): @@ -269,6 +272,8 @@ def __init__( class IngressProfile(msrest.serialization.Model): """IngressProfile represents an ingress profile. + Variables are only populated by the server, and will be ignored when sending a request. + :ivar name: The ingress profile name. :vartype name: str :ivar visibility: Ingress visibility. Possible values include: "Private", "Public". @@ -277,6 +282,10 @@ class IngressProfile(msrest.serialization.Model): :vartype ip: str """ + _validation = { + 'ip': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'visibility': {'key': 'visibility', 'type': 'str'}, @@ -288,7 +297,6 @@ def __init__( *, name: Optional[str] = None, visibility: Optional[Union[str, "Visibility"]] = None, - ip: Optional[str] = None, **kwargs ): """ @@ -296,13 +304,11 @@ def __init__( :paramtype name: str :keyword visibility: Ingress visibility. Possible values include: "Private", "Public". :paramtype visibility: str or ~azure.mgmt.redhatopenshift.v2023_11_22.models.Visibility - :keyword ip: The IP of the ingress. - :paramtype ip: str """ super(IngressProfile, self).__init__(**kwargs) self.name = name self.visibility = visibility - self.ip = ip + self.ip = None class LoadBalancerProfile(msrest.serialization.Model):