|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
| 19 | + |
| 20 | +from aliyunsdkcore.request import RpcRequest |
| 21 | + |
| 22 | +class ListMultiAccountResourceRelationshipsRequest(RpcRequest): |
| 23 | + |
| 24 | + def __init__(self): |
| 25 | + RpcRequest.__init__(self, 'ResourceCenter', '2022-12-01', 'ListMultiAccountResourceRelationships') |
| 26 | + self.set_protocol_type('https') |
| 27 | + self.set_method('POST') |
| 28 | + |
| 29 | + def get_NextToken(self): # String |
| 30 | + return self.get_query_params().get('NextToken') |
| 31 | + |
| 32 | + def set_NextToken(self, NextToken): # String |
| 33 | + self.add_query_param('NextToken', NextToken) |
| 34 | + def get_Scope(self): # String |
| 35 | + return self.get_query_params().get('Scope') |
| 36 | + |
| 37 | + def set_Scope(self, Scope): # String |
| 38 | + self.add_query_param('Scope', Scope) |
| 39 | + def get_ResourceId(self): # String |
| 40 | + return self.get_query_params().get('ResourceId') |
| 41 | + |
| 42 | + def set_ResourceId(self, ResourceId): # String |
| 43 | + self.add_query_param('ResourceId', ResourceId) |
| 44 | + def get_ResourceType(self): # String |
| 45 | + return self.get_query_params().get('ResourceType') |
| 46 | + |
| 47 | + def set_ResourceType(self, ResourceType): # String |
| 48 | + self.add_query_param('ResourceType', ResourceType) |
| 49 | + def get_RelatedResourceFilters(self): # RepeatList |
| 50 | + return self.get_query_params().get('RelatedResourceFilter') |
| 51 | + |
| 52 | + def set_RelatedResourceFilters(self, RelatedResourceFilter): # RepeatList |
| 53 | + for depth1 in range(len(RelatedResourceFilter)): |
| 54 | + if RelatedResourceFilter[depth1].get('MatchType') is not None: |
| 55 | + self.add_query_param('RelatedResourceFilter.' + str(depth1 + 1) + '.MatchType', RelatedResourceFilter[depth1].get('MatchType')) |
| 56 | + if RelatedResourceFilter[depth1].get('Value') is not None: |
| 57 | + for depth2 in range(len(RelatedResourceFilter[depth1].get('Value'))): |
| 58 | + self.add_query_param('RelatedResourceFilter.' + str(depth1 + 1) + '.Value.' + str(depth2 + 1), RelatedResourceFilter[depth1].get('Value')[depth2]) |
| 59 | + if RelatedResourceFilter[depth1].get('Key') is not None: |
| 60 | + self.add_query_param('RelatedResourceFilter.' + str(depth1 + 1) + '.Key', RelatedResourceFilter[depth1].get('Key')) |
| 61 | + def get_MaxResults(self): # Integer |
| 62 | + return self.get_query_params().get('MaxResults') |
| 63 | + |
| 64 | + def set_MaxResults(self, MaxResults): # Integer |
| 65 | + self.add_query_param('MaxResults', MaxResults) |
0 commit comments