Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions ibm_platform_services/global_search_v2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

# (C) Copyright IBM Corp. 2025.
# (C) Copyright IBM Corp. 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# IBM OpenAPI SDK Code Generator Version: 3.100.0-2ad7a784-20250212-162551
# IBM OpenAPI SDK Code Generator Version: 3.113.1-d76630af-20260320-135953

"""
Search for resources with the global and shared resource properties repository that is
Expand Down Expand Up @@ -61,7 +61,9 @@ def new_instance(
parameters and external configuration.
"""
authenticator = get_authenticator_from_environment(service_name)
service = cls(authenticator)
service = cls(
authenticator
)
service.configure_service(service_name)
return service

Expand Down Expand Up @@ -253,7 +255,6 @@ class IsDeleted(str, Enum):
TRUE = 'true'
FALSE = 'false'
ANY = 'any'

class IsReclaimed(str, Enum):
"""
Determines if reclaimed documents should be included in result set or not.
Expand All @@ -265,7 +266,6 @@ class IsReclaimed(str, Enum):
TRUE = 'true'
FALSE = 'false'
ANY = 'any'

class CanTag(str, Enum):
"""
Determines if the result set must return the resources that the user can tag or
Expand All @@ -277,7 +277,6 @@ class CanTag(str, Enum):

TRUE = 'true'
FALSE = 'false'

class IsProjectResource(str, Enum):
"""
Determines if documents belonging to Project family should be included in result
Expand Down Expand Up @@ -340,9 +339,9 @@ def from_dict(cls, _dict: Dict) -> 'ResultItem':
raise ValueError('Required property \'crn\' not present in ResultItem JSON')
for k, v in _dict.items():
if k not in cls._properties:
if not isinstance(v, object):
raise ValueError('Value for additional property {} must be of type object'.format(k))
args[k] = v
if not isinstance(v, object):
raise ValueError('Value for additional property {} must be of type object'.format(k))
args[k] = v
return cls(**args)

@classmethod
Expand Down
17 changes: 8 additions & 9 deletions ibm_platform_services/global_tagging_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# IBM OpenAPI SDK Code Generator Version: 3.111.0-1bfb72c2-20260206-185521
# IBM OpenAPI SDK Code Generator Version: 3.113.1-d76630af-20260320-135953

"""
Manage your tags with the Tagging API in IBM Cloud. You can attach, detach, delete, or
Expand Down Expand Up @@ -63,7 +63,9 @@ def new_instance(
parameters and external configuration.
"""
authenticator = get_authenticator_from_environment(service_name)
service = cls(authenticator)
service = cls(
authenticator
)
service.configure_service(service_name)
return service

Expand Down Expand Up @@ -680,7 +682,6 @@ class TagType(str, Enum):
USER = 'user'
SERVICE = 'service'
ACCESS = 'access'

class Providers(str, Enum):
"""
Select a provider. Supported values are `ghost` and `ims`. To list both Global
Expand All @@ -691,7 +692,6 @@ class Providers(str, Enum):

GHOST = 'ghost'
IMS = 'ims'

class OrderByName(str, Enum):
"""
Order the output by tag name.
Expand Down Expand Up @@ -726,7 +726,6 @@ class Providers(str, Enum):

GHOST = 'ghost'
IMS = 'ims'

class TagType(str, Enum):
"""
The type of the tag. Supported values are `user`, `service` and `access`.
Expand All @@ -752,7 +751,6 @@ class Providers(str, Enum):

GHOST = 'ghost'
IMS = 'ims'

class TagType(str, Enum):
"""
The type of the tag. Supported values are `user`, `service` and `access`.
Expand Down Expand Up @@ -1051,9 +1049,9 @@ def from_dict(cls, _dict: Dict) -> 'DeleteTagResultsItem':
args['is_error'] = is_error
for k, v in _dict.items():
if k not in cls._properties:
if not isinstance(v, object):
raise ValueError('Value for additional property {} must be of type object'.format(k))
args[k] = v
if not isinstance(v, object):
raise ValueError('Value for additional property {} must be of type object'.format(k))
args[k] = v
return cls(**args)

@classmethod
Expand Down Expand Up @@ -1118,6 +1116,7 @@ class ProviderEnum(str, Enum):
IMS = 'ims'



class DeleteTagsResult:
"""
Results of deleting unattatched tags.
Expand Down
6 changes: 4 additions & 2 deletions test/unit/test_global_search_v2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2025.
# (C) Copyright IBM Corp. 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,9 @@
from ibm_platform_services.global_search_v2 import *


_service = GlobalSearchV2(authenticator=NoAuthAuthenticator())
_service = GlobalSearchV2(
authenticator=NoAuthAuthenticator()
)

_base_url = 'https://api.global-search-tagging.cloud.ibm.com'
_service.set_service_url(_base_url)
Expand Down
20 changes: 7 additions & 13 deletions test/unit/test_global_tagging_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
from ibm_platform_services.global_tagging_v1 import *


_service = GlobalTaggingV1(authenticator=NoAuthAuthenticator())
_service = GlobalTaggingV1(
authenticator=NoAuthAuthenticator()
)

_base_url = 'https://tags.global-search-tagging.cloud.ibm.com'
_service.set_service_url(_base_url)
Expand Down Expand Up @@ -905,18 +907,12 @@ def test_create_tag_results_results_item_serialization(self):
create_tag_results_results_item_model_json['is_error'] = True

# Construct a model instance of CreateTagResultsResultsItem by calling from_dict on the json representation
create_tag_results_results_item_model = CreateTagResultsResultsItem.from_dict(
create_tag_results_results_item_model_json
)
create_tag_results_results_item_model = CreateTagResultsResultsItem.from_dict(create_tag_results_results_item_model_json)
assert create_tag_results_results_item_model != False

# Construct a model instance of CreateTagResultsResultsItem by calling from_dict on the json representation
create_tag_results_results_item_model_dict = CreateTagResultsResultsItem.from_dict(
create_tag_results_results_item_model_json
).__dict__
create_tag_results_results_item_model2 = CreateTagResultsResultsItem(
**create_tag_results_results_item_model_dict
)
create_tag_results_results_item_model_dict = CreateTagResultsResultsItem.from_dict(create_tag_results_results_item_model_json).__dict__
create_tag_results_results_item_model2 = CreateTagResultsResultsItem(**create_tag_results_results_item_model_dict)

# Verify the model instances are equivalent
assert create_tag_results_results_item_model == create_tag_results_results_item_model2
Expand Down Expand Up @@ -1216,9 +1212,7 @@ def test_tag_results_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.

tag_results_item_model = {} # TagResultsItem
tag_results_item_model['resource_id'] = (
'crn:v1:staging:public:resource-controller::a/5c2ac0d93c69e82c6c9c7c78dc4beda3::resource-group:1c061f4485b34360a8f8ee049880dc13'
)
tag_results_item_model['resource_id'] = 'crn:v1:staging:public:resource-controller::a/5c2ac0d93c69e82c6c9c7c78dc4beda3::resource-group:1c061f4485b34360a8f8ee049880dc13'
tag_results_item_model['is_error'] = False
tag_results_item_model['message'] = 'testString'

Expand Down
Loading