Skip to content

Commit

Permalink
feat(upgrade) replace vav3 with vav4
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Young <[email protected]>

BREAKING CHANGE: VA API V3 has been removed and replaced with VA V4
  • Loading branch information
Mike Young authored and Mike Young committed Jun 20, 2023
1 parent 6deaf1d commit d1f8bd8
Show file tree
Hide file tree
Showing 170 changed files with 2,556 additions and 1,759 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.29.1-b338fb38-20210313-010605
* IBM OpenAPI SDK Code Generator Version: 3.73.0-eeee85a9-20230607-165104
*/

package com.ibm.cloud.container_registry.container_registry.v1;
Expand Down Expand Up @@ -69,6 +69,7 @@
import com.ibm.cloud.sdk.core.security.ConfigBasedAuthenticatorFactory;
import com.ibm.cloud.sdk.core.service.BaseService;
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -77,13 +78,60 @@
/**
* Management interface for IBM Cloud Container Registry.
*
* @version v1
* API Version: 1.1
*/
public class ContainerRegistry extends BaseService {

/**
* Default service name used when configuring the `ContainerRegistry` client.
*/
public static final String DEFAULT_SERVICE_NAME = "container_registry";

public static final String DEFAULT_SERVICE_URL = "https://us.icr.io";
/**
* Default service endpoint URL.
*/
public static final String DEFAULT_SERVICE_URL = "https://icr.io";

private static final Map<String, String> _regionalEndpoints;
static {
Map<String, String> m = new HashMap<>();
m.put("global", "https://icr.io"); // global

m.put("us-south", "https://us.icr.io"); // us-south

m.put("uk-south", "https://uk.icr.io"); // uk-south

m.put("eu-gb", "https://uk.icr.io"); // eu-gb

m.put("eu-central", "https://de.icr.io"); // eu-central

m.put("eu-de", "https://de.icr.io"); // eu-de

m.put("ap-north", "https://jp.icr.io"); // ap-north

m.put("jp-tok", "https://jp.icr.io"); // jp-tok

m.put("ap-south", "https://au.icr.io"); // ap-south

m.put("au-syd", "https://au.icr.io"); // au-syd

m.put("jp-osa", "https://jp2.icr.io"); // jp-osa

m.put("ca-tor", "https://ca.icr.io"); // ca-tor

m.put("br-sao", "https://br.icr.io"); // br-sao
_regionalEndpoints = Collections.unmodifiableMap(m);
}

/**
* Returns the service URL associated with the specified region.
* @param region a string representing the region
* @return the service URL associated with the specified region or null
* if no mapping for the region exists
*/
public static String getServiceUrlForRegion(String region) {
return _regionalEndpoints.get(region);
}

private String account;

Expand Down Expand Up @@ -348,7 +396,8 @@ public ServiceCall<List<ImageDigest>> listImageDigests() {
/**
* Create tag.
*
* Create a new tag in a private registry that refers to an existing image in the same region.
* Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has
* Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
*
* @param tagImageOptions the {@link TagImageOptions} containing the options for the call
* @return a {@link ServiceCall} with a void result
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -29,6 +29,11 @@ public class AccountSettings extends GenericModel {
public static class Builder {
private Boolean platformMetrics;

/**
* Instantiates a new Builder from an existing AccountSettings instance.
*
* @param accountSettings the instance to initialize the Builder with
*/
private Builder(AccountSettings accountSettings) {
this.platformMetrics = accountSettings.platformMetrics;
}
Expand Down Expand Up @@ -60,6 +65,8 @@ public Builder platformMetrics(Boolean platformMetrics) {
}
}

protected AccountSettings() { }

protected AccountSettings(Builder builder) {
platformMetrics = builder.platformMetrics;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -31,6 +31,11 @@ public static class Builder {
private Long imagesPerRepo;
private Boolean retainUntagged;

/**
* Instantiates a new Builder from an existing AnalyzeRetentionPolicyOptions instance.
*
* @param analyzeRetentionPolicyOptions the instance to initialize the Builder with
*/
private Builder(AnalyzeRetentionPolicyOptions analyzeRetentionPolicyOptions) {
this.namespace = analyzeRetentionPolicyOptions.namespace;
this.imagesPerRepo = analyzeRetentionPolicyOptions.imagesPerRepo;
Expand Down Expand Up @@ -108,6 +113,8 @@ public Builder retentionPolicy(RetentionPolicy retentionPolicy) {
}
}

protected AnalyzeRetentionPolicyOptions() { }

protected AnalyzeRetentionPolicyOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.namespace,
"namespace cannot be null");
Expand Down Expand Up @@ -139,7 +146,7 @@ public String namespace() {
/**
* Gets the imagesPerRepo.
*
* Determines how many images will be retained for each repository when the retention policy is executed. The value -1
* Determines how many images are retained in each repository when the retention policy is processed. The value -1
* denotes 'Unlimited' (all images are retained).
*
* @return the imagesPerRepo
Expand All @@ -151,8 +158,8 @@ public Long imagesPerRepo() {
/**
* Gets the retainUntagged.
*
* Determines if untagged images are retained when executing the retention policy. This is false by default meaning
* untagged images will be deleted when the policy is executed.
* Determines whether untagged images are retained when the retention policy is processed. The value is false by
* default, which means that  untagged images can be deleted when the policy runs.
*
* @return the retainUntagged
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -29,6 +29,11 @@ public static class Builder {
private String xAuthResourceGroup;
private String name;

/**
* Instantiates a new Builder from an existing AssignNamespaceOptions instance.
*
* @param assignNamespaceOptions the instance to initialize the Builder with
*/
private Builder(AssignNamespaceOptions assignNamespaceOptions) {
this.xAuthResourceGroup = assignNamespaceOptions.xAuthResourceGroup;
this.name = assignNamespaceOptions.name;
Expand Down Expand Up @@ -83,6 +88,8 @@ public Builder name(String name) {
}
}

protected AssignNamespaceOptions() { }

protected AssignNamespaceOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.xAuthResourceGroup,
"xAuthResourceGroup cannot be null");
Expand All @@ -104,7 +111,7 @@ public Builder newBuilder() {
/**
* Gets the xAuthResourceGroup.
*
* The ID of the resource group that the namespace will be created within.
* The ID of the resource group to which you want to add the namespace.
*
* @return the xAuthResourceGroup
*/
Expand All @@ -115,7 +122,7 @@ public String xAuthResourceGroup() {
/**
* Gets the name.
*
* The name of the namespace to be updated.
* The name of the namespace that you want to udpate.
*
* @return the name
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -32,6 +32,11 @@ public static class Builder {
private Boolean iamAuthz;
private Boolean privateOnly;

/**
* Instantiates a new Builder from an existing AuthOptions instance.
*
* @param authOptions the instance to initialize the Builder with
*/
private Builder(AuthOptions authOptions) {
this.iamAuthz = authOptions.iamAuthz;
this.privateOnly = authOptions.privateOnly;
Expand Down Expand Up @@ -75,6 +80,8 @@ public Builder privateOnly(Boolean privateOnly) {
}
}

protected AuthOptions() { }

protected AuthOptions(Builder builder) {
iamAuthz = builder.iamAuthz;
privateOnly = builder.privateOnly;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -30,6 +30,11 @@ public class BulkDeleteImagesOptions extends GenericModel {
public static class Builder {
private List<String> bulkDelete;

/**
* Instantiates a new Builder from an existing BulkDeleteImagesOptions instance.
*
* @param bulkDeleteImagesOptions the instance to initialize the Builder with
*/
private Builder(BulkDeleteImagesOptions bulkDeleteImagesOptions) {
this.bulkDelete = bulkDeleteImagesOptions.bulkDelete;
}
Expand Down Expand Up @@ -87,6 +92,8 @@ public Builder bulkDelete(List<String> bulkDelete) {
}
}

protected BulkDeleteImagesOptions() { }

protected BulkDeleteImagesOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.bulkDelete,
"bulkDelete cannot be null");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -74,6 +74,8 @@ public class Config extends GenericModel {
@SerializedName("WorkingDir")
protected String workingDir;

protected Config() { }

/**
* Gets the argsEscaped.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -29,6 +29,11 @@ public static class Builder {
private String name;
private String xAuthResourceGroup;

/**
* Instantiates a new Builder from an existing CreateNamespaceOptions instance.
*
* @param createNamespaceOptions the instance to initialize the Builder with
*/
private Builder(CreateNamespaceOptions createNamespaceOptions) {
this.name = createNamespaceOptions.name;
this.xAuthResourceGroup = createNamespaceOptions.xAuthResourceGroup;
Expand Down Expand Up @@ -81,6 +86,8 @@ public Builder xAuthResourceGroup(String xAuthResourceGroup) {
}
}

protected CreateNamespaceOptions() { }

protected CreateNamespaceOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.name,
"name cannot be empty");
Expand All @@ -100,7 +107,7 @@ public Builder newBuilder() {
/**
* Gets the name.
*
* The name of the namespace.
* The name of the namespace that you want to create.
*
* @return the name
*/
Expand All @@ -111,7 +118,7 @@ public String name() {
/**
* Gets the xAuthResourceGroup.
*
* The ID of the resource group that the namespace will be created within.
* The ID of the resource group to which you want to add the namespace.
*
* @return the xAuthResourceGroup
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -27,6 +27,11 @@ public class DeleteImageOptions extends GenericModel {
public static class Builder {
private String image;

/**
* Instantiates a new Builder from an existing DeleteImageOptions instance.
*
* @param deleteImageOptions the instance to initialize the Builder with
*/
private Builder(DeleteImageOptions deleteImageOptions) {
this.image = deleteImageOptions.image;
}
Expand Down Expand Up @@ -67,6 +72,8 @@ public Builder image(String image) {
}
}

protected DeleteImageOptions() { }

protected DeleteImageOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.image,
"image cannot be empty");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2021.
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -27,6 +27,11 @@ public class DeleteImageTagOptions extends GenericModel {
public static class Builder {
private String image;

/**
* Instantiates a new Builder from an existing DeleteImageTagOptions instance.
*
* @param deleteImageTagOptions the instance to initialize the Builder with
*/
private Builder(DeleteImageTagOptions deleteImageTagOptions) {
this.image = deleteImageTagOptions.image;
}
Expand Down Expand Up @@ -67,6 +72,8 @@ public Builder image(String image) {
}
}

protected DeleteImageTagOptions() { }

protected DeleteImageTagOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.image,
"image cannot be empty");
Expand Down
Loading

0 comments on commit d1f8bd8

Please sign in to comment.