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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.112.0-f88e9264-20260220-115155
* IBM OpenAPI SDK Code Generator Version: 3.114.0-a902401e-20260427-192904
*/

package com.ibm.cloud.networking.zones_settings.v1;
Expand Down Expand Up @@ -59,6 +59,7 @@
import com.ibm.cloud.networking.zones_settings.v1.model.GetResponseBufferingOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetScriptLoadOptimizationOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetSecurityHeaderOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetSecurityLevelOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetServerSideExcludeOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetTlsClientAuthOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.GetTrueClientIpOptions;
Expand Down Expand Up @@ -90,6 +91,7 @@
import com.ibm.cloud.networking.zones_settings.v1.model.ResponseBufferingResp;
import com.ibm.cloud.networking.zones_settings.v1.model.ScriptLoadOptimizationResp;
import com.ibm.cloud.networking.zones_settings.v1.model.SecurityHeaderResp;
import com.ibm.cloud.networking.zones_settings.v1.model.SecurityLevelResp;
import com.ibm.cloud.networking.zones_settings.v1.model.ServerSideExcludeResp;
import com.ibm.cloud.networking.zones_settings.v1.model.TlsClientAuthResp;
import com.ibm.cloud.networking.zones_settings.v1.model.TrueClientIpResp;
Expand Down Expand Up @@ -125,6 +127,7 @@
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateResponseBufferingOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateScriptLoadOptimizationOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateSecurityHeaderOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateSecurityLevelOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateServerSideExcludeOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateTlsClientAuthOptions;
import com.ibm.cloud.networking.zones_settings.v1.model.UpdateTrueClientIpOptions;
Expand Down Expand Up @@ -3359,4 +3362,84 @@ public ServiceCall<EmailObfuscationResp> updateEmailObfuscation() {
return updateEmailObfuscation(null);
}

/**
* Get security level setting.
*
* Get security level for a zone.
*
* @param getSecurityLevelOptions the {@link GetSecurityLevelOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link SecurityLevelResp}
*/
public ServiceCall<SecurityLevelResp> getSecurityLevel(GetSecurityLevelOptions getSecurityLevelOptions) {
Map<String, String> pathParamsMap = new HashMap<String, String>();
pathParamsMap.put("crn", this.crn);
pathParamsMap.put("zone_identifier", this.zoneIdentifier);
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/{crn}/zones/{zone_identifier}/settings/security_level", pathParamsMap));
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("zones_settings", "v1", "getSecurityLevel");
for (Entry<String, String> header : sdkHeaders.entrySet()) {
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
ResponseConverter<SecurityLevelResp> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<SecurityLevelResp>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
}

/**
* Get security level setting.
*
* Get security level for a zone.
*
* @return a {@link ServiceCall} with a result of type {@link SecurityLevelResp}
*/
public ServiceCall<SecurityLevelResp> getSecurityLevel() {
return getSecurityLevel(null);
}

/**
* Update security level setting.
*
* Update security level setting for a zone.
*
* @param updateSecurityLevelOptions the {@link UpdateSecurityLevelOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link SecurityLevelResp}
*/
public ServiceCall<SecurityLevelResp> updateSecurityLevel(UpdateSecurityLevelOptions updateSecurityLevelOptions) {
boolean skipBody = false;
if (updateSecurityLevelOptions == null) {
updateSecurityLevelOptions = new UpdateSecurityLevelOptions.Builder().build();
skipBody = true;
}
Map<String, String> pathParamsMap = new HashMap<String, String>();
pathParamsMap.put("crn", this.crn);
pathParamsMap.put("zone_identifier", this.zoneIdentifier);
RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v1/{crn}/zones/{zone_identifier}/settings/security_level", pathParamsMap));
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("zones_settings", "v1", "updateSecurityLevel");
for (Entry<String, String> header : sdkHeaders.entrySet()) {
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
if (!skipBody) {
final JsonObject contentJson = new JsonObject();
if (updateSecurityLevelOptions.value() != null) {
contentJson.addProperty("value", updateSecurityLevelOptions.value());
}
builder.bodyJson(contentJson);
}
ResponseConverter<SecurityLevelResp> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<SecurityLevelResp>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
}

/**
* Update security level setting.
*
* Update security level setting for a zone.
*
* @return a {@link ServiceCall} with a result of type {@link SecurityLevelResp}
*/
public ServiceCall<SecurityLevelResp> updateSecurityLevel() {
return updateSecurityLevel(null);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
package com.ibm.cloud.networking.zones_settings.v1.model;

import java.util.List;
import java.util.Map;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
Expand All @@ -23,6 +25,8 @@
public class EmailObfuscationResp extends GenericModel {

protected EmailObfuscationRespResult result;
@SerializedName("result_info")
protected Map<String, Object> resultInfo;
protected Boolean success;
protected List<List<String>> errors;
protected List<List<String>> messages;
Expand All @@ -40,6 +44,17 @@ public EmailObfuscationRespResult getResult() {
return result;
}

/**
* Gets the resultInfo.
*
* Result information.
*
* @return the resultInfo
*/
public Map<String, Object> getResultInfo() {
return resultInfo;
}

/**
* Gets the success.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.networking.zones_settings.v1.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* The getSecurityLevel options.
*/
public class GetSecurityLevelOptions extends GenericModel {

/**
* Construct a new instance of GetSecurityLevelOptions.
*/
public GetSecurityLevelOptions() {
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
package com.ibm.cloud.networking.zones_settings.v1.model;

import java.util.List;
import java.util.Map;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
Expand All @@ -23,6 +25,8 @@
public class ReplaceInsecureJsResp extends GenericModel {

protected ReplaceInsecureJsRespResult result;
@SerializedName("result_info")
protected Map<String, Object> resultInfo;
protected Boolean success;
protected List<List<String>> errors;
protected List<List<String>> messages;
Expand All @@ -40,6 +44,17 @@ public ReplaceInsecureJsRespResult getResult() {
return result;
}

/**
* Gets the resultInfo.
*
* Result information.
*
* @return the resultInfo
*/
public Map<String, Object> getResultInfo() {
return resultInfo;
}

/**
* Gets the success.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.networking.zones_settings.v1.model;

import java.util.List;

import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* Security level response.
*/
public class SecurityLevelResp extends GenericModel {

protected SecurityLevelRespResult result;
protected Boolean success;
protected List<List<String>> errors;
protected List<List<String>> messages;

protected SecurityLevelResp() { }

/**
* Gets the result.
*
* Container for response information.
*
* @return the result
*/
public SecurityLevelRespResult getResult() {
return result;
}

/**
* Gets the success.
*
* Was the get successful.
*
* @return the success
*/
public Boolean isSuccess() {
return success;
}

/**
* Gets the errors.
*
* Array of errors encountered.
*
* @return the errors
*/
public List<List<String>> getErrors() {
return errors;
}

/**
* Gets the messages.
*
* Array of messages returned.
*
* @return the messages
*/
public List<List<String>> getMessages() {
return messages;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.networking.zones_settings.v1.model;

import java.util.Date;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* Container for response information.
*/
public class SecurityLevelRespResult extends GenericModel {

protected String id;
protected String value;
protected Boolean editable;
@SerializedName("modified_on")
protected Date modifiedOn;

protected SecurityLevelRespResult() { }

/**
* Gets the id.
*
* ID.
*
* @return the id
*/
public String getId() {
return id;
}

/**
* Gets the value.
*
* Value.
*
* @return the value
*/
public String getValue() {
return value;
}

/**
* Gets the editable.
*
* Editable.
*
* @return the editable
*/
public Boolean isEditable() {
return editable;
}

/**
* Gets the modifiedOn.
*
* Modified date.
*
* @return the modifiedOn
*/
public Date getModifiedOn() {
return modifiedOn;
}
}

Loading
Loading