diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java index 49f59f83ca..c23c911628 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-9ae61cfc-20210302-143858 + * IBM OpenAPI SDK Code Generator Version: 3.29.1-b338fb38-20210313-010605 */ package com.ibm.cloud.platform_services.resource_controller.v2; @@ -158,6 +158,12 @@ public ServiceCall listResourceInstances(ListResourceInst if (listResourceInstancesOptions.limit() != null) { builder.query("limit", String.valueOf(listResourceInstancesOptions.limit())); } + if (listResourceInstancesOptions.state() != null) { + builder.query("state", String.valueOf(listResourceInstancesOptions.state())); + } + if (listResourceInstancesOptions.orderDirection() != null) { + builder.query("order_direction", String.valueOf(listResourceInstancesOptions.orderDirection())); + } if (listResourceInstancesOptions.updatedFrom() != null) { builder.query("updated_from", String.valueOf(listResourceInstancesOptions.updatedFrom())); } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceAliasOptions.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceAliasOptions.java index 6a682e0fbc..ecb15fb2bf 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceAliasOptions.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceAliasOptions.java @@ -146,7 +146,7 @@ public String source() { /** * Gets the target. * - * The CRN of target name(space) in a specific environment, e.g. space in Dallas YP, CFEE instance etc. + * The CRN of target name(space) in a specific environment, for example, space in Dallas YP, CFEE instance etc. * * @return the target */ diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceBindingOptions.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceBindingOptions.java index cd7a5ce143..57ea7e1c2c 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceBindingOptions.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/CreateResourceBindingOptions.java @@ -160,7 +160,7 @@ public String source() { /** * Gets the target. * - * The CRN of application to bind to in a specific environment, e.g. Dallas YP, CFEE instance. + * The CRN of application to bind to in a specific environment, for example, Dallas YP, CFEE instance. * * @return the target */ diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceBindingsOptions.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceBindingsOptions.java index 0fac3c37e4..3b56e9f1d1 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceBindingsOptions.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceBindingsOptions.java @@ -223,7 +223,7 @@ public String resourceId() { /** * Gets the regionBindingId. * - * Short ID of the binding in the specific targeted environment, e.g. service_binding_id in a given IBM Cloud + * Short ID of the binding in the specific targeted environment, for example, service_binding_id in a given IBM Cloud * environment. * * @return the regionBindingId diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptions.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptions.java index cd2f28ecdb..7a88e5ff23 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptions.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptions.java @@ -19,6 +19,28 @@ */ public class ListResourceInstancesOptions extends GenericModel { + /** + * The state of the instance. If not specified, instances in state `active` and `provisioning` are returned. + */ + public interface State { + /** active. */ + String ACTIVE = "active"; + /** provisioning. */ + String PROVISIONING = "provisioning"; + /** removed. */ + String REMOVED = "removed"; + } + + /** + * Order of results. + */ + public interface OrderDirection { + /** asc. */ + String ASC = "asc"; + /** desc. */ + String DESC = "desc"; + } + protected String guid; protected String name; protected String resourceGroupId; @@ -27,6 +49,8 @@ public class ListResourceInstancesOptions extends GenericModel { protected String type; protected String subType; protected String limit; + protected String state; + protected String orderDirection; protected String updatedFrom; protected String updatedTo; @@ -42,6 +66,8 @@ public static class Builder { private String type; private String subType; private String limit; + private String state; + private String orderDirection; private String updatedFrom; private String updatedTo; @@ -54,6 +80,8 @@ private Builder(ListResourceInstancesOptions listResourceInstancesOptions) { this.type = listResourceInstancesOptions.type; this.subType = listResourceInstancesOptions.subType; this.limit = listResourceInstancesOptions.limit; + this.state = listResourceInstancesOptions.state; + this.orderDirection = listResourceInstancesOptions.orderDirection; this.updatedFrom = listResourceInstancesOptions.updatedFrom; this.updatedTo = listResourceInstancesOptions.updatedTo; } @@ -161,6 +189,28 @@ public Builder limit(String limit) { return this; } + /** + * Set the state. + * + * @param state the state + * @return the ListResourceInstancesOptions builder + */ + public Builder state(String state) { + this.state = state; + return this; + } + + /** + * Set the orderDirection. + * + * @param orderDirection the orderDirection + * @return the ListResourceInstancesOptions builder + */ + public Builder orderDirection(String orderDirection) { + this.orderDirection = orderDirection; + return this; + } + /** * Set the updatedFrom. * @@ -193,6 +243,8 @@ protected ListResourceInstancesOptions(Builder builder) { type = builder.type; subType = builder.subType; limit = builder.limit; + state = builder.state; + orderDirection = builder.orderDirection; updatedFrom = builder.updatedFrom; updatedTo = builder.updatedTo; } @@ -266,7 +318,7 @@ public String resourcePlanId() { /** * Gets the type. * - * The type of the instance. For example, `service_instance`. + * The type of the instance, for example, `service_instance`. * * @return the type */ @@ -277,7 +329,7 @@ public String type() { /** * Gets the subType. * - * The sub-type of instance, e.g. `cfaas`. + * The sub-type of instance, for example, `cfaas`. * * @return the subType */ @@ -296,6 +348,28 @@ public String limit() { return limit; } + /** + * Gets the state. + * + * The state of the instance. If not specified, instances in state `active` and `provisioning` are returned. + * + * @return the state + */ + public String state() { + return state; + } + + /** + * Gets the orderDirection. + * + * Order of results. + * + * @return the orderDirection + */ + public String orderDirection() { + return orderDirection; + } + /** * Gets the updatedFrom. * diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAlias.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAlias.java index 556a74a91f..3ecf3887ea 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAlias.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAlias.java @@ -24,40 +24,43 @@ public class ResourceAlias extends GenericModel { protected String id; protected String guid; - protected String crn; protected String url; + @SerializedName("created_at") + protected Date createdAt; + @SerializedName("updated_at") + protected Date updatedAt; + @SerializedName("deleted_at") + protected Date deletedAt; + @SerializedName("created_by") + protected String createdBy; + @SerializedName("updated_by") + protected String updatedBy; + @SerializedName("deleted_by") + protected String deletedBy; protected String name; + @SerializedName("resource_instance_id") + protected String resourceInstanceId; + @SerializedName("target_crn") + protected String targetCrn; @SerializedName("account_id") protected String accountId; + @SerializedName("resource_id") + protected String resourceId; @SerializedName("resource_group_id") protected String resourceGroupId; - @SerializedName("resource_group_crn") - protected String resourceGroupCrn; - @SerializedName("target_crn") - protected String targetCrn; - protected String state; - @SerializedName("resource_instance_id") - protected String resourceInstanceId; + protected String crn; @SerializedName("region_instance_id") protected String regionInstanceId; + @SerializedName("region_instance_crn") + protected String regionInstanceCrn; + protected String state; + protected Boolean migrated; @SerializedName("resource_instance_url") protected String resourceInstanceUrl; @SerializedName("resource_bindings_url") protected String resourceBindingsUrl; @SerializedName("resource_keys_url") protected String resourceKeysUrl; - @SerializedName("created_at") - protected Date createdAt; - @SerializedName("updated_at") - protected Date updatedAt; - @SerializedName("deleted_at") - protected Date deletedAt; - @SerializedName("created_by") - protected String createdBy; - @SerializedName("updated_by") - protected String updatedBy; - @SerializedName("deleted_by") - protected String deletedBy; /** * Gets the id. @@ -83,98 +86,97 @@ public String getGuid() { } /** - * Gets the crn. + * Gets the url. * - * The full Cloud Resource Name (CRN) associated with the alias. For more information about this format, see [Cloud - * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + * When you created a new alias, a relative URL path is created identifying the location of the alias. * - * @return the crn + * @return the url */ - public String getCrn() { - return crn; + public String getUrl() { + return url; } /** - * Gets the url. + * Gets the createdAt. * - * When you created a new alias, a relative URL path is created identifying the location of the alias. + * The date when the alias was created. * - * @return the url + * @return the createdAt */ - public String getUrl() { - return url; + public Date getCreatedAt() { + return createdAt; } /** - * Gets the name. + * Gets the updatedAt. * - * The human-readable name of the alias. + * The date when the alias was last updated. * - * @return the name + * @return the updatedAt */ - public String getName() { - return name; + public Date getUpdatedAt() { + return updatedAt; } /** - * Gets the accountId. + * Gets the deletedAt. * - * An alpha-numeric value identifying the account ID. + * The date when the alias was deleted. * - * @return the accountId + * @return the deletedAt */ - public String getAccountId() { - return accountId; + public Date getDeletedAt() { + return deletedAt; } /** - * Gets the resourceGroupId. + * Gets the createdBy. * - * The short ID of the resource group. + * The subject who created the alias. * - * @return the resourceGroupId + * @return the createdBy */ - public String getResourceGroupId() { - return resourceGroupId; + public String getCreatedBy() { + return createdBy; } /** - * Gets the resourceGroupCrn. + * Gets the updatedBy. * - * The long ID (full CRN) of the resource group. + * The subject who updated the alias. * - * @return the resourceGroupCrn + * @return the updatedBy */ - public String getResourceGroupCrn() { - return resourceGroupCrn; + public String getUpdatedBy() { + return updatedBy; } /** - * Gets the targetCrn. + * Gets the deletedBy. * - * The CRN of the target namespace in the specific environment. + * The subject who deleted the alias. * - * @return the targetCrn + * @return the deletedBy */ - public String getTargetCrn() { - return targetCrn; + public String getDeletedBy() { + return deletedBy; } /** - * Gets the state. + * Gets the name. * - * The state of the alias. + * The human-readable name of the alias. * - * @return the state + * @return the name */ - public String getState() { - return state; + public String getName() { + return name; } /** * Gets the resourceInstanceId. * - * The short ID of the resource instance that is being aliased. + * The ID of the resource instance that is being aliased. * * @return the resourceInstanceId */ @@ -183,114 +185,137 @@ public String getResourceInstanceId() { } /** - * Gets the regionInstanceId. + * Gets the targetCrn. * - * The short ID of the instance in the specific target environment, e.g. `service_instance_id` in a given IBM Cloud - * environment. + * The CRN of the target namespace in the specific environment. * - * @return the regionInstanceId + * @return the targetCrn */ - public String getRegionInstanceId() { - return regionInstanceId; + public String getTargetCrn() { + return targetCrn; } /** - * Gets the resourceInstanceUrl. + * Gets the accountId. * - * The relative path to the instance. + * An alpha-numeric value identifying the account ID. * - * @return the resourceInstanceUrl + * @return the accountId */ - public String getResourceInstanceUrl() { - return resourceInstanceUrl; + public String getAccountId() { + return accountId; } /** - * Gets the resourceBindingsUrl. + * Gets the resourceId. * - * The relative path to the resource bindings for the alias. + * The unique ID of the offering. This value is provided by and stored in the global catalog. * - * @return the resourceBindingsUrl + * @return the resourceId */ - public String getResourceBindingsUrl() { - return resourceBindingsUrl; + public String getResourceId() { + return resourceId; } /** - * Gets the resourceKeysUrl. + * Gets the resourceGroupId. * - * The relative path to the resource keys for the alias. + * The ID of the resource group. * - * @return the resourceKeysUrl + * @return the resourceGroupId */ - public String getResourceKeysUrl() { - return resourceKeysUrl; + public String getResourceGroupId() { + return resourceGroupId; } /** - * Gets the createdAt. + * Gets the crn. * - * The date when the alias was created. + * The CRN of the alias. For more information about this format, see [Cloud Resource + * Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). * - * @return the createdAt + * @return the crn */ - public Date getCreatedAt() { - return createdAt; + public String getCrn() { + return crn; } /** - * Gets the updatedAt. + * Gets the regionInstanceId. * - * The date when the alias was last updated. + * The ID of the instance in the specific target environment, for example, `service_instance_id` in a given IBM Cloud + * environment. * - * @return the updatedAt + * @return the regionInstanceId */ - public Date getUpdatedAt() { - return updatedAt; + public String getRegionInstanceId() { + return regionInstanceId; } /** - * Gets the deletedAt. + * Gets the regionInstanceCrn. * - * The date when the alias was deleted. + * The CRN of the instance in the specific target environment. * - * @return the deletedAt + * @return the regionInstanceCrn */ - public Date getDeletedAt() { - return deletedAt; + public String getRegionInstanceCrn() { + return regionInstanceCrn; } /** - * Gets the createdBy. + * Gets the state. * - * The subject who created the alias. + * The state of the alias. * - * @return the createdBy + * @return the state */ - public String getCreatedBy() { - return createdBy; + public String getState() { + return state; } /** - * Gets the updatedBy. + * Gets the migrated. * - * The subject who updated the alias. + * A boolean that dictates if the alias was migrated from a previous CF instance. * - * @return the updatedBy + * @return the migrated */ - public String getUpdatedBy() { - return updatedBy; + public Boolean isMigrated() { + return migrated; } /** - * Gets the deletedBy. + * Gets the resourceInstanceUrl. * - * The subject who deleted the alias. + * The relative path to the resource instance. * - * @return the deletedBy + * @return the resourceInstanceUrl */ - public String getDeletedBy() { - return deletedBy; + public String getResourceInstanceUrl() { + return resourceInstanceUrl; + } + + /** + * Gets the resourceBindingsUrl. + * + * The relative path to the resource bindings for the alias. + * + * @return the resourceBindingsUrl + */ + public String getResourceBindingsUrl() { + return resourceBindingsUrl; + } + + /** + * Gets the resourceKeysUrl. + * + * The relative path to the resource keys for the alias. + * + * @return the resourceKeysUrl + */ + public String getResourceKeysUrl() { + return resourceKeysUrl; } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesList.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesList.java index b7f79f9208..6fc75b503e 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesList.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesList.java @@ -22,11 +22,22 @@ */ public class ResourceAliasesList extends GenericModel { + @SerializedName("rows_count") + protected Long rowsCount; @SerializedName("next_url") protected String nextUrl; protected List resources; - @SerializedName("rows_count") - protected Long rowsCount; + + /** + * Gets the rowsCount. + * + * The number of resource aliases in `resources`. + * + * @return the rowsCount + */ + public Long getRowsCount() { + return rowsCount; + } /** * Gets the nextUrl. @@ -49,16 +60,5 @@ public String getNextUrl() { public List getResources() { return resources; } - - /** - * Gets the rowsCount. - * - * The number of resource aliases in `resources`. - * - * @return the rowsCount - */ - public Long getRowsCount() { - return rowsCount; - } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBinding.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBinding.java index bd6b34d5fc..24b59d50ae 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBinding.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBinding.java @@ -24,26 +24,7 @@ public class ResourceBinding extends GenericModel { protected String id; protected String guid; - protected String crn; protected String url; - protected String name; - @SerializedName("account_id") - protected String accountId; - @SerializedName("resource_group_id") - protected String resourceGroupId; - @SerializedName("source_crn") - protected String sourceCrn; - @SerializedName("target_crn") - protected String targetCrn; - protected String role; - @SerializedName("region_binding_id") - protected String regionBindingId; - protected String state; - protected Credentials credentials; - @SerializedName("iam_compatible") - protected Boolean iamCompatible; - @SerializedName("resource_alias_url") - protected String resourceAliasUrl; @SerializedName("created_at") protected Date createdAt; @SerializedName("updated_at") @@ -56,6 +37,29 @@ public class ResourceBinding extends GenericModel { protected String updatedBy; @SerializedName("deleted_by") protected String deletedBy; + @SerializedName("source_crn") + protected String sourceCrn; + @SerializedName("target_crn") + protected String targetCrn; + protected String crn; + @SerializedName("region_binding_id") + protected String regionBindingId; + @SerializedName("region_binding_crn") + protected String regionBindingCrn; + protected String name; + @SerializedName("account_id") + protected String accountId; + @SerializedName("resource_group_id") + protected String resourceGroupId; + protected String state; + protected Credentials credentials; + @SerializedName("iam_compatible") + protected Boolean iamCompatible; + @SerializedName("resource_id") + protected String resourceId; + protected Boolean migrated; + @SerializedName("resource_alias_url") + protected String resourceAliasUrl; /** * Gets the id. @@ -81,59 +85,80 @@ public String getGuid() { } /** - * Gets the crn. + * Gets the url. * - * The full Cloud Resource Name (CRN) associated with the binding. For more information about this format, see [Cloud - * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + * When you provision a new binding, a relative URL path is created identifying the location of the binding. * - * @return the crn + * @return the url */ - public String getCrn() { - return crn; + public String getUrl() { + return url; } /** - * Gets the url. + * Gets the createdAt. * - * When you provision a new binding, a relative URL path is created identifying the location of the binding. + * The date when the binding was created. * - * @return the url + * @return the createdAt */ - public String getUrl() { - return url; + public Date getCreatedAt() { + return createdAt; } /** - * Gets the name. + * Gets the updatedAt. * - * The human-readable name of the binding. + * The date when the binding was last updated. * - * @return the name + * @return the updatedAt */ - public String getName() { - return name; + public Date getUpdatedAt() { + return updatedAt; } /** - * Gets the accountId. + * Gets the deletedAt. * - * An alpha-numeric value identifying the account ID. + * The date when the binding was deleted. * - * @return the accountId + * @return the deletedAt */ - public String getAccountId() { - return accountId; + public Date getDeletedAt() { + return deletedAt; } /** - * Gets the resourceGroupId. + * Gets the createdBy. * - * The short ID of the resource group. + * The subject who created the binding. * - * @return the resourceGroupId + * @return the createdBy */ - public String getResourceGroupId() { - return resourceGroupId; + public String getCreatedBy() { + return createdBy; + } + + /** + * Gets the updatedBy. + * + * The subject who updated the binding. + * + * @return the updatedBy + */ + public String getUpdatedBy() { + return updatedBy; + } + + /** + * Gets the deletedBy. + * + * The subject who deleted the binding. + * + * @return the deletedBy + */ + public String getDeletedBy() { + return deletedBy; } /** @@ -150,7 +175,7 @@ public String getSourceCrn() { /** * Gets the targetCrn. * - * The CRN of target resource, e.g. application, in a specific environment. + * The CRN of target resource, for example, application, in a specific environment. * * @return the targetCrn */ @@ -159,20 +184,21 @@ public String getTargetCrn() { } /** - * Gets the role. + * Gets the crn. * - * The role CRN. + * The full Cloud Resource Name (CRN) associated with the binding. For more information about this format, see [Cloud + * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). * - * @return the role + * @return the crn */ - public String getRole() { - return role; + public String getCrn() { + return crn; } /** * Gets the regionBindingId. * - * The short ID of the binding in specific targeted environment, e.g. `service_binding_id` in a given IBM Cloud + * The ID of the binding in the specific target environment, for example, `service_binding_id` in a given IBM Cloud * environment. * * @return the regionBindingId @@ -182,114 +208,114 @@ public String getRegionBindingId() { } /** - * Gets the state. + * Gets the regionBindingCrn. * - * The state of the binding. + * The CRN of the binding in the specific target environment. * - * @return the state + * @return the regionBindingCrn */ - public String getState() { - return state; + public String getRegionBindingCrn() { + return regionBindingCrn; } /** - * Gets the credentials. + * Gets the name. * - * The credentials for the binding. Additional key-value pairs are passed through from the resource brokers. For - * additional details, see the service’s documentation. + * The human-readable name of the binding. * - * @return the credentials + * @return the name */ - public Credentials getCredentials() { - return credentials; + public String getName() { + return name; } /** - * Gets the iamCompatible. + * Gets the accountId. * - * Specifies whether the binding’s credentials support IAM. + * An alpha-numeric value identifying the account ID. * - * @return the iamCompatible + * @return the accountId */ - public Boolean isIamCompatible() { - return iamCompatible; + public String getAccountId() { + return accountId; } /** - * Gets the resourceAliasUrl. + * Gets the resourceGroupId. * - * The relative path to the resource alias that this binding is associated with. + * The ID of the resource group. * - * @return the resourceAliasUrl + * @return the resourceGroupId */ - public String getResourceAliasUrl() { - return resourceAliasUrl; + public String getResourceGroupId() { + return resourceGroupId; } /** - * Gets the createdAt. + * Gets the state. * - * The date when the binding was created. + * The state of the binding. * - * @return the createdAt + * @return the state */ - public Date getCreatedAt() { - return createdAt; + public String getState() { + return state; } /** - * Gets the updatedAt. + * Gets the credentials. * - * The date when the binding was last updated. + * The credentials for the binding. Additional key-value pairs are passed through from the resource brokers. For + * additional details, see the service’s documentation. * - * @return the updatedAt + * @return the credentials */ - public Date getUpdatedAt() { - return updatedAt; + public Credentials getCredentials() { + return credentials; } /** - * Gets the deletedAt. + * Gets the iamCompatible. * - * The date when the binding was deleted. + * Specifies whether the binding’s credentials support IAM. * - * @return the deletedAt + * @return the iamCompatible */ - public Date getDeletedAt() { - return deletedAt; + public Boolean isIamCompatible() { + return iamCompatible; } /** - * Gets the createdBy. + * Gets the resourceId. * - * The subject who created the binding. + * The unique ID of the offering. This value is provided by and stored in the global catalog. * - * @return the createdBy + * @return the resourceId */ - public String getCreatedBy() { - return createdBy; + public String getResourceId() { + return resourceId; } /** - * Gets the updatedBy. + * Gets the migrated. * - * The subject who updated the binding. + * A boolean that dictates if the alias was migrated from a previous CF instance. * - * @return the updatedBy + * @return the migrated */ - public String getUpdatedBy() { - return updatedBy; + public Boolean isMigrated() { + return migrated; } /** - * Gets the deletedBy. + * Gets the resourceAliasUrl. * - * The subject who deleted the binding. + * The relative path to the resource alias that this binding is associated with. * - * @return the deletedBy + * @return the resourceAliasUrl */ - public String getDeletedBy() { - return deletedBy; + public String getResourceAliasUrl() { + return resourceAliasUrl; } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsList.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsList.java index 14ccaaa79f..cdd8116c45 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsList.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsList.java @@ -22,11 +22,22 @@ */ public class ResourceBindingsList extends GenericModel { + @SerializedName("rows_count") + protected Long rowsCount; @SerializedName("next_url") protected String nextUrl; protected List resources; - @SerializedName("rows_count") - protected Long rowsCount; + + /** + * Gets the rowsCount. + * + * The number of resource bindings in `resources`. + * + * @return the rowsCount + */ + public Long getRowsCount() { + return rowsCount; + } /** * Gets the nextUrl. @@ -49,16 +60,5 @@ public String getNextUrl() { public List getResources() { return resources; } - - /** - * Gets the rowsCount. - * - * The number of resource bindings in `resources`. - * - * @return the rowsCount - */ - public Long getRowsCount() { - return rowsCount; - } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java index ca56142aaf..8a02a3cb06 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java @@ -26,62 +26,69 @@ public class ResourceInstance extends GenericModel { protected String id; protected String guid; - protected String crn; protected String url; + @SerializedName("created_at") + protected Date createdAt; + @SerializedName("updated_at") + protected Date updatedAt; + @SerializedName("deleted_at") + protected Date deletedAt; + @SerializedName("created_by") + protected String createdBy; + @SerializedName("updated_by") + protected String updatedBy; + @SerializedName("deleted_by") + protected String deletedBy; + @SerializedName("scheduled_reclaim_at") + protected Date scheduledReclaimAt; + @SerializedName("restored_at") + protected Date restoredAt; + @SerializedName("restored_by") + protected String restoredBy; + @SerializedName("scheduled_reclaim_by") + protected String scheduledReclaimBy; protected String name; + @SerializedName("region_id") + protected String regionId; @SerializedName("account_id") protected String accountId; + @SerializedName("reseller_channel_id") + protected String resellerChannelId; + @SerializedName("resource_plan_id") + protected String resourcePlanId; @SerializedName("resource_group_id") protected String resourceGroupId; @SerializedName("resource_group_crn") protected String resourceGroupCrn; - @SerializedName("resource_id") - protected String resourceId; - @SerializedName("resource_plan_id") - protected String resourcePlanId; @SerializedName("target_crn") protected String targetCrn; protected Map parameters; + @SerializedName("allow_cleanup") + protected Boolean allowCleanup; + protected String crn; protected String state; protected String type; @SerializedName("sub_type") protected String subType; - @SerializedName("allow_cleanup") - protected Boolean allowCleanup; - protected Boolean locked; - @SerializedName("last_operation") - protected Map lastOperation; + @SerializedName("resource_id") + protected String resourceId; @SerializedName("dashboard_url") protected String dashboardUrl; - @SerializedName("plan_history") - protected List planHistory; - protected Map extensions; + @SerializedName("last_operation") + protected Map lastOperation; @SerializedName("resource_aliases_url") protected String resourceAliasesUrl; @SerializedName("resource_bindings_url") protected String resourceBindingsUrl; @SerializedName("resource_keys_url") protected String resourceKeysUrl; - @SerializedName("created_at") - protected Date createdAt; - @SerializedName("created_by") - protected String createdBy; - @SerializedName("updated_at") - protected Date updatedAt; - @SerializedName("updated_by") - protected String updatedBy; - @SerializedName("deleted_at") - protected Date deletedAt; - @SerializedName("deleted_by") - protected String deletedBy; - @SerializedName("scheduled_reclaim_at") - protected Date scheduledReclaimAt; - @SerializedName("scheduled_reclaim_by") - protected String scheduledReclaimBy; - @SerializedName("restored_at") - protected Date restoredAt; - @SerializedName("restored_by") - protected String restoredBy; + @SerializedName("plan_history") + protected List planHistory; + protected Boolean migrated; + protected Map extensions; + @SerializedName("controlled_by") + protected String controlledBy; + protected Boolean locked; /** * Gets the id. @@ -107,26 +114,124 @@ public String getGuid() { } /** - * Gets the crn. + * Gets the url. * - * The full Cloud Resource Name (CRN) associated with the instance. For more information about this format, see [Cloud - * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + * When you provision a new resource, a relative URL path is created identifying the location of the instance. * - * @return the crn + * @return the url */ - public String getCrn() { - return crn; + public String getUrl() { + return url; } /** - * Gets the url. + * Gets the createdAt. * - * When you provision a new resource, a relative URL path is created identifying the location of the instance. + * The date when the instance was created. * - * @return the url + * @return the createdAt */ - public String getUrl() { - return url; + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the updatedAt. + * + * The date when the instance was last updated. + * + * @return the updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Gets the deletedAt. + * + * The date when the instance was deleted. + * + * @return the deletedAt + */ + public Date getDeletedAt() { + return deletedAt; + } + + /** + * Gets the createdBy. + * + * The subject who created the instance. + * + * @return the createdBy + */ + public String getCreatedBy() { + return createdBy; + } + + /** + * Gets the updatedBy. + * + * The subject who updated the instance. + * + * @return the updatedBy + */ + public String getUpdatedBy() { + return updatedBy; + } + + /** + * Gets the deletedBy. + * + * The subject who deleted the instance. + * + * @return the deletedBy + */ + public String getDeletedBy() { + return deletedBy; + } + + /** + * Gets the scheduledReclaimAt. + * + * The date when the instance was scheduled for reclamation. + * + * @return the scheduledReclaimAt + */ + public Date getScheduledReclaimAt() { + return scheduledReclaimAt; + } + + /** + * Gets the restoredAt. + * + * The date when the instance under reclamation was restored. + * + * @return the restoredAt + */ + public Date getRestoredAt() { + return restoredAt; + } + + /** + * Gets the restoredBy. + * + * The subject who restored the instance back from reclamation. + * + * @return the restoredBy + */ + public String getRestoredBy() { + return restoredBy; + } + + /** + * Gets the scheduledReclaimBy. + * + * The subject who initiated the instance reclamation. + * + * @return the scheduledReclaimBy + */ + public String getScheduledReclaimBy() { + return scheduledReclaimBy; } /** @@ -140,6 +245,17 @@ public String getName() { return name; } + /** + * Gets the regionId. + * + * The deployment location where the instance was provisioned. + * + * @return the regionId + */ + public String getRegionId() { + return regionId; + } + /** * Gets the accountId. * @@ -152,54 +268,54 @@ public String getAccountId() { } /** - * Gets the resourceGroupId. + * Gets the resellerChannelId. * - * The short ID of the resource group. + * The unique ID of the reseller channel where the instance was provisioned from. * - * @return the resourceGroupId + * @return the resellerChannelId */ - public String getResourceGroupId() { - return resourceGroupId; + public String getResellerChannelId() { + return resellerChannelId; } /** - * Gets the resourceGroupCrn. + * Gets the resourcePlanId. * - * The long ID (full CRN) of the resource group. + * The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. * - * @return the resourceGroupCrn + * @return the resourcePlanId */ - public String getResourceGroupCrn() { - return resourceGroupCrn; + public String getResourcePlanId() { + return resourcePlanId; } /** - * Gets the resourceId. + * Gets the resourceGroupId. * - * The unique ID of the offering. This value is provided by and stored in the global catalog. + * The ID of the resource group. * - * @return the resourceId + * @return the resourceGroupId */ - public String getResourceId() { - return resourceId; + public String getResourceGroupId() { + return resourceGroupId; } /** - * Gets the resourcePlanId. + * Gets the resourceGroupCrn. * - * The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. + * The CRN of the resource group. * - * @return the resourcePlanId + * @return the resourceGroupCrn */ - public String getResourcePlanId() { - return resourcePlanId; + public String getResourceGroupCrn() { + return resourceGroupCrn; } /** * Gets the targetCrn. * - * The full deployment CRN as defined in the global catalog. The Cloud Resource Name (CRN) of the deployment location - * where the instance is provisioned. + * The deployment CRN as defined in the global catalog. The Cloud Resource Name (CRN) of the deployment location where + * the instance is provisioned. * * @return the targetCrn */ @@ -218,6 +334,30 @@ public Map getParameters() { return parameters; } + /** + * Gets the allowCleanup. + * + * A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region + * instance delete call. + * + * @return the allowCleanup + */ + public Boolean isAllowCleanup() { + return allowCleanup; + } + + /** + * Gets the crn. + * + * The full Cloud Resource Name (CRN) associated with the instance. For more information about this format, see [Cloud + * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + * + * @return the crn + */ + public String getCrn() { + return crn; + } + /** * Gets the state. * @@ -232,7 +372,7 @@ public String getState() { /** * Gets the type. * - * The type of the instance, e.g. `service_instance`. + * The type of the instance, for example, `service_instance`. * * @return the type */ @@ -243,7 +383,7 @@ public String getType() { /** * Gets the subType. * - * The sub-type of instance, e.g. `cfaas`. + * The sub-type of instance, for example, `cfaas`. * * @return the subType */ @@ -252,37 +392,14 @@ public String getSubType() { } /** - * Gets the allowCleanup. - * - * A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region - * instance delete call. - * - * @return the allowCleanup - */ - public Boolean isAllowCleanup() { - return allowCleanup; - } - - /** - * Gets the locked. - * - * A boolean that dictates if the resource instance is locked or not. - * - * @return the locked - */ - public Boolean isLocked() { - return locked; - } - - /** - * Gets the lastOperation. + * Gets the resourceId. * - * The status of the last operation requested on the instance. + * The unique ID of the offering. This value is provided by and stored in the global catalog. * - * @return the lastOperation + * @return the resourceId */ - public Map getLastOperation() { - return lastOperation; + public String getResourceId() { + return resourceId; } /** @@ -297,25 +414,14 @@ public String getDashboardUrl() { } /** - * Gets the planHistory. - * - * The plan history of the instance. - * - * @return the planHistory - */ - public List getPlanHistory() { - return planHistory; - } - - /** - * Gets the extensions. + * Gets the lastOperation. * - * Additional instance properties, contributed by the service and/or platform, are represented as key-value pairs. + * The status of the last operation requested on the instance. * - * @return the extensions + * @return the lastOperation */ - public Map getExtensions() { - return extensions; + public Map getLastOperation() { + return lastOperation; } /** @@ -352,113 +458,58 @@ public String getResourceKeysUrl() { } /** - * Gets the createdAt. - * - * The date when the instance was created. - * - * @return the createdAt - */ - public Date getCreatedAt() { - return createdAt; - } - - /** - * Gets the createdBy. - * - * The subject who created the instance. - * - * @return the createdBy - */ - public String getCreatedBy() { - return createdBy; - } - - /** - * Gets the updatedAt. - * - * The date when the instance was last updated. - * - * @return the updatedAt - */ - public Date getUpdatedAt() { - return updatedAt; - } - - /** - * Gets the updatedBy. - * - * The subject who updated the instance. - * - * @return the updatedBy - */ - public String getUpdatedBy() { - return updatedBy; - } - - /** - * Gets the deletedAt. - * - * The date when the instance was deleted. - * - * @return the deletedAt - */ - public Date getDeletedAt() { - return deletedAt; - } - - /** - * Gets the deletedBy. + * Gets the planHistory. * - * The subject who deleted the instance. + * The plan history of the instance. * - * @return the deletedBy + * @return the planHistory */ - public String getDeletedBy() { - return deletedBy; + public List getPlanHistory() { + return planHistory; } /** - * Gets the scheduledReclaimAt. + * Gets the migrated. * - * The date when the instance was scheduled for reclamation. + * A boolean that dictates if the resource instance was migrated from a previous CF instance. * - * @return the scheduledReclaimAt + * @return the migrated */ - public Date getScheduledReclaimAt() { - return scheduledReclaimAt; + public Boolean isMigrated() { + return migrated; } /** - * Gets the scheduledReclaimBy. + * Gets the extensions. * - * The subject who initiated the instance reclamation. + * Additional instance properties, contributed by the service and/or platform, are represented as key-value pairs. * - * @return the scheduledReclaimBy + * @return the extensions */ - public String getScheduledReclaimBy() { - return scheduledReclaimBy; + public Map getExtensions() { + return extensions; } /** - * Gets the restoredAt. + * Gets the controlledBy. * - * The date when the instance under reclamation was restored. + * The CRN of the resource that has control of the instance. * - * @return the restoredAt + * @return the controlledBy */ - public Date getRestoredAt() { - return restoredAt; + public String getControlledBy() { + return controlledBy; } /** - * Gets the restoredBy. + * Gets the locked. * - * The subject who restored the instance back from reclamation. + * A boolean that dictates if the resource instance is locked or not. * - * @return the restoredBy + * @return the locked */ - public String getRestoredBy() { - return restoredBy; + public Boolean isLocked() { + return locked; } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesList.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesList.java index f9587bb793..d00f0a6744 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesList.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesList.java @@ -22,11 +22,22 @@ */ public class ResourceInstancesList extends GenericModel { + @SerializedName("rows_count") + protected Long rowsCount; @SerializedName("next_url") protected String nextUrl; protected List resources; - @SerializedName("rows_count") - protected Long rowsCount; + + /** + * Gets the rowsCount. + * + * The number of resource instances in `resources`. + * + * @return the rowsCount + */ + public Long getRowsCount() { + return rowsCount; + } /** * Gets the nextUrl. @@ -49,16 +60,5 @@ public String getNextUrl() { public List getResources() { return resources; } - - /** - * Gets the rowsCount. - * - * The number of resource instances in `resources`. - * - * @return the rowsCount - */ - public Long getRowsCount() { - return rowsCount; - } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKey.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKey.java index b85f3e4f7d..6ca07bcb78 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKey.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKey.java @@ -24,22 +24,7 @@ public class ResourceKey extends GenericModel { protected String id; protected String guid; - protected String crn; protected String url; - protected String name; - @SerializedName("account_id") - protected String accountId; - @SerializedName("resource_group_id") - protected String resourceGroupId; - @SerializedName("source_crn") - protected String sourceCrn; - protected String role; - protected String state; - protected Credentials credentials; - @SerializedName("iam_compatible") - protected Boolean iamCompatible; - @SerializedName("resource_instance_url") - protected String resourceInstanceUrl; @SerializedName("created_at") protected Date createdAt; @SerializedName("updated_at") @@ -52,6 +37,25 @@ public class ResourceKey extends GenericModel { protected String updatedBy; @SerializedName("deleted_by") protected String deletedBy; + @SerializedName("source_crn") + protected String sourceCrn; + protected String name; + protected String crn; + protected String state; + @SerializedName("account_id") + protected String accountId; + @SerializedName("resource_group_id") + protected String resourceGroupId; + @SerializedName("resource_id") + protected String resourceId; + protected Credentials credentials; + @SerializedName("iam_compatible") + protected Boolean iamCompatible; + protected Boolean migrated; + @SerializedName("resource_instance_url") + protected String resourceInstanceUrl; + @SerializedName("resource_alias_url") + protected String resourceAliasUrl; /** * Gets the id. @@ -77,59 +81,80 @@ public String getGuid() { } /** - * Gets the crn. + * Gets the url. * - * The full Cloud Resource Name (CRN) associated with the key. For more information about this format, see [Cloud - * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + * When you created a new key, a relative URL path is created identifying the location of the key. * - * @return the crn + * @return the url */ - public String getCrn() { - return crn; + public String getUrl() { + return url; } /** - * Gets the url. + * Gets the createdAt. * - * When you created a new key, a relative URL path is created identifying the location of the key. + * The date when the key was created. * - * @return the url + * @return the createdAt */ - public String getUrl() { - return url; + public Date getCreatedAt() { + return createdAt; } /** - * Gets the name. + * Gets the updatedAt. * - * The human-readable name of the key. + * The date when the key was last updated. * - * @return the name + * @return the updatedAt */ - public String getName() { - return name; + public Date getUpdatedAt() { + return updatedAt; } /** - * Gets the accountId. + * Gets the deletedAt. * - * An alpha-numeric value identifying the account ID. + * The date when the key was deleted. * - * @return the accountId + * @return the deletedAt */ - public String getAccountId() { - return accountId; + public Date getDeletedAt() { + return deletedAt; } /** - * Gets the resourceGroupId. + * Gets the createdBy. + * + * The subject who created the key. + * + * @return the createdBy + */ + public String getCreatedBy() { + return createdBy; + } + + /** + * Gets the updatedBy. * - * The short ID of the resource group. + * The subject who updated the key. * - * @return the resourceGroupId + * @return the updatedBy */ - public String getResourceGroupId() { - return resourceGroupId; + public String getUpdatedBy() { + return updatedBy; + } + + /** + * Gets the deletedBy. + * + * The subject who deleted the key. + * + * @return the deletedBy + */ + public String getDeletedBy() { + return deletedBy; } /** @@ -144,125 +169,126 @@ public String getSourceCrn() { } /** - * Gets the role. + * Gets the name. * - * The role CRN. + * The human-readable name of the key. * - * @return the role + * @return the name */ - public String getRole() { - return role; + public String getName() { + return name; } /** - * Gets the state. + * Gets the crn. * - * The state of the key. + * The full Cloud Resource Name (CRN) associated with the key. For more information about this format, see [Cloud + * Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). * - * @return the state + * @return the crn */ - public String getState() { - return state; + public String getCrn() { + return crn; } /** - * Gets the credentials. + * Gets the state. * - * The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to - * service’s documentation for additional details. + * The state of the key. * - * @return the credentials + * @return the state */ - public Credentials getCredentials() { - return credentials; + public String getState() { + return state; } /** - * Gets the iamCompatible. + * Gets the accountId. * - * Specifies whether the key’s credentials support IAM. + * An alpha-numeric value identifying the account ID. * - * @return the iamCompatible + * @return the accountId */ - public Boolean isIamCompatible() { - return iamCompatible; + public String getAccountId() { + return accountId; } /** - * Gets the resourceInstanceUrl. + * Gets the resourceGroupId. * - * The relative path to the resource. + * The ID of the resource group. * - * @return the resourceInstanceUrl + * @return the resourceGroupId */ - public String getResourceInstanceUrl() { - return resourceInstanceUrl; + public String getResourceGroupId() { + return resourceGroupId; } /** - * Gets the createdAt. + * Gets the resourceId. * - * The date when the key was created. + * The unique ID of the offering. This value is provided by and stored in the global catalog. * - * @return the createdAt + * @return the resourceId */ - public Date getCreatedAt() { - return createdAt; + public String getResourceId() { + return resourceId; } /** - * Gets the updatedAt. + * Gets the credentials. * - * The date when the key was last updated. + * The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to + * service’s documentation for additional details. * - * @return the updatedAt + * @return the credentials */ - public Date getUpdatedAt() { - return updatedAt; + public Credentials getCredentials() { + return credentials; } /** - * Gets the deletedAt. + * Gets the iamCompatible. * - * The date when the key was deleted. + * Specifies whether the key’s credentials support IAM. * - * @return the deletedAt + * @return the iamCompatible */ - public Date getDeletedAt() { - return deletedAt; + public Boolean isIamCompatible() { + return iamCompatible; } /** - * Gets the createdBy. + * Gets the migrated. * - * The subject who created the key. + * A boolean that dictates if the alias was migrated from a previous CF instance. * - * @return the createdBy + * @return the migrated */ - public String getCreatedBy() { - return createdBy; + public Boolean isMigrated() { + return migrated; } /** - * Gets the updatedBy. + * Gets the resourceInstanceUrl. * - * The subject who updated the key. + * The relative path to the resource. * - * @return the updatedBy + * @return the resourceInstanceUrl */ - public String getUpdatedBy() { - return updatedBy; + public String getResourceInstanceUrl() { + return resourceInstanceUrl; } /** - * Gets the deletedBy. + * Gets the resourceAliasUrl. * - * The subject who deleted the key. + * The relative path to the resource alias that this binding is associated with. * - * @return the deletedBy + * @return the resourceAliasUrl */ - public String getDeletedBy() { - return deletedBy; + public String getResourceAliasUrl() { + return resourceAliasUrl; } } diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysList.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysList.java index 17ca1217af..679804ac72 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysList.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysList.java @@ -22,11 +22,22 @@ */ public class ResourceKeysList extends GenericModel { + @SerializedName("rows_count") + protected Long rowsCount; @SerializedName("next_url") protected String nextUrl; protected List resources; - @SerializedName("rows_count") - protected Long rowsCount; + + /** + * Gets the rowsCount. + * + * The number of resource keys in `resources`. + * + * @return the rowsCount + */ + public Long getRowsCount() { + return rowsCount; + } /** * Gets the nextUrl. @@ -49,16 +60,5 @@ public String getNextUrl() { public List getResources() { return resources; } - - /** - * Gets the rowsCount. - * - * The number of resource keys in `resources`. - * - * @return the rowsCount - */ - public Long getRowsCount() { - return rowsCount; - } } diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceControllerTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceControllerTest.java index 4a0d666c06..6878d9cfea 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceControllerTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceControllerTest.java @@ -123,7 +123,7 @@ public void testConstructorWithNullAuthenticator() throws Throwable { @Test public void testListResourceInstancesWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}]}"; String listResourceInstancesPath = "/v2/resource_instances"; server.enqueue(new MockResponse() @@ -143,6 +143,8 @@ public void testListResourceInstancesWOptions() throws Throwable { .type("testString") .subType("testString") .limit("testString") + .state("active") + .orderDirection("asc") .updatedFrom("2019-01-08T00:00:00.000Z") .updatedTo("2019-01-08T00:00:00.000Z") .build(); @@ -170,6 +172,8 @@ public void testListResourceInstancesWOptions() throws Throwable { assertEquals(query.get("type"), "testString"); assertEquals(query.get("sub_type"), "testString"); assertEquals(query.get("limit"), "testString"); + assertEquals(query.get("state"), "active"); + assertEquals(query.get("order_direction"), "asc"); assertEquals(query.get("updated_from"), "2019-01-08T00:00:00.000Z"); assertEquals(query.get("updated_to"), "2019-01-08T00:00:00.000Z"); // Check request path @@ -180,7 +184,7 @@ public void testListResourceInstancesWOptions() throws Throwable { @Test public void testCreateResourceInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}"; String createResourceInstancePath = "/v2/resource_instances"; server.enqueue(new MockResponse() @@ -237,7 +241,7 @@ public void testCreateResourceInstanceNoOptions() throws Throwable { @Test public void testGetResourceInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}"; String getResourceInstancePath = "/v2/resource_instances/testString"; server.enqueue(new MockResponse() @@ -339,7 +343,7 @@ public void testDeleteResourceInstanceNoOptions() throws Throwable { @Test public void testUpdateResourceInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}"; String updateResourceInstancePath = "/v2/resource_instances/testString"; server.enqueue(new MockResponse() @@ -393,7 +397,7 @@ public void testUpdateResourceInstanceNoOptions() throws Throwable { @Test public void testListResourceAliasesForInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"state\": \"state\", \"resource_instance_id\": \"resourceInstanceId\", \"region_instance_id\": \"regionInstanceId\", \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"name\": \"name\", \"resource_instance_id\": \"resourceInstanceId\", \"target_crn\": \"targetCrn\", \"account_id\": \"accountId\", \"resource_id\": \"resourceId\", \"resource_group_id\": \"resourceGroupId\", \"crn\": \"crn\", \"region_instance_id\": \"regionInstanceId\", \"region_instance_crn\": \"regionInstanceCrn\", \"state\": \"state\", \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\"}]}"; String listResourceAliasesForInstancePath = "/v2/resource_instances/testString/resource_aliases"; server.enqueue(new MockResponse() @@ -443,7 +447,7 @@ public void testListResourceAliasesForInstanceNoOptions() throws Throwable { @Test public void testListResourceKeysForInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"role\": \"role\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_instance_url\": \"resourceInstanceUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"name\": \"name\", \"crn\": \"crn\", \"state\": \"state\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_id\": \"resourceId\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_alias_url\": \"resourceAliasUrl\"}]}"; String listResourceKeysForInstancePath = "/v2/resource_instances/testString/resource_keys"; server.enqueue(new MockResponse() @@ -493,7 +497,7 @@ public void testListResourceKeysForInstanceNoOptions() throws Throwable { @Test public void testLockResourceInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}"; String lockResourceInstancePath = "/v2/resource_instances/testString/lock"; server.enqueue(new MockResponse() @@ -543,7 +547,7 @@ public void testLockResourceInstanceNoOptions() throws Throwable { @Test public void testUnlockResourceInstanceWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"resource_id\": \"resourceId\", \"resource_plan_id\": \"resourcePlanId\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"allow_cleanup\": true, \"locked\": true, \"last_operation\": {\"mapKey\": \"anyValue\"}, \"dashboard_url\": \"dashboardUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"extensions\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"scheduled_reclaim_at\": \"2019-01-01T12:00:00.000Z\", \"restored_at\": \"2019-01-01T12:00:00.000Z\", \"restored_by\": \"restoredBy\", \"scheduled_reclaim_by\": \"scheduledReclaimBy\", \"name\": \"name\", \"region_id\": \"regionId\", \"account_id\": \"accountId\", \"reseller_channel_id\": \"resellerChannelId\", \"resource_plan_id\": \"resourcePlanId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"parameters\": {\"mapKey\": \"anyValue\"}, \"allow_cleanup\": true, \"crn\": \"crn\", \"state\": \"state\", \"type\": \"type\", \"sub_type\": \"subType\", \"resource_id\": \"resourceId\", \"dashboard_url\": \"dashboardUrl\", \"last_operation\": {\"mapKey\": \"anyValue\"}, \"resource_aliases_url\": \"resourceAliasesUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"plan_history\": [{\"resource_plan_id\": \"resourcePlanId\", \"start_date\": \"2019-01-01T12:00:00.000Z\", \"requestor_id\": \"requestorId\"}], \"migrated\": true, \"extensions\": {\"mapKey\": \"anyValue\"}, \"controlled_by\": \"controlledBy\", \"locked\": true}"; String unlockResourceInstancePath = "/v2/resource_instances/testString/lock"; server.enqueue(new MockResponse() @@ -593,7 +597,7 @@ public void testUnlockResourceInstanceNoOptions() throws Throwable { @Test public void testListResourceKeysWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"role\": \"role\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_instance_url\": \"resourceInstanceUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"name\": \"name\", \"crn\": \"crn\", \"state\": \"state\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_id\": \"resourceId\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_alias_url\": \"resourceAliasUrl\"}]}"; String listResourceKeysPath = "/v2/resource_keys"; server.enqueue(new MockResponse() @@ -644,7 +648,7 @@ public void testListResourceKeysWOptions() throws Throwable { @Test public void testCreateResourceKeyWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"role\": \"role\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_instance_url\": \"resourceInstanceUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"name\": \"name\", \"crn\": \"crn\", \"state\": \"state\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_id\": \"resourceId\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_alias_url\": \"resourceAliasUrl\"}"; String createResourceKeyPath = "/v2/resource_keys"; server.enqueue(new MockResponse() @@ -703,7 +707,7 @@ public void testCreateResourceKeyNoOptions() throws Throwable { @Test public void testGetResourceKeyWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"role\": \"role\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_instance_url\": \"resourceInstanceUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"name\": \"name\", \"crn\": \"crn\", \"state\": \"state\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_id\": \"resourceId\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_alias_url\": \"resourceAliasUrl\"}"; String getResourceKeyPath = "/v2/resource_keys/testString"; server.enqueue(new MockResponse() @@ -803,7 +807,7 @@ public void testDeleteResourceKeyNoOptions() throws Throwable { @Test public void testUpdateResourceKeyWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"role\": \"role\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_instance_url\": \"resourceInstanceUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"name\": \"name\", \"crn\": \"crn\", \"state\": \"state\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_id\": \"resourceId\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_alias_url\": \"resourceAliasUrl\"}"; String updateResourceKeyPath = "/v2/resource_keys/testString"; server.enqueue(new MockResponse() @@ -854,7 +858,7 @@ public void testUpdateResourceKeyNoOptions() throws Throwable { @Test public void testListResourceBindingsWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"role\": \"role\", \"region_binding_id\": \"regionBindingId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_alias_url\": \"resourceAliasUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"crn\": \"crn\", \"region_binding_id\": \"regionBindingId\", \"region_binding_crn\": \"regionBindingCrn\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_id\": \"resourceId\", \"migrated\": true, \"resource_alias_url\": \"resourceAliasUrl\"}]}"; String listResourceBindingsPath = "/v2/resource_bindings"; server.enqueue(new MockResponse() @@ -907,7 +911,7 @@ public void testListResourceBindingsWOptions() throws Throwable { @Test public void testCreateResourceBindingWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"role\": \"role\", \"region_binding_id\": \"regionBindingId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_alias_url\": \"resourceAliasUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"crn\": \"crn\", \"region_binding_id\": \"regionBindingId\", \"region_binding_crn\": \"regionBindingCrn\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_id\": \"resourceId\", \"migrated\": true, \"resource_alias_url\": \"resourceAliasUrl\"}"; String createResourceBindingPath = "/v2/resource_bindings"; server.enqueue(new MockResponse() @@ -967,7 +971,7 @@ public void testCreateResourceBindingNoOptions() throws Throwable { @Test public void testGetResourceBindingWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"role\": \"role\", \"region_binding_id\": \"regionBindingId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_alias_url\": \"resourceAliasUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"crn\": \"crn\", \"region_binding_id\": \"regionBindingId\", \"region_binding_crn\": \"regionBindingCrn\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_id\": \"resourceId\", \"migrated\": true, \"resource_alias_url\": \"resourceAliasUrl\"}"; String getResourceBindingPath = "/v2/resource_bindings/testString"; server.enqueue(new MockResponse() @@ -1067,7 +1071,7 @@ public void testDeleteResourceBindingNoOptions() throws Throwable { @Test public void testUpdateResourceBindingWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"role\": \"role\", \"region_binding_id\": \"regionBindingId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_alias_url\": \"resourceAliasUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"crn\": \"crn\", \"region_binding_id\": \"regionBindingId\", \"region_binding_crn\": \"regionBindingCrn\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_id\": \"resourceId\", \"migrated\": true, \"resource_alias_url\": \"resourceAliasUrl\"}"; String updateResourceBindingPath = "/v2/resource_bindings/testString"; server.enqueue(new MockResponse() @@ -1118,7 +1122,7 @@ public void testUpdateResourceBindingNoOptions() throws Throwable { @Test public void testListResourceAliasesWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"state\": \"state\", \"resource_instance_id\": \"resourceInstanceId\", \"region_instance_id\": \"regionInstanceId\", \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"name\": \"name\", \"resource_instance_id\": \"resourceInstanceId\", \"target_crn\": \"targetCrn\", \"account_id\": \"accountId\", \"resource_id\": \"resourceId\", \"resource_group_id\": \"resourceGroupId\", \"crn\": \"crn\", \"region_instance_id\": \"regionInstanceId\", \"region_instance_crn\": \"regionInstanceCrn\", \"state\": \"state\", \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\"}]}"; String listResourceAliasesPath = "/v2/resource_aliases"; server.enqueue(new MockResponse() @@ -1173,7 +1177,7 @@ public void testListResourceAliasesWOptions() throws Throwable { @Test public void testCreateResourceAliasWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"state\": \"state\", \"resource_instance_id\": \"resourceInstanceId\", \"region_instance_id\": \"regionInstanceId\", \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"name\": \"name\", \"resource_instance_id\": \"resourceInstanceId\", \"target_crn\": \"targetCrn\", \"account_id\": \"accountId\", \"resource_id\": \"resourceId\", \"resource_group_id\": \"resourceGroupId\", \"crn\": \"crn\", \"region_instance_id\": \"regionInstanceId\", \"region_instance_crn\": \"regionInstanceCrn\", \"state\": \"state\", \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\"}"; String createResourceAliasPath = "/v2/resource_aliases"; server.enqueue(new MockResponse() @@ -1225,7 +1229,7 @@ public void testCreateResourceAliasNoOptions() throws Throwable { @Test public void testGetResourceAliasWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"state\": \"state\", \"resource_instance_id\": \"resourceInstanceId\", \"region_instance_id\": \"regionInstanceId\", \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"name\": \"name\", \"resource_instance_id\": \"resourceInstanceId\", \"target_crn\": \"targetCrn\", \"account_id\": \"accountId\", \"resource_id\": \"resourceId\", \"resource_group_id\": \"resourceGroupId\", \"crn\": \"crn\", \"region_instance_id\": \"regionInstanceId\", \"region_instance_crn\": \"regionInstanceCrn\", \"state\": \"state\", \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\"}"; String getResourceAliasPath = "/v2/resource_aliases/testString"; server.enqueue(new MockResponse() @@ -1325,7 +1329,7 @@ public void testDeleteResourceAliasNoOptions() throws Throwable { @Test public void testUpdateResourceAliasWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"resource_group_crn\": \"resourceGroupCrn\", \"target_crn\": \"targetCrn\", \"state\": \"state\", \"resource_instance_id\": \"resourceInstanceId\", \"region_instance_id\": \"regionInstanceId\", \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}"; + String mockResponseBody = "{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"name\": \"name\", \"resource_instance_id\": \"resourceInstanceId\", \"target_crn\": \"targetCrn\", \"account_id\": \"accountId\", \"resource_id\": \"resourceId\", \"resource_group_id\": \"resourceGroupId\", \"crn\": \"crn\", \"region_instance_id\": \"regionInstanceId\", \"region_instance_crn\": \"regionInstanceCrn\", \"state\": \"state\", \"migrated\": true, \"resource_instance_url\": \"resourceInstanceUrl\", \"resource_bindings_url\": \"resourceBindingsUrl\", \"resource_keys_url\": \"resourceKeysUrl\"}"; String updateResourceAliasPath = "/v2/resource_aliases/testString"; server.enqueue(new MockResponse() @@ -1376,7 +1380,7 @@ public void testUpdateResourceAliasNoOptions() throws Throwable { @Test public void testListResourceBindingsForAliasWOptions() throws Throwable { // Schedule some responses. - String mockResponseBody = "{\"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"crn\": \"crn\", \"url\": \"url\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"role\": \"role\", \"region_binding_id\": \"regionBindingId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_alias_url\": \"resourceAliasUrl\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\"}], \"rows_count\": 9}"; + String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"id\": \"id\", \"guid\": \"guid\", \"url\": \"url\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"deleted_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_by\": \"updatedBy\", \"deleted_by\": \"deletedBy\", \"source_crn\": \"sourceCrn\", \"target_crn\": \"targetCrn\", \"crn\": \"crn\", \"region_binding_id\": \"regionBindingId\", \"region_binding_crn\": \"regionBindingCrn\", \"name\": \"name\", \"account_id\": \"accountId\", \"resource_group_id\": \"resourceGroupId\", \"state\": \"state\", \"credentials\": {\"apikey\": \"apikey\", \"iam_apikey_description\": \"iamApikeyDescription\", \"iam_apikey_name\": \"iamApikeyName\", \"iam_role_crn\": \"iamRoleCrn\", \"iam_serviceid_crn\": \"iamServiceidCrn\"}, \"iam_compatible\": false, \"resource_id\": \"resourceId\", \"migrated\": true, \"resource_alias_url\": \"resourceAliasUrl\"}]}"; String listResourceBindingsForAliasPath = "/v2/resource_aliases/testString/resource_bindings"; server.enqueue(new MockResponse() diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptionsTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptionsTest.java index 9a79dcddca..4f6cb82487 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptionsTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ListResourceInstancesOptionsTest.java @@ -40,6 +40,8 @@ public void testListResourceInstancesOptions() throws Throwable { .type("testString") .subType("testString") .limit("testString") + .state("active") + .orderDirection("asc") .updatedFrom("2019-01-08T00:00:00.000Z") .updatedTo("2019-01-08T00:00:00.000Z") .build(); @@ -51,6 +53,8 @@ public void testListResourceInstancesOptions() throws Throwable { assertEquals(listResourceInstancesOptionsModel.type(), "testString"); assertEquals(listResourceInstancesOptionsModel.subType(), "testString"); assertEquals(listResourceInstancesOptionsModel.limit(), "testString"); + assertEquals(listResourceInstancesOptionsModel.state(), "active"); + assertEquals(listResourceInstancesOptionsModel.orderDirection(), "asc"); assertEquals(listResourceInstancesOptionsModel.updatedFrom(), "2019-01-08T00:00:00.000Z"); assertEquals(listResourceInstancesOptionsModel.updatedTo(), "2019-01-08T00:00:00.000Z"); } diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasTest.java index cc238c7829..4dd937f969 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasTest.java @@ -34,24 +34,26 @@ public void testResourceAlias() throws Throwable { ResourceAlias resourceAliasModel = new ResourceAlias(); assertNull(resourceAliasModel.getId()); assertNull(resourceAliasModel.getGuid()); - assertNull(resourceAliasModel.getCrn()); assertNull(resourceAliasModel.getUrl()); + assertNull(resourceAliasModel.getCreatedAt()); + assertNull(resourceAliasModel.getUpdatedAt()); + assertNull(resourceAliasModel.getDeletedAt()); + assertNull(resourceAliasModel.getCreatedBy()); + assertNull(resourceAliasModel.getUpdatedBy()); + assertNull(resourceAliasModel.getDeletedBy()); assertNull(resourceAliasModel.getName()); + assertNull(resourceAliasModel.getResourceInstanceId()); + assertNull(resourceAliasModel.getTargetCrn()); assertNull(resourceAliasModel.getAccountId()); + assertNull(resourceAliasModel.getResourceId()); assertNull(resourceAliasModel.getResourceGroupId()); - assertNull(resourceAliasModel.getResourceGroupCrn()); - assertNull(resourceAliasModel.getTargetCrn()); - assertNull(resourceAliasModel.getState()); - assertNull(resourceAliasModel.getResourceInstanceId()); + assertNull(resourceAliasModel.getCrn()); assertNull(resourceAliasModel.getRegionInstanceId()); + assertNull(resourceAliasModel.getRegionInstanceCrn()); + assertNull(resourceAliasModel.getState()); + assertNull(resourceAliasModel.isMigrated()); assertNull(resourceAliasModel.getResourceInstanceUrl()); assertNull(resourceAliasModel.getResourceBindingsUrl()); assertNull(resourceAliasModel.getResourceKeysUrl()); - assertNull(resourceAliasModel.getCreatedAt()); - assertNull(resourceAliasModel.getUpdatedAt()); - assertNull(resourceAliasModel.getDeletedAt()); - assertNull(resourceAliasModel.getCreatedBy()); - assertNull(resourceAliasModel.getUpdatedBy()); - assertNull(resourceAliasModel.getDeletedBy()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesListTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesListTest.java index e3b324395c..dcc6e55ad3 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesListTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceAliasesListTest.java @@ -34,8 +34,8 @@ public class ResourceAliasesListTest { @Test public void testResourceAliasesList() throws Throwable { ResourceAliasesList resourceAliasesListModel = new ResourceAliasesList(); + assertNull(resourceAliasesListModel.getRowsCount()); assertNull(resourceAliasesListModel.getNextUrl()); assertNull(resourceAliasesListModel.getResources()); - assertNull(resourceAliasesListModel.getRowsCount()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingTest.java index 8f581aa084..5cfb1268ce 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingTest.java @@ -35,24 +35,26 @@ public void testResourceBinding() throws Throwable { ResourceBinding resourceBindingModel = new ResourceBinding(); assertNull(resourceBindingModel.getId()); assertNull(resourceBindingModel.getGuid()); - assertNull(resourceBindingModel.getCrn()); assertNull(resourceBindingModel.getUrl()); - assertNull(resourceBindingModel.getName()); - assertNull(resourceBindingModel.getAccountId()); - assertNull(resourceBindingModel.getResourceGroupId()); + assertNull(resourceBindingModel.getCreatedAt()); + assertNull(resourceBindingModel.getUpdatedAt()); + assertNull(resourceBindingModel.getDeletedAt()); + assertNull(resourceBindingModel.getCreatedBy()); + assertNull(resourceBindingModel.getUpdatedBy()); + assertNull(resourceBindingModel.getDeletedBy()); assertNull(resourceBindingModel.getSourceCrn()); assertNull(resourceBindingModel.getTargetCrn()); - assertNull(resourceBindingModel.getRole()); + assertNull(resourceBindingModel.getCrn()); assertNull(resourceBindingModel.getRegionBindingId()); + assertNull(resourceBindingModel.getRegionBindingCrn()); + assertNull(resourceBindingModel.getName()); + assertNull(resourceBindingModel.getAccountId()); + assertNull(resourceBindingModel.getResourceGroupId()); assertNull(resourceBindingModel.getState()); assertNull(resourceBindingModel.getCredentials()); assertNull(resourceBindingModel.isIamCompatible()); + assertNull(resourceBindingModel.getResourceId()); + assertNull(resourceBindingModel.isMigrated()); assertNull(resourceBindingModel.getResourceAliasUrl()); - assertNull(resourceBindingModel.getCreatedAt()); - assertNull(resourceBindingModel.getUpdatedAt()); - assertNull(resourceBindingModel.getDeletedAt()); - assertNull(resourceBindingModel.getCreatedBy()); - assertNull(resourceBindingModel.getUpdatedBy()); - assertNull(resourceBindingModel.getDeletedBy()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsListTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsListTest.java index 77a3b78224..f4cc36989d 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsListTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceBindingsListTest.java @@ -35,8 +35,8 @@ public class ResourceBindingsListTest { @Test public void testResourceBindingsList() throws Throwable { ResourceBindingsList resourceBindingsListModel = new ResourceBindingsList(); + assertNull(resourceBindingsListModel.getRowsCount()); assertNull(resourceBindingsListModel.getNextUrl()); assertNull(resourceBindingsListModel.getResources()); - assertNull(resourceBindingsListModel.getRowsCount()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstanceTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstanceTest.java index 762ff498fb..482d2769c1 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstanceTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstanceTest.java @@ -36,37 +36,41 @@ public void testResourceInstance() throws Throwable { ResourceInstance resourceInstanceModel = new ResourceInstance(); assertNull(resourceInstanceModel.getId()); assertNull(resourceInstanceModel.getGuid()); - assertNull(resourceInstanceModel.getCrn()); assertNull(resourceInstanceModel.getUrl()); + assertNull(resourceInstanceModel.getCreatedAt()); + assertNull(resourceInstanceModel.getUpdatedAt()); + assertNull(resourceInstanceModel.getDeletedAt()); + assertNull(resourceInstanceModel.getCreatedBy()); + assertNull(resourceInstanceModel.getUpdatedBy()); + assertNull(resourceInstanceModel.getDeletedBy()); + assertNull(resourceInstanceModel.getScheduledReclaimAt()); + assertNull(resourceInstanceModel.getRestoredAt()); + assertNull(resourceInstanceModel.getRestoredBy()); + assertNull(resourceInstanceModel.getScheduledReclaimBy()); assertNull(resourceInstanceModel.getName()); + assertNull(resourceInstanceModel.getRegionId()); assertNull(resourceInstanceModel.getAccountId()); + assertNull(resourceInstanceModel.getResellerChannelId()); + assertNull(resourceInstanceModel.getResourcePlanId()); assertNull(resourceInstanceModel.getResourceGroupId()); assertNull(resourceInstanceModel.getResourceGroupCrn()); - assertNull(resourceInstanceModel.getResourceId()); - assertNull(resourceInstanceModel.getResourcePlanId()); assertNull(resourceInstanceModel.getTargetCrn()); assertNull(resourceInstanceModel.getParameters()); + assertNull(resourceInstanceModel.isAllowCleanup()); + assertNull(resourceInstanceModel.getCrn()); assertNull(resourceInstanceModel.getState()); assertNull(resourceInstanceModel.getType()); assertNull(resourceInstanceModel.getSubType()); - assertNull(resourceInstanceModel.isAllowCleanup()); - assertNull(resourceInstanceModel.isLocked()); - assertNull(resourceInstanceModel.getLastOperation()); + assertNull(resourceInstanceModel.getResourceId()); assertNull(resourceInstanceModel.getDashboardUrl()); - assertNull(resourceInstanceModel.getPlanHistory()); - assertNull(resourceInstanceModel.getExtensions()); + assertNull(resourceInstanceModel.getLastOperation()); assertNull(resourceInstanceModel.getResourceAliasesUrl()); assertNull(resourceInstanceModel.getResourceBindingsUrl()); assertNull(resourceInstanceModel.getResourceKeysUrl()); - assertNull(resourceInstanceModel.getCreatedAt()); - assertNull(resourceInstanceModel.getCreatedBy()); - assertNull(resourceInstanceModel.getUpdatedAt()); - assertNull(resourceInstanceModel.getUpdatedBy()); - assertNull(resourceInstanceModel.getDeletedAt()); - assertNull(resourceInstanceModel.getDeletedBy()); - assertNull(resourceInstanceModel.getScheduledReclaimAt()); - assertNull(resourceInstanceModel.getScheduledReclaimBy()); - assertNull(resourceInstanceModel.getRestoredAt()); - assertNull(resourceInstanceModel.getRestoredBy()); + assertNull(resourceInstanceModel.getPlanHistory()); + assertNull(resourceInstanceModel.isMigrated()); + assertNull(resourceInstanceModel.getExtensions()); + assertNull(resourceInstanceModel.getControlledBy()); + assertNull(resourceInstanceModel.isLocked()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesListTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesListTest.java index b7c6bb7380..0ff30a5a34 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesListTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstancesListTest.java @@ -37,8 +37,8 @@ public class ResourceInstancesListTest { @Test public void testResourceInstancesList() throws Throwable { ResourceInstancesList resourceInstancesListModel = new ResourceInstancesList(); + assertNull(resourceInstancesListModel.getRowsCount()); assertNull(resourceInstancesListModel.getNextUrl()); assertNull(resourceInstancesListModel.getResources()); - assertNull(resourceInstancesListModel.getRowsCount()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeyTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeyTest.java index d8f5a1223f..2cf7ff57e0 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeyTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeyTest.java @@ -35,22 +35,24 @@ public void testResourceKey() throws Throwable { ResourceKey resourceKeyModel = new ResourceKey(); assertNull(resourceKeyModel.getId()); assertNull(resourceKeyModel.getGuid()); - assertNull(resourceKeyModel.getCrn()); assertNull(resourceKeyModel.getUrl()); - assertNull(resourceKeyModel.getName()); - assertNull(resourceKeyModel.getAccountId()); - assertNull(resourceKeyModel.getResourceGroupId()); - assertNull(resourceKeyModel.getSourceCrn()); - assertNull(resourceKeyModel.getRole()); - assertNull(resourceKeyModel.getState()); - assertNull(resourceKeyModel.getCredentials()); - assertNull(resourceKeyModel.isIamCompatible()); - assertNull(resourceKeyModel.getResourceInstanceUrl()); assertNull(resourceKeyModel.getCreatedAt()); assertNull(resourceKeyModel.getUpdatedAt()); assertNull(resourceKeyModel.getDeletedAt()); assertNull(resourceKeyModel.getCreatedBy()); assertNull(resourceKeyModel.getUpdatedBy()); assertNull(resourceKeyModel.getDeletedBy()); + assertNull(resourceKeyModel.getSourceCrn()); + assertNull(resourceKeyModel.getName()); + assertNull(resourceKeyModel.getCrn()); + assertNull(resourceKeyModel.getState()); + assertNull(resourceKeyModel.getAccountId()); + assertNull(resourceKeyModel.getResourceGroupId()); + assertNull(resourceKeyModel.getResourceId()); + assertNull(resourceKeyModel.getCredentials()); + assertNull(resourceKeyModel.isIamCompatible()); + assertNull(resourceKeyModel.isMigrated()); + assertNull(resourceKeyModel.getResourceInstanceUrl()); + assertNull(resourceKeyModel.getResourceAliasUrl()); } } \ No newline at end of file diff --git a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysListTest.java b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysListTest.java index 0eab7d15d7..6c86cb0050 100644 --- a/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysListTest.java +++ b/modules/resource-controller/src/test/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceKeysListTest.java @@ -35,8 +35,8 @@ public class ResourceKeysListTest { @Test public void testResourceKeysList() throws Throwable { ResourceKeysList resourceKeysListModel = new ResourceKeysList(); + assertNull(resourceKeysListModel.getRowsCount()); assertNull(resourceKeysListModel.getNextUrl()); assertNull(resourceKeysListModel.getResources()); - assertNull(resourceKeysListModel.getRowsCount()); } } \ No newline at end of file