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
6 changes: 5 additions & 1 deletion packages_generated/interlink/src/v1beta1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
marshalAttachVpcRequest,
marshalCreateLinkRequest,
marshalCreateRoutingPolicyRequest,
marshalDetachRoutingPolicyRequest,
marshalUpdateLinkRequest,
marshalUpdateRoutingPolicyRequest,
unmarshalDedicatedConnection,
Expand Down Expand Up @@ -447,7 +448,9 @@ export class API extends ParentAPI {
detachRoutingPolicy = (request: Readonly<DetachRoutingPolicyRequest>) =>
this.client.fetch<Link>(
{
body: '{}',
body: JSON.stringify(
marshalDetachRoutingPolicyRequest(request, this.client.settings),
),
headers: jsonContentHeaders,
method: 'POST',
path: `/interlink/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/links/${validatePathParam('linkId', request.linkId)}/detach-routing-policy`,
Expand Down Expand Up @@ -499,6 +502,7 @@ export class API extends ParentAPI {
method: 'GET',
path: `/interlink/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routing-policies`,
urlParams: urlParams(
['ipv6', request.ipv6],
['name', request.name],
['order_by', request.orderBy],
['organization_id', request.organizationId],
Expand Down
12 changes: 12 additions & 0 deletions packages_generated/interlink/src/v1beta1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
CreateLinkRequest,
CreateRoutingPolicyRequest,
DedicatedConnection,
DetachRoutingPolicyRequest,
Link,
ListDedicatedConnectionsResponse,
ListLinksResponse,
Expand Down Expand Up @@ -119,6 +120,8 @@ export const unmarshalLink = (data: unknown): Link => {
projectId: data.project_id,
region: data.region,
routingPolicyId: data.routing_policy_id,
routingPolicyV4Id: data.routing_policy_v4_id,
routingPolicyV6Id: data.routing_policy_v6_id,
scwBgpConfig: data.scw_bgp_config
? unmarshalBgpConfig(data.scw_bgp_config)
: undefined,
Expand Down Expand Up @@ -178,6 +181,7 @@ export const unmarshalRoutingPolicy = (data: unknown): RoutingPolicy => {
return {
createdAt: unmarshalDate(data.created_at),
id: data.id,
isIpv6: data.is_ipv6,
name: data.name,
organizationId: data.organization_id,
prefixFilterIn: data.prefix_filter_in,
Expand Down Expand Up @@ -302,13 +306,21 @@ export const marshalCreateRoutingPolicyRequest = (
request: CreateRoutingPolicyRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
is_ipv6: request.isIpv6,
name: request.name,
prefix_filter_in: request.prefixFilterIn,
prefix_filter_out: request.prefixFilterOut,
project_id: request.projectId ?? defaults.defaultProjectId,
tags: request.tags,
})

export const marshalDetachRoutingPolicyRequest = (
request: DetachRoutingPolicyRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
routing_policy_id: request.routingPolicyId,
})

export const marshalUpdateLinkRequest = (
request: UpdateLinkRequest,
defaults: DefaultValues,
Expand Down
26 changes: 25 additions & 1 deletion packages_generated/interlink/src/v1beta1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export interface Link {
*/
vpcId?: string
/**
* ID of the routing policy attached to the link.
* @deprecated Deprecated. Use routing_policy_v4_id or routing_policy_v6_id instead.
*/
routingPolicyId?: string
/**
Expand Down Expand Up @@ -236,6 +236,14 @@ export interface Link {
* BGP configuration on peer's side (on-premises or other hosting provider).
*/
peerBgpConfig?: BgpConfig
/**
* ID of the routing policy IPv4 attached to the link.
*/
routingPolicyV4Id?: string
/**
* ID of the routing policy IPv6 attached to the link.
*/
routingPolicyV6Id?: string
/**
* Region of the link.
*/
Expand Down Expand Up @@ -345,6 +353,10 @@ export interface RoutingPolicy {
* Last modification date of the routing policy.
*/
updatedAt?: Date
/**
* IP prefixes version of the routing policy.
*/
isIpv6: boolean
/**
* Region of the routing policy.
*/
Expand Down Expand Up @@ -449,6 +461,10 @@ export type CreateRoutingPolicyRequest = {
* IP prefix filters to advertise to the peer (ranges of routes to advertise).
*/
prefixFilterOut?: string[]
/**
* IP prefixes version of the routing policy.
*/
isIpv6: boolean
}

export type DeleteLinkRequest = {
Expand Down Expand Up @@ -482,6 +498,10 @@ export type DetachRoutingPolicyRequest = {
* ID of the link to detach a routing policy from.
*/
linkId: string
/**
* ID of the routing policy to be detached.
*/
routingPolicyId: string
}

export type DetachVpcRequest = {
Expand Down Expand Up @@ -837,6 +857,10 @@ export type ListRoutingPoliciesRequest = {
* Tags to filter for.
*/
tags?: string[]
/**
* Filter for the routing policies based on IP prefixes version.
*/
ipv6?: boolean
}

export interface ListRoutingPoliciesResponse {
Expand Down
Loading