Skip to content

Commit

Permalink
Tnt 43817 update open api models (#57)
Browse files Browse the repository at this point in the history
* clear older openapi folder

* Squashed 'openapi/' content from commit 1b0e12d72e

git-subtree-dir: openapi
git-subtree-split: 1b0e12d72e63d37cee94d1fb8524d28eab86ed75

* open api models
  • Loading branch information
shandilya3 authored Mar 23, 2022
1 parent 0ce222b commit 2d820e6
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openapi/delivery/components/AnalyticsRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AnalyticsRequest:
$ref: "./LoggingType.yaml#/LoggingType"
trackingServer:
type: string
description: tracking server
description: tracking server domain (should not include http://)
trackingServerSecure:
type: string
description: secure tracking server
description: secure tracking server domain (should not include https://)
30 changes: 30 additions & 0 deletions openapi/delivery/components/ClientHints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
openapi: "3.0.0"
ClientHints:
type: object
description: |
Client hints data. Used in place of userAgent if provided.
properties:
mobile:
type: boolean
description: Sec-CH-UA-Mobile (low entropy)
model:
type: string
description: Sec-CH-UA-Model
platform:
type: string
description: Sec-CH-UA-Platform (low entropy)
platformVersion:
type: string
description: Sec-CH-UA-Platform-Version
browserUAWithMajorVersion:
type: string
description: Sec-CH-UA (low entropy)
browserUAWithFullVersion:
type: string
description: Sec-CH-UA-Full-Version-List
architecture:
type: string
description: Sec-CH-UA-Arch
bitness:
type: string
description: Sec-CH-UA-Bitness
2 changes: 2 additions & 0 deletions openapi/delivery/components/Context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Context:
userAgent:
description: User-Agent should be sent only via this property. HTTP header User-Agent is ignored.
type: string
clientHints:
$ref: "./ClientHints.yaml#/ClientHints"
beacon:
type: boolean
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public AnalyticsRequest trackingServer(String trackingServer) {
}

/**
* tracking server
* tracking server domain (should not include http://)
*
* @return trackingServer
*/
Expand All @@ -91,7 +91,7 @@ public AnalyticsRequest trackingServerSecure(String trackingServerSecure) {
}

/**
* secure tracking server
* secure tracking server domain (should not include https://)
*
* @return trackingServerSecure
*/
Expand Down
250 changes: 250 additions & 0 deletions src/main/java/com/adobe/target/delivery/v1/model/ClientHints.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* NOTE: This is an auto generated file. Do not edit directly.
*/
package com.adobe.target.delivery.v1.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;

/** Client hints data. Used in place of userAgent if provided. */
public class ClientHints {
@JsonProperty("mobile")
private Boolean mobile;

@JsonProperty("model")
private String model;

@JsonProperty("platform")
private String platform;

@JsonProperty("platformVersion")
private String platformVersion;

@JsonProperty("browserUAWithMajorVersion")
private String browserUAWithMajorVersion;

@JsonProperty("browserUAWithFullVersion")
private String browserUAWithFullVersion;

@JsonProperty("architecture")
private String architecture;

@JsonProperty("bitness")
private String bitness;

public ClientHints mobile(Boolean mobile) {
this.mobile = mobile;
return this;
}

/**
* Sec-CH-UA-Mobile (low entropy)
*
* @return mobile
*/
public Boolean getMobile() {
return mobile;
}

public void setMobile(Boolean mobile) {
this.mobile = mobile;
}

public ClientHints model(String model) {
this.model = model;
return this;
}

/**
* Sec-CH-UA-Model
*
* @return model
*/
public String getModel() {
return model;
}

public void setModel(String model) {
this.model = model;
}

public ClientHints platform(String platform) {
this.platform = platform;
return this;
}

/**
* Sec-CH-UA-Platform (low entropy)
*
* @return platform
*/
public String getPlatform() {
return platform;
}

public void setPlatform(String platform) {
this.platform = platform;
}

public ClientHints platformVersion(String platformVersion) {
this.platformVersion = platformVersion;
return this;
}

/**
* Sec-CH-UA-Platform-Version
*
* @return platformVersion
*/
public String getPlatformVersion() {
return platformVersion;
}

public void setPlatformVersion(String platformVersion) {
this.platformVersion = platformVersion;
}

public ClientHints browserUAWithMajorVersion(String browserUAWithMajorVersion) {
this.browserUAWithMajorVersion = browserUAWithMajorVersion;
return this;
}

/**
* Sec-CH-UA (low entropy)
*
* @return browserUAWithMajorVersion
*/
public String getBrowserUAWithMajorVersion() {
return browserUAWithMajorVersion;
}

public void setBrowserUAWithMajorVersion(String browserUAWithMajorVersion) {
this.browserUAWithMajorVersion = browserUAWithMajorVersion;
}

public ClientHints browserUAWithFullVersion(String browserUAWithFullVersion) {
this.browserUAWithFullVersion = browserUAWithFullVersion;
return this;
}

/**
* Sec-CH-UA-Full-Version-List
*
* @return browserUAWithFullVersion
*/
public String getBrowserUAWithFullVersion() {
return browserUAWithFullVersion;
}

public void setBrowserUAWithFullVersion(String browserUAWithFullVersion) {
this.browserUAWithFullVersion = browserUAWithFullVersion;
}

public ClientHints architecture(String architecture) {
this.architecture = architecture;
return this;
}

/**
* Sec-CH-UA-Arch
*
* @return architecture
*/
public String getArchitecture() {
return architecture;
}

public void setArchitecture(String architecture) {
this.architecture = architecture;
}

public ClientHints bitness(String bitness) {
this.bitness = bitness;
return this;
}

/**
* Sec-CH-UA-Bitness
*
* @return bitness
*/
public String getBitness() {
return bitness;
}

public void setBitness(String bitness) {
this.bitness = bitness;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClientHints clientHints = (ClientHints) o;
return Objects.equals(this.mobile, clientHints.mobile)
&& Objects.equals(this.model, clientHints.model)
&& Objects.equals(this.platform, clientHints.platform)
&& Objects.equals(this.platformVersion, clientHints.platformVersion)
&& Objects.equals(this.browserUAWithMajorVersion, clientHints.browserUAWithMajorVersion)
&& Objects.equals(this.browserUAWithFullVersion, clientHints.browserUAWithFullVersion)
&& Objects.equals(this.architecture, clientHints.architecture)
&& Objects.equals(this.bitness, clientHints.bitness);
}

@Override
public int hashCode() {
return Objects.hash(
mobile,
model,
platform,
platformVersion,
browserUAWithMajorVersion,
browserUAWithFullVersion,
architecture,
bitness);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClientHints {\n");
sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n");
sb.append(" model: ").append(toIndentedString(model)).append("\n");
sb.append(" platform: ").append(toIndentedString(platform)).append("\n");
sb.append(" platformVersion: ").append(toIndentedString(platformVersion)).append("\n");
sb.append(" browserUAWithMajorVersion: ")
.append(toIndentedString(browserUAWithMajorVersion))
.append("\n");
sb.append(" browserUAWithFullVersion: ")
.append(toIndentedString(browserUAWithFullVersion))
.append("\n");
sb.append(" architecture: ").append(toIndentedString(architecture)).append("\n");
sb.append(" bitness: ").append(toIndentedString(bitness)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
24 changes: 24 additions & 0 deletions src/main/java/com/adobe/target/delivery/v1/model/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public class Context {
@JsonProperty("userAgent")
private String userAgent;

@JsonProperty("clientHints")
private ClientHints clientHints;

@JsonProperty("beacon")
private Boolean beacon = false;

Expand Down Expand Up @@ -234,6 +237,24 @@ public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}

public Context clientHints(ClientHints clientHints) {
this.clientHints = clientHints;
return this;
}

/**
* Get clientHints
*
* @return clientHints
*/
public ClientHints getClientHints() {
return clientHints;
}

public void setClientHints(ClientHints clientHints) {
this.clientHints = clientHints;
}

public Context beacon(Boolean beacon) {
this.beacon = beacon;
return this;
Expand Down Expand Up @@ -272,6 +293,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.geo, context.geo)
&& Objects.equals(this.timeOffsetInMinutes, context.timeOffsetInMinutes)
&& Objects.equals(this.userAgent, context.userAgent)
&& Objects.equals(this.clientHints, context.clientHints)
&& Objects.equals(this.beacon, context.beacon);
}

Expand All @@ -288,6 +310,7 @@ public int hashCode() {
geo,
timeOffsetInMinutes,
userAgent,
clientHints,
beacon);
}

Expand All @@ -307,6 +330,7 @@ public String toString() {
.append(toIndentedString(timeOffsetInMinutes))
.append("\n");
sb.append(" userAgent: ").append(toIndentedString(userAgent)).append("\n");
sb.append(" clientHints: ").append(toIndentedString(clientHints)).append("\n");
sb.append(" beacon: ").append(toIndentedString(beacon)).append("\n");
sb.append("}");
return sb.toString();
Expand Down

0 comments on commit 2d820e6

Please sign in to comment.