UNPKG

@snap/camera-kit

Version:
1,319 lines 103 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "snapchat.lenses"; export var RemoteApiEndpointType; (function (RemoteApiEndpointType) { RemoteApiEndpointType["TYPE_UNSET"] = "TYPE_UNSET"; RemoteApiEndpointType["TEXT"] = "TEXT"; RemoteApiEndpointType["PROTO"] = "PROTO"; RemoteApiEndpointType["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiEndpointType || (RemoteApiEndpointType = {})); export function remoteApiEndpointTypeFromJSON(object) { switch (object) { case 0: case "TYPE_UNSET": return RemoteApiEndpointType.TYPE_UNSET; case 1: case "TEXT": return RemoteApiEndpointType.TEXT; case 2: case "PROTO": return RemoteApiEndpointType.PROTO; case -1: case "UNRECOGNIZED": default: return RemoteApiEndpointType.UNRECOGNIZED; } } export function remoteApiEndpointTypeToNumber(object) { switch (object) { case RemoteApiEndpointType.TYPE_UNSET: return 0; case RemoteApiEndpointType.TEXT: return 1; case RemoteApiEndpointType.PROTO: return 2; case RemoteApiEndpointType.UNRECOGNIZED: default: return -1; } } export var RemoteApiCacheStrategy; (function (RemoteApiCacheStrategy) { RemoteApiCacheStrategy["CS_UNSET"] = "CS_UNSET"; RemoteApiCacheStrategy["USE_HEADERS"] = "USE_HEADERS"; RemoteApiCacheStrategy["ALWAYS"] = "ALWAYS"; RemoteApiCacheStrategy["NEVER"] = "NEVER"; RemoteApiCacheStrategy["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiCacheStrategy || (RemoteApiCacheStrategy = {})); export function remoteApiCacheStrategyFromJSON(object) { switch (object) { case 0: case "CS_UNSET": return RemoteApiCacheStrategy.CS_UNSET; case 1: case "USE_HEADERS": return RemoteApiCacheStrategy.USE_HEADERS; case 2: case "ALWAYS": return RemoteApiCacheStrategy.ALWAYS; case 3: case "NEVER": return RemoteApiCacheStrategy.NEVER; case -1: case "UNRECOGNIZED": default: return RemoteApiCacheStrategy.UNRECOGNIZED; } } export function remoteApiCacheStrategyToNumber(object) { switch (object) { case RemoteApiCacheStrategy.CS_UNSET: return 0; case RemoteApiCacheStrategy.USE_HEADERS: return 1; case RemoteApiCacheStrategy.ALWAYS: return 2; case RemoteApiCacheStrategy.NEVER: return 3; case RemoteApiCacheStrategy.UNRECOGNIZED: default: return -1; } } export var RemoteApiCacheTTLStrategy; (function (RemoteApiCacheTTLStrategy) { RemoteApiCacheTTLStrategy["CTS_UNSET"] = "CTS_UNSET"; RemoteApiCacheTTLStrategy["EXACT"] = "EXACT"; RemoteApiCacheTTLStrategy["FLOOR"] = "FLOOR"; RemoteApiCacheTTLStrategy["CEILING"] = "CEILING"; RemoteApiCacheTTLStrategy["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiCacheTTLStrategy || (RemoteApiCacheTTLStrategy = {})); export function remoteApiCacheTTLStrategyFromJSON(object) { switch (object) { case 0: case "CTS_UNSET": return RemoteApiCacheTTLStrategy.CTS_UNSET; case 1: case "EXACT": return RemoteApiCacheTTLStrategy.EXACT; case 2: case "FLOOR": return RemoteApiCacheTTLStrategy.FLOOR; case 3: case "CEILING": return RemoteApiCacheTTLStrategy.CEILING; case -1: case "UNRECOGNIZED": default: return RemoteApiCacheTTLStrategy.UNRECOGNIZED; } } export function remoteApiCacheTTLStrategyToNumber(object) { switch (object) { case RemoteApiCacheTTLStrategy.CTS_UNSET: return 0; case RemoteApiCacheTTLStrategy.EXACT: return 1; case RemoteApiCacheTTLStrategy.FLOOR: return 2; case RemoteApiCacheTTLStrategy.CEILING: return 3; case RemoteApiCacheTTLStrategy.UNRECOGNIZED: default: return -1; } } export var AldRequestValidationConfig; (function (AldRequestValidationConfig) { AldRequestValidationConfig["ALD_REQ_CONFIG_UNSET"] = "ALD_REQ_CONFIG_UNSET"; AldRequestValidationConfig["REQ_BODY"] = "REQ_BODY"; AldRequestValidationConfig["REQ_URL"] = "REQ_URL"; AldRequestValidationConfig["REQ_HEADERS"] = "REQ_HEADERS"; AldRequestValidationConfig["UNRECOGNIZED"] = "UNRECOGNIZED"; })(AldRequestValidationConfig || (AldRequestValidationConfig = {})); export function aldRequestValidationConfigFromJSON(object) { switch (object) { case 0: case "ALD_REQ_CONFIG_UNSET": return AldRequestValidationConfig.ALD_REQ_CONFIG_UNSET; case 1: case "REQ_BODY": return AldRequestValidationConfig.REQ_BODY; case 2: case "REQ_URL": return AldRequestValidationConfig.REQ_URL; case 3: case "REQ_HEADERS": return AldRequestValidationConfig.REQ_HEADERS; case -1: case "UNRECOGNIZED": default: return AldRequestValidationConfig.UNRECOGNIZED; } } export function aldRequestValidationConfigToNumber(object) { switch (object) { case AldRequestValidationConfig.ALD_REQ_CONFIG_UNSET: return 0; case AldRequestValidationConfig.REQ_BODY: return 1; case AldRequestValidationConfig.REQ_URL: return 2; case AldRequestValidationConfig.REQ_HEADERS: return 3; case AldRequestValidationConfig.UNRECOGNIZED: default: return -1; } } export var AldResponseValidationConfig; (function (AldResponseValidationConfig) { AldResponseValidationConfig["ALD_RESP_CONFIG_UNSET"] = "ALD_RESP_CONFIG_UNSET"; AldResponseValidationConfig["RESP_BODY"] = "RESP_BODY"; AldResponseValidationConfig["RESP_HEADERS"] = "RESP_HEADERS"; AldResponseValidationConfig["UNRECOGNIZED"] = "UNRECOGNIZED"; })(AldResponseValidationConfig || (AldResponseValidationConfig = {})); export function aldResponseValidationConfigFromJSON(object) { switch (object) { case 0: case "ALD_RESP_CONFIG_UNSET": return AldResponseValidationConfig.ALD_RESP_CONFIG_UNSET; case 1: case "RESP_BODY": return AldResponseValidationConfig.RESP_BODY; case 2: case "RESP_HEADERS": return AldResponseValidationConfig.RESP_HEADERS; case -1: case "UNRECOGNIZED": default: return AldResponseValidationConfig.UNRECOGNIZED; } } export function aldResponseValidationConfigToNumber(object) { switch (object) { case AldResponseValidationConfig.ALD_RESP_CONFIG_UNSET: return 0; case AldResponseValidationConfig.RESP_BODY: return 1; case AldResponseValidationConfig.RESP_HEADERS: return 2; case AldResponseValidationConfig.UNRECOGNIZED: default: return -1; } } export var SpecApprovalState; (function (SpecApprovalState) { SpecApprovalState["APPROVAL_STATE_UNSET"] = "APPROVAL_STATE_UNSET"; SpecApprovalState["IN_REVIEW"] = "IN_REVIEW"; SpecApprovalState["APPROVED"] = "APPROVED"; SpecApprovalState["BLOCKED"] = "BLOCKED"; SpecApprovalState["UNRECOGNIZED"] = "UNRECOGNIZED"; })(SpecApprovalState || (SpecApprovalState = {})); export function specApprovalStateFromJSON(object) { switch (object) { case 0: case "APPROVAL_STATE_UNSET": return SpecApprovalState.APPROVAL_STATE_UNSET; case 1: case "IN_REVIEW": return SpecApprovalState.IN_REVIEW; case 2: case "APPROVED": return SpecApprovalState.APPROVED; case 3: case "BLOCKED": return SpecApprovalState.BLOCKED; case -1: case "UNRECOGNIZED": default: return SpecApprovalState.UNRECOGNIZED; } } export function specApprovalStateToNumber(object) { switch (object) { case SpecApprovalState.APPROVAL_STATE_UNSET: return 0; case SpecApprovalState.IN_REVIEW: return 1; case SpecApprovalState.APPROVED: return 2; case SpecApprovalState.BLOCKED: return 3; case SpecApprovalState.UNRECOGNIZED: default: return -1; } } export var SpecVisibility; (function (SpecVisibility) { SpecVisibility["VISIBILITY_UNSET"] = "VISIBILITY_UNSET"; SpecVisibility["INTERNAL"] = "INTERNAL"; SpecVisibility["PRIVATE"] = "PRIVATE"; SpecVisibility["EXTERNAL"] = "EXTERNAL"; SpecVisibility["UNRECOGNIZED"] = "UNRECOGNIZED"; })(SpecVisibility || (SpecVisibility = {})); export function specVisibilityFromJSON(object) { switch (object) { case 0: case "VISIBILITY_UNSET": return SpecVisibility.VISIBILITY_UNSET; case 1: case "INTERNAL": return SpecVisibility.INTERNAL; case 2: case "PRIVATE": return SpecVisibility.PRIVATE; case 3: case "EXTERNAL": return SpecVisibility.EXTERNAL; case -1: case "UNRECOGNIZED": default: return SpecVisibility.UNRECOGNIZED; } } export function specVisibilityToNumber(object) { switch (object) { case SpecVisibility.VISIBILITY_UNSET: return 0; case SpecVisibility.INTERNAL: return 1; case SpecVisibility.PRIVATE: return 2; case SpecVisibility.EXTERNAL: return 3; case SpecVisibility.UNRECOGNIZED: default: return -1; } } export var CreatedFrom; (function (CreatedFrom) { CreatedFrom["CREATED_FROM_UNSET"] = "CREATED_FROM_UNSET"; CreatedFrom["REMOTE_API_ADMIN"] = "REMOTE_API_ADMIN"; CreatedFrom["MY_LENSES"] = "MY_LENSES"; CreatedFrom["UNRECOGNIZED"] = "UNRECOGNIZED"; })(CreatedFrom || (CreatedFrom = {})); export function createdFromFromJSON(object) { switch (object) { case 0: case "CREATED_FROM_UNSET": return CreatedFrom.CREATED_FROM_UNSET; case 1: case "REMOTE_API_ADMIN": return CreatedFrom.REMOTE_API_ADMIN; case 2: case "MY_LENSES": return CreatedFrom.MY_LENSES; case -1: case "UNRECOGNIZED": default: return CreatedFrom.UNRECOGNIZED; } } export function createdFromToNumber(object) { switch (object) { case CreatedFrom.CREATED_FROM_UNSET: return 0; case CreatedFrom.REMOTE_API_ADMIN: return 1; case CreatedFrom.MY_LENSES: return 2; case CreatedFrom.UNRECOGNIZED: default: return -1; } } export var TargetPlatform; (function (TargetPlatform) { TargetPlatform["TARGET_PLATFORM_UNSET"] = "TARGET_PLATFORM_UNSET"; TargetPlatform["SNAPCHAT"] = "SNAPCHAT"; TargetPlatform["SPECTACLES"] = "SPECTACLES"; TargetPlatform["CAMERA_KIT"] = "CAMERA_KIT"; TargetPlatform["UNRECOGNIZED"] = "UNRECOGNIZED"; })(TargetPlatform || (TargetPlatform = {})); export function targetPlatformFromJSON(object) { switch (object) { case 0: case "TARGET_PLATFORM_UNSET": return TargetPlatform.TARGET_PLATFORM_UNSET; case 1: case "SNAPCHAT": return TargetPlatform.SNAPCHAT; case 2: case "SPECTACLES": return TargetPlatform.SPECTACLES; case 3: case "CAMERA_KIT": return TargetPlatform.CAMERA_KIT; case -1: case "UNRECOGNIZED": default: return TargetPlatform.UNRECOGNIZED; } } export function targetPlatformToNumber(object) { switch (object) { case TargetPlatform.TARGET_PLATFORM_UNSET: return 0; case TargetPlatform.SNAPCHAT: return 1; case TargetPlatform.SPECTACLES: return 2; case TargetPlatform.CAMERA_KIT: return 3; case TargetPlatform.UNRECOGNIZED: default: return -1; } } export var RestrictedJsApiPermission; (function (RestrictedJsApiPermission) { RestrictedJsApiPermission["PERMISSION_UNSET"] = "PERMISSION_UNSET"; RestrictedJsApiPermission["USER_DATA"] = "USER_DATA"; RestrictedJsApiPermission["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RestrictedJsApiPermission || (RestrictedJsApiPermission = {})); export function restrictedJsApiPermissionFromJSON(object) { switch (object) { case 0: case "PERMISSION_UNSET": return RestrictedJsApiPermission.PERMISSION_UNSET; case 1: case "USER_DATA": return RestrictedJsApiPermission.USER_DATA; case -1: case "UNRECOGNIZED": default: return RestrictedJsApiPermission.UNRECOGNIZED; } } export function restrictedJsApiPermissionToNumber(object) { switch (object) { case RestrictedJsApiPermission.PERMISSION_UNSET: return 0; case RestrictedJsApiPermission.USER_DATA: return 1; case RestrictedJsApiPermission.UNRECOGNIZED: default: return -1; } } export var UserLocationUseCase; (function (UserLocationUseCase) { UserLocationUseCase["USE_CASE_UNSET"] = "USE_CASE_UNSET"; UserLocationUseCase["WEATHER"] = "WEATHER"; UserLocationUseCase["PLACES"] = "PLACES"; UserLocationUseCase["PLACES_COARSE"] = "PLACES_COARSE"; UserLocationUseCase["UNRECOGNIZED"] = "UNRECOGNIZED"; })(UserLocationUseCase || (UserLocationUseCase = {})); export function userLocationUseCaseFromJSON(object) { switch (object) { case 0: case "USE_CASE_UNSET": return UserLocationUseCase.USE_CASE_UNSET; case 1: case "WEATHER": return UserLocationUseCase.WEATHER; case 2: case "PLACES": return UserLocationUseCase.PLACES; case 3: case "PLACES_COARSE": return UserLocationUseCase.PLACES_COARSE; case -1: case "UNRECOGNIZED": default: return UserLocationUseCase.UNRECOGNIZED; } } export function userLocationUseCaseToNumber(object) { switch (object) { case UserLocationUseCase.USE_CASE_UNSET: return 0; case UserLocationUseCase.WEATHER: return 1; case UserLocationUseCase.PLACES: return 2; case UserLocationUseCase.PLACES_COARSE: return 3; case UserLocationUseCase.UNRECOGNIZED: default: return -1; } } export var RemoteApiHttpRequestParameter_ParameterLocation; (function (RemoteApiHttpRequestParameter_ParameterLocation) { RemoteApiHttpRequestParameter_ParameterLocation["LOCATION_UNSET"] = "LOCATION_UNSET"; RemoteApiHttpRequestParameter_ParameterLocation["QUERY"] = "QUERY"; RemoteApiHttpRequestParameter_ParameterLocation["HEADER"] = "HEADER"; RemoteApiHttpRequestParameter_ParameterLocation["PATH"] = "PATH"; RemoteApiHttpRequestParameter_ParameterLocation["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiHttpRequestParameter_ParameterLocation || (RemoteApiHttpRequestParameter_ParameterLocation = {})); export function remoteApiHttpRequestParameter_ParameterLocationFromJSON(object) { switch (object) { case 0: case "LOCATION_UNSET": return RemoteApiHttpRequestParameter_ParameterLocation.LOCATION_UNSET; case 1: case "QUERY": return RemoteApiHttpRequestParameter_ParameterLocation.QUERY; case 2: case "HEADER": return RemoteApiHttpRequestParameter_ParameterLocation.HEADER; case 3: case "PATH": return RemoteApiHttpRequestParameter_ParameterLocation.PATH; case -1: case "UNRECOGNIZED": default: return RemoteApiHttpRequestParameter_ParameterLocation.UNRECOGNIZED; } } export function remoteApiHttpRequestParameter_ParameterLocationToNumber(object) { switch (object) { case RemoteApiHttpRequestParameter_ParameterLocation.LOCATION_UNSET: return 0; case RemoteApiHttpRequestParameter_ParameterLocation.QUERY: return 1; case RemoteApiHttpRequestParameter_ParameterLocation.HEADER: return 2; case RemoteApiHttpRequestParameter_ParameterLocation.PATH: return 3; case RemoteApiHttpRequestParameter_ParameterLocation.UNRECOGNIZED: default: return -1; } } export var RemoteApiHttpEndpoint_HttpRequestMethod; (function (RemoteApiHttpEndpoint_HttpRequestMethod) { RemoteApiHttpEndpoint_HttpRequestMethod["METHOD_UNSET"] = "METHOD_UNSET"; RemoteApiHttpEndpoint_HttpRequestMethod["GET"] = "GET"; RemoteApiHttpEndpoint_HttpRequestMethod["POST"] = "POST"; RemoteApiHttpEndpoint_HttpRequestMethod["PUT"] = "PUT"; RemoteApiHttpEndpoint_HttpRequestMethod["DELETE"] = "DELETE"; RemoteApiHttpEndpoint_HttpRequestMethod["PATCH"] = "PATCH"; RemoteApiHttpEndpoint_HttpRequestMethod["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiHttpEndpoint_HttpRequestMethod || (RemoteApiHttpEndpoint_HttpRequestMethod = {})); export function remoteApiHttpEndpoint_HttpRequestMethodFromJSON(object) { switch (object) { case 0: case "METHOD_UNSET": return RemoteApiHttpEndpoint_HttpRequestMethod.METHOD_UNSET; case 1: case "GET": return RemoteApiHttpEndpoint_HttpRequestMethod.GET; case 2: case "POST": return RemoteApiHttpEndpoint_HttpRequestMethod.POST; case 3: case "PUT": return RemoteApiHttpEndpoint_HttpRequestMethod.PUT; case 4: case "DELETE": return RemoteApiHttpEndpoint_HttpRequestMethod.DELETE; case 5: case "PATCH": return RemoteApiHttpEndpoint_HttpRequestMethod.PATCH; case -1: case "UNRECOGNIZED": default: return RemoteApiHttpEndpoint_HttpRequestMethod.UNRECOGNIZED; } } export function remoteApiHttpEndpoint_HttpRequestMethodToNumber(object) { switch (object) { case RemoteApiHttpEndpoint_HttpRequestMethod.METHOD_UNSET: return 0; case RemoteApiHttpEndpoint_HttpRequestMethod.GET: return 1; case RemoteApiHttpEndpoint_HttpRequestMethod.POST: return 2; case RemoteApiHttpEndpoint_HttpRequestMethod.PUT: return 3; case RemoteApiHttpEndpoint_HttpRequestMethod.DELETE: return 4; case RemoteApiHttpEndpoint_HttpRequestMethod.PATCH: return 5; case RemoteApiHttpEndpoint_HttpRequestMethod.UNRECOGNIZED: default: return -1; } } export var RemoteApiOAuth2Config_GrantType; (function (RemoteApiOAuth2Config_GrantType) { RemoteApiOAuth2Config_GrantType["GRANT_TYPE_UNSET"] = "GRANT_TYPE_UNSET"; RemoteApiOAuth2Config_GrantType["AUTHORIZATION_CODE"] = "AUTHORIZATION_CODE"; RemoteApiOAuth2Config_GrantType["AUTHORIZATION_CODE_WITH_PKCE"] = "AUTHORIZATION_CODE_WITH_PKCE"; RemoteApiOAuth2Config_GrantType["IMPLICIT"] = "IMPLICIT"; RemoteApiOAuth2Config_GrantType["CLIENT_CREDENTIALS"] = "CLIENT_CREDENTIALS"; RemoteApiOAuth2Config_GrantType["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiOAuth2Config_GrantType || (RemoteApiOAuth2Config_GrantType = {})); export function remoteApiOAuth2Config_GrantTypeFromJSON(object) { switch (object) { case 0: case "GRANT_TYPE_UNSET": return RemoteApiOAuth2Config_GrantType.GRANT_TYPE_UNSET; case 1: case "AUTHORIZATION_CODE": return RemoteApiOAuth2Config_GrantType.AUTHORIZATION_CODE; case 2: case "AUTHORIZATION_CODE_WITH_PKCE": return RemoteApiOAuth2Config_GrantType.AUTHORIZATION_CODE_WITH_PKCE; case 3: case "IMPLICIT": return RemoteApiOAuth2Config_GrantType.IMPLICIT; case 4: case "CLIENT_CREDENTIALS": return RemoteApiOAuth2Config_GrantType.CLIENT_CREDENTIALS; case -1: case "UNRECOGNIZED": default: return RemoteApiOAuth2Config_GrantType.UNRECOGNIZED; } } export function remoteApiOAuth2Config_GrantTypeToNumber(object) { switch (object) { case RemoteApiOAuth2Config_GrantType.GRANT_TYPE_UNSET: return 0; case RemoteApiOAuth2Config_GrantType.AUTHORIZATION_CODE: return 1; case RemoteApiOAuth2Config_GrantType.AUTHORIZATION_CODE_WITH_PKCE: return 2; case RemoteApiOAuth2Config_GrantType.IMPLICIT: return 3; case RemoteApiOAuth2Config_GrantType.CLIENT_CREDENTIALS: return 4; case RemoteApiOAuth2Config_GrantType.UNRECOGNIZED: default: return -1; } } export var RemoteApiSecurityConfig_SecurityScheme; (function (RemoteApiSecurityConfig_SecurityScheme) { RemoteApiSecurityConfig_SecurityScheme["SCHEME_UNSET"] = "SCHEME_UNSET"; RemoteApiSecurityConfig_SecurityScheme["NONE"] = "NONE"; RemoteApiSecurityConfig_SecurityScheme["SNAP_TOKEN"] = "SNAP_TOKEN"; RemoteApiSecurityConfig_SecurityScheme["API_KEY"] = "API_KEY"; RemoteApiSecurityConfig_SecurityScheme["OAUTH2"] = "OAUTH2"; RemoteApiSecurityConfig_SecurityScheme["UNRECOGNIZED"] = "UNRECOGNIZED"; })(RemoteApiSecurityConfig_SecurityScheme || (RemoteApiSecurityConfig_SecurityScheme = {})); export function remoteApiSecurityConfig_SecuritySchemeFromJSON(object) { switch (object) { case 0: case "SCHEME_UNSET": return RemoteApiSecurityConfig_SecurityScheme.SCHEME_UNSET; case 1: case "NONE": return RemoteApiSecurityConfig_SecurityScheme.NONE; case 2: case "SNAP_TOKEN": return RemoteApiSecurityConfig_SecurityScheme.SNAP_TOKEN; case 3: case "API_KEY": return RemoteApiSecurityConfig_SecurityScheme.API_KEY; case 4: case "OAUTH2": return RemoteApiSecurityConfig_SecurityScheme.OAUTH2; case -1: case "UNRECOGNIZED": default: return RemoteApiSecurityConfig_SecurityScheme.UNRECOGNIZED; } } export function remoteApiSecurityConfig_SecuritySchemeToNumber(object) { switch (object) { case RemoteApiSecurityConfig_SecurityScheme.SCHEME_UNSET: return 0; case RemoteApiSecurityConfig_SecurityScheme.NONE: return 1; case RemoteApiSecurityConfig_SecurityScheme.SNAP_TOKEN: return 2; case RemoteApiSecurityConfig_SecurityScheme.API_KEY: return 3; case RemoteApiSecurityConfig_SecurityScheme.OAUTH2: return 4; case RemoteApiSecurityConfig_SecurityScheme.UNRECOGNIZED: default: return -1; } } function createBaseRemoteApiHttpRequestParameter() { return { name: "", location: RemoteApiHttpRequestParameter_ParameterLocation.LOCATION_UNSET, optional: false, externalName: "", defaultValue: "", constant: false, }; } export const RemoteApiHttpRequestParameter = { encode(message, writer = new BinaryWriter()) { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.location !== RemoteApiHttpRequestParameter_ParameterLocation.LOCATION_UNSET) { writer.uint32(16).int32(remoteApiHttpRequestParameter_ParameterLocationToNumber(message.location)); } if (message.optional !== false) { writer.uint32(24).bool(message.optional); } if (message.externalName !== "") { writer.uint32(34).string(message.externalName); } if (message.defaultValue !== "") { writer.uint32(42).string(message.defaultValue); } if (message.constant !== false) { writer.uint32(48).bool(message.constant); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiHttpRequestParameter(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.name = reader.string(); continue; } case 2: { if (tag !== 16) { break; } message.location = remoteApiHttpRequestParameter_ParameterLocationFromJSON(reader.int32()); continue; } case 3: { if (tag !== 24) { break; } message.optional = reader.bool(); continue; } case 4: { if (tag !== 34) { break; } message.externalName = reader.string(); continue; } case 5: { if (tag !== 42) { break; } message.defaultValue = reader.string(); continue; } case 6: { if (tag !== 48) { break; } message.constant = reader.bool(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RemoteApiHttpRequestParameter.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c, _d, _e, _f; const message = createBaseRemoteApiHttpRequestParameter(); message.name = (_a = object.name) !== null && _a !== void 0 ? _a : ""; message.location = (_b = object.location) !== null && _b !== void 0 ? _b : RemoteApiHttpRequestParameter_ParameterLocation.LOCATION_UNSET; message.optional = (_c = object.optional) !== null && _c !== void 0 ? _c : false; message.externalName = (_d = object.externalName) !== null && _d !== void 0 ? _d : ""; message.defaultValue = (_e = object.defaultValue) !== null && _e !== void 0 ? _e : ""; message.constant = (_f = object.constant) !== null && _f !== void 0 ? _f : false; return message; }, }; function createBaseRemoteApiHttpResponseParameter() { return { name: "", hidden: false, macroValue: "" }; } export const RemoteApiHttpResponseParameter = { encode(message, writer = new BinaryWriter()) { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.hidden !== false) { writer.uint32(16).bool(message.hidden); } if (message.macroValue !== "") { writer.uint32(26).string(message.macroValue); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiHttpResponseParameter(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.name = reader.string(); continue; } case 2: { if (tag !== 16) { break; } message.hidden = reader.bool(); continue; } case 3: { if (tag !== 26) { break; } message.macroValue = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RemoteApiHttpResponseParameter.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c; const message = createBaseRemoteApiHttpResponseParameter(); message.name = (_a = object.name) !== null && _a !== void 0 ? _a : ""; message.hidden = (_b = object.hidden) !== null && _b !== void 0 ? _b : false; message.macroValue = (_c = object.macroValue) !== null && _c !== void 0 ? _c : ""; return message; }, }; function createBaseRemoteApiEndpointMetadata() { return { name: "", description: "" }; } export const RemoteApiEndpointMetadata = { encode(message, writer = new BinaryWriter()) { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.description !== "") { writer.uint32(18).string(message.description); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiEndpointMetadata(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.name = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.description = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RemoteApiEndpointMetadata.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b; const message = createBaseRemoteApiEndpointMetadata(); message.name = (_a = object.name) !== null && _a !== void 0 ? _a : ""; message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ""; return message; }, }; function createBaseRemoteApiCachingConfig() { return { cacheStrategy: RemoteApiCacheStrategy.CS_UNSET, ttlStrategy: RemoteApiCacheTTLStrategy.CTS_UNSET, ttlSec: "0", }; } export const RemoteApiCachingConfig = { encode(message, writer = new BinaryWriter()) { if (message.cacheStrategy !== RemoteApiCacheStrategy.CS_UNSET) { writer.uint32(8).int32(remoteApiCacheStrategyToNumber(message.cacheStrategy)); } if (message.ttlStrategy !== RemoteApiCacheTTLStrategy.CTS_UNSET) { writer.uint32(16).int32(remoteApiCacheTTLStrategyToNumber(message.ttlStrategy)); } if (message.ttlSec !== "0") { writer.uint32(24).int64(message.ttlSec); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiCachingConfig(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 8) { break; } message.cacheStrategy = remoteApiCacheStrategyFromJSON(reader.int32()); continue; } case 2: { if (tag !== 16) { break; } message.ttlStrategy = remoteApiCacheTTLStrategyFromJSON(reader.int32()); continue; } case 3: { if (tag !== 24) { break; } message.ttlSec = reader.int64().toString(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RemoteApiCachingConfig.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c; const message = createBaseRemoteApiCachingConfig(); message.cacheStrategy = (_a = object.cacheStrategy) !== null && _a !== void 0 ? _a : RemoteApiCacheStrategy.CS_UNSET; message.ttlStrategy = (_b = object.ttlStrategy) !== null && _b !== void 0 ? _b : RemoteApiCacheTTLStrategy.CTS_UNSET; message.ttlSec = (_c = object.ttlSec) !== null && _c !== void 0 ? _c : "0"; return message; }, }; function createBaseRemoteApiHttpEndpoint() { return { path: "", methods: [], parameters: [], metadata: undefined, refId: "", type: RemoteApiEndpointType.TYPE_UNSET, protoDescriptor: new Uint8Array(0), requestType: "", responseType: "", usesLocationProxy: false, cachingConfig: undefined, userLocationUseCase: UserLocationUseCase.USE_CASE_UNSET, documentationLink: "", description: "", responseParameters: [], reqAldRequestValidation: false, reqAldResponseValidation: false, aldContextWindow: "", aldRequestConfigs: [], aldResponseConfigs: [], }; } export const RemoteApiHttpEndpoint = { encode(message, writer = new BinaryWriter()) { if (message.path !== "") { writer.uint32(10).string(message.path); } writer.uint32(18).fork(); for (const v of message.methods) { writer.int32(remoteApiHttpEndpoint_HttpRequestMethodToNumber(v)); } writer.join(); for (const v of message.parameters) { RemoteApiHttpRequestParameter.encode(v, writer.uint32(26).fork()).join(); } if (message.metadata !== undefined) { RemoteApiEndpointMetadata.encode(message.metadata, writer.uint32(34).fork()).join(); } if (message.refId !== "") { writer.uint32(42).string(message.refId); } if (message.type !== RemoteApiEndpointType.TYPE_UNSET) { writer.uint32(48).int32(remoteApiEndpointTypeToNumber(message.type)); } if (message.protoDescriptor.length !== 0) { writer.uint32(58).bytes(message.protoDescriptor); } if (message.requestType !== "") { writer.uint32(66).string(message.requestType); } if (message.responseType !== "") { writer.uint32(74).string(message.responseType); } if (message.usesLocationProxy !== false) { writer.uint32(80).bool(message.usesLocationProxy); } if (message.cachingConfig !== undefined) { RemoteApiCachingConfig.encode(message.cachingConfig, writer.uint32(90).fork()).join(); } if (message.userLocationUseCase !== UserLocationUseCase.USE_CASE_UNSET) { writer.uint32(96).int32(userLocationUseCaseToNumber(message.userLocationUseCase)); } if (message.documentationLink !== "") { writer.uint32(106).string(message.documentationLink); } if (message.description !== "") { writer.uint32(114).string(message.description); } for (const v of message.responseParameters) { RemoteApiHttpResponseParameter.encode(v, writer.uint32(122).fork()).join(); } if (message.reqAldRequestValidation !== false) { writer.uint32(128).bool(message.reqAldRequestValidation); } if (message.reqAldResponseValidation !== false) { writer.uint32(136).bool(message.reqAldResponseValidation); } if (message.aldContextWindow !== "") { writer.uint32(146).string(message.aldContextWindow); } writer.uint32(154).fork(); for (const v of message.aldRequestConfigs) { writer.int32(aldRequestValidationConfigToNumber(v)); } writer.join(); writer.uint32(162).fork(); for (const v of message.aldResponseConfigs) { writer.int32(aldResponseValidationConfigToNumber(v)); } writer.join(); return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiHttpEndpoint(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.path = reader.string(); continue; } case 2: { if (tag === 16) { message.methods.push(remoteApiHttpEndpoint_HttpRequestMethodFromJSON(reader.int32())); continue; } if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { message.methods.push(remoteApiHttpEndpoint_HttpRequestMethodFromJSON(reader.int32())); } continue; } break; } case 3: { if (tag !== 26) { break; } message.parameters.push(RemoteApiHttpRequestParameter.decode(reader, reader.uint32())); continue; } case 4: { if (tag !== 34) { break; } message.metadata = RemoteApiEndpointMetadata.decode(reader, reader.uint32()); continue; } case 5: { if (tag !== 42) { break; } message.refId = reader.string(); continue; } case 6: { if (tag !== 48) { break; } message.type = remoteApiEndpointTypeFromJSON(reader.int32()); continue; } case 7: { if (tag !== 58) { break; } message.protoDescriptor = reader.bytes(); continue; } case 8: { if (tag !== 66) { break; } message.requestType = reader.string(); continue; } case 9: { if (tag !== 74) { break; } message.responseType = reader.string(); continue; } case 10: { if (tag !== 80) { break; } message.usesLocationProxy = reader.bool(); continue; } case 11: { if (tag !== 90) { break; } message.cachingConfig = RemoteApiCachingConfig.decode(reader, reader.uint32()); continue; } case 12: { if (tag !== 96) { break; } message.userLocationUseCase = userLocationUseCaseFromJSON(reader.int32()); continue; } case 13: { if (tag !== 106) { break; } message.documentationLink = reader.string(); continue; } case 14: { if (tag !== 114) { break; } message.description = reader.string(); continue; } case 15: { if (tag !== 122) { break; } message.responseParameters.push(RemoteApiHttpResponseParameter.decode(reader, reader.uint32())); continue; } case 16: { if (tag !== 128) { break; } message.reqAldRequestValidation = reader.bool(); continue; } case 17: { if (tag !== 136) { break; } message.reqAldResponseValidation = reader.bool(); continue; } case 18: { if (tag !== 146) { break; } message.aldContextWindow = reader.string(); continue; } case 19: { if (tag === 152) { message.aldRequestConfigs.push(aldRequestValidationConfigFromJSON(reader.int32())); continue; } if (tag === 154) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { message.aldRequestConfigs.push(aldRequestValidationConfigFromJSON(reader.int32())); } continue; } break; } case 20: { if (tag === 160) { message.aldResponseConfigs.push(aldResponseValidationConfigFromJSON(reader.int32())); continue; } if (tag === 162) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { message.aldResponseConfigs.push(aldResponseValidationConfigFromJSON(reader.int32())); } continue; } break; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, create(base) { return RemoteApiHttpEndpoint.fromPartial(base !== null && base !== void 0 ? base : {}); }, fromPartial(object) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; const message = createBaseRemoteApiHttpEndpoint(); message.path = (_a = object.path) !== null && _a !== void 0 ? _a : ""; message.methods = ((_b = object.methods) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || []; message.parameters = ((_c = object.parameters) === null || _c === void 0 ? void 0 : _c.map((e) => RemoteApiHttpRequestParameter.fromPartial(e))) || []; message.metadata = (object.metadata !== undefined && object.metadata !== null) ? RemoteApiEndpointMetadata.fromPartial(object.metadata) : undefined; message.refId = (_d = object.refId) !== null && _d !== void 0 ? _d : ""; message.type = (_e = object.type) !== null && _e !== void 0 ? _e : RemoteApiEndpointType.TYPE_UNSET; message.protoDescriptor = (_f = object.protoDescriptor) !== null && _f !== void 0 ? _f : new Uint8Array(0); message.requestType = (_g = object.requestType) !== null && _g !== void 0 ? _g : ""; message.responseType = (_h = object.responseType) !== null && _h !== void 0 ? _h : ""; message.usesLocationProxy = (_j = object.usesLocationProxy) !== null && _j !== void 0 ? _j : false; message.cachingConfig = (object.cachingConfig !== undefined && object.cachingConfig !== null) ? RemoteApiCachingConfig.fromPartial(object.cachingConfig) : undefined; message.userLocationUseCase = (_k = object.userLocationUseCase) !== null && _k !== void 0 ? _k : UserLocationUseCase.USE_CASE_UNSET; message.documentationLink = (_l = object.documentationLink) !== null && _l !== void 0 ? _l : ""; message.description = (_m = object.description) !== null && _m !== void 0 ? _m : ""; message.responseParameters = ((_o = object.responseParameters) === null || _o === void 0 ? void 0 : _o.map((e) => RemoteApiHttpResponseParameter.fromPartial(e))) || []; message.reqAldRequestValidation = (_p = object.reqAldRequestValidation) !== null && _p !== void 0 ? _p : false; message.reqAldResponseValidation = (_q = object.reqAldResponseValidation) !== null && _q !== void 0 ? _q : false; message.aldContextWindow = (_r = object.aldContextWindow) !== null && _r !== void 0 ? _r : ""; message.aldRequestConfigs = ((_s = object.aldRequestConfigs) === null || _s === void 0 ? void 0 : _s.map((e) => e)) || []; message.aldResponseConfigs = ((_t = object.aldResponseConfigs) === null || _t === void 0 ? void 0 : _t.map((e) => e)) || []; return message; }, }; function createBaseRemoteApiGrpcEndpoint() { return { methodSymbol: "", refId: "", requestType: "", responseType: "", usesLocationProxy: false, userLocationUseCase: UserLocationUseCase.USE_CASE_UNSET, documentationLink: "", description: "", responseParameters: [], protoDescriptor: new Uint8Array(0), requestParameters: [], }; } export const RemoteApiGrpcEndpoint = { encode(message, writer = new BinaryWriter()) { if (message.methodSymbol !== "") { writer.uint32(10).string(message.methodSymbol); } if (message.refId !== "") { writer.uint32(18).string(message.refId); } if (message.requestType !== "") { writer.uint32(26).string(message.requestType); } if (message.responseType !== "") { writer.uint32(34).string(message.responseType); } if (message.usesLocationProxy !== false) { writer.uint32(40).bool(message.usesLocationProxy); } if (message.userLocationUseCase !== UserLocationUseCase.USE_CASE_UNSET) { writer.uint32(48).int32(userLocationUseCaseToNumber(message.userLocationUseCase)); } if (message.documentationLink !== "") { writer.uint32(58).string(message.documentationLink); } if (message.description !== "") { writer.uint32(66).string(message.description); } for (const v of message.responseParameters) { RemoteApiGrpcResponseParameter.encode(v, writer.uint32(74).fork()).join(); } if (message.protoDescriptor.length !== 0) { writer.uint32(82).bytes(message.protoDescriptor); } for (const v of message.requestParameters) { RemoteApiGrpcRequestParameter.encode(v, writer.uint32(90).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRemoteApiGrpcEndpoint(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.methodSymbol = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.refId = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.requestType = reader.string(); continue; } case 4: { if (tag !== 34) { break; } message.responseTy